From 36821c2655f8cfb7b872716ff3a7442b1044ed7f Mon Sep 17 00:00:00 2001 From: AWS SDK Swift Automation Date: Thu, 18 Jan 2024 21:44:51 +0000 Subject: [PATCH] chore: Updates version to 0.34.0 --- Package.swift | 4 +- Package.version | 2 +- .../Documentation.docc/AWSSDKForSwift.md | 4 + Sources/Services/AWSAmp/models/Models.swift | 42 + .../AppIntegrationsClient.swift | 97 + .../AppIntegrationsClientProtocol.swift | 36 + .../AWSAppIntegrations/Paginators.swift | 31 + .../AWSAppIntegrations/models/Models.swift | 371 +++ .../Services/AWSAppRunner/models/Models.swift | 8 +- .../AWSAppStream/AppStreamClient.swift | 1 + .../AppStreamClientProtocol.swift | 1 + .../Services/AWSAppStream/models/Models.swift | 11 + .../AWSBedrockAgent/models/Models.swift | 162 + .../CloudWatchLogsClient.swift | 21 +- .../CloudWatchLogsClientProtocol.swift | 21 +- .../AWSCloudWatchLogs/models/Models.swift | 64 +- .../Services/AWSCodeBuild/models/Models.swift | 5 + .../AWSCodeCommit/CodeCommitClient.swift | 59 + .../CodeCommitClientProtocol.swift | 27 + .../AWSCodeCommit/models/Models.swift | 462 +++ .../models/Models.swift | 3 + .../CodestarnotificationsClient.swift | 30 +- .../CodestarnotificationsClientProtocol.swift | 34 +- .../models/Models.swift | 14 +- .../AWSConfigService/models/Models.swift | 62 +- .../Services/AWSConnect/ConnectClient.swift | 594 ++++ .../AWSConnect/ConnectClientProtocol.swift | 208 ++ Sources/Services/AWSConnect/Paginators.swift | 129 + .../Services/AWSConnect/models/Models.swift | 2902 ++++++++++++++++- .../ConnectParticipantClient.swift | 1 + .../ConnectParticipantClientProtocol.swift | 1 + .../AWSConnectParticipant/models/Models.swift | 7 + Sources/Services/AWSDocDB/models/Models.swift | 20 + .../Services/AWSDynamoDB/models/Models.swift | 2 +- Sources/Services/AWSEC2/EC2Client.swift | 2 +- .../Services/AWSEC2/EC2ClientProtocol.swift | 2 +- Sources/Services/AWSEC2/models/Models.swift | 162 +- Sources/Services/AWSECS/ECSClient.swift | 12 +- .../Services/AWSECS/ECSClientProtocol.swift | 12 +- Sources/Services/AWSECS/models/Models.swift | 826 ++++- Sources/Services/AWSEKS/EKSClient.swift | 95 + .../Services/AWSEKS/EKSClientProtocol.swift | 32 + Sources/Services/AWSEKS/Paginators.swift | 32 + Sources/Services/AWSEKS/models/Models.swift | 1068 +++++- Sources/Services/AWSEMR/EMRClient.swift | 47 + .../Services/AWSEMR/EMRClientProtocol.swift | 13 + Sources/Services/AWSEMR/models/Models.swift | 94 + .../EndpointResolver.swift | 2 +- .../models/Models.swift | 9 +- .../AWSEventBridge/models/Models.swift | 66 +- Sources/Services/AWSFis/FisClient.swift | 4 +- .../Services/AWSFis/FisClientProtocol.swift | 6 +- Sources/Services/AWSFis/models/Models.swift | 8 +- Sources/Services/AWSGlue/GlueClient.swift | 18 +- .../Services/AWSGlue/GlueClientProtocol.swift | 18 +- Sources/Services/AWSGlue/Paginators.swift | 2 + Sources/Services/AWSGlue/models/Models.swift | 316 ++ .../AWSGuardDuty/GuardDutyClient.swift | 50 +- .../GuardDutyClientProtocol.swift | 20 +- .../Services/AWSGuardDuty/models/Models.swift | 458 ++- Sources/Services/AWSIAM/IAMClient.swift | 4 +- .../Services/AWSIAM/IAMClientProtocol.swift | 4 +- Sources/Services/AWSIoT/IoTClient.swift | 3 + .../Services/AWSIoT/IoTClientProtocol.swift | 3 + Sources/Services/AWSIoT/models/Models.swift | 43 +- .../AWSIoTFleetWise/models/Models.swift | 86 +- Sources/Services/AWSKMS/KMSClient.swift | 22 +- .../Services/AWSKMS/KMSClientProtocol.swift | 22 +- Sources/Services/AWSKMS/models/Models.swift | 14 +- .../AWSKeyspaces/KeyspacesClient.swift | 101 +- .../KeyspacesClientProtocol.swift | 67 +- .../Services/AWSKeyspaces/models/Models.swift | 716 +++- .../KinesisVideoArchivedMediaClient.swift | 9 +- ...esisVideoArchivedMediaClientProtocol.swift | 9 +- .../models/Models.swift | 7 +- .../AWSLakeFormation/models/Models.swift | 134 +- .../AWSLightsail/LightsailClient.swift | 110 +- .../LightsailClientProtocol.swift | 42 +- .../Services/AWSLightsail/models/Models.swift | 941 +++++- .../Services/AWSLocation/LocationClient.swift | 1 + .../Services/AWSLocation/models/Models.swift | 107 +- Sources/Services/AWSMWAA/models/Models.swift | 22 +- .../Services/AWSMacie2/models/Models.swift | 44 +- .../models/Models.swift | 89 +- .../AWSMediaConnect/MediaConnectClient.swift | 48 + .../MediaConnectClientProtocol.swift | 18 + .../AWSMediaConnect/models/Models.swift | 419 +++ .../AWSMediaConvert/models/Models.swift | 525 ++- .../Services/AWSMediaLive/models/Models.swift | 242 +- .../AWSMediaTailor/models/Models.swift | 100 +- .../Services/AWSNeptuneGraph/Waiters.swift | 6 + .../AWSNetworkMonitor/EndpointResolver.swift | 153 + .../NetworkMonitorClient.swift | 660 ++++ .../NetworkMonitorClientProtocol.swift | 220 ++ .../AWSNetworkMonitor/Paginators.swift | 5 + .../AWSNetworkMonitor/models/Models.swift | 2894 ++++++++++++++++ Sources/Services/AWSOmics/OmicsClient.swift | 2 +- .../AWSOmics/OmicsClientProtocol.swift | 2 +- Sources/Services/AWSOmics/models/Models.swift | 2 +- .../AWSOpenSearch/models/Models.swift | 15 +- .../PaymentCryptographyClient.swift | 23 +- .../PaymentCryptographyClientProtocol.swift | 23 +- .../models/Models.swift | 211 +- .../AWSPersonalize/PersonalizeClient.swift | 2 +- .../PersonalizeClientProtocol.swift | 2 +- .../AWSPersonalize/models/Models.swift | 8 +- .../AWSPersonalizeRuntime/models/Models.swift | 4 +- .../Services/AWSQConnect/QConnectClient.swift | 2 + .../AWSQConnect/QConnectClientProtocol.swift | 2 + .../AWSQuickSight/QuickSightClient.swift | 1 + .../QuickSightClientProtocol.swift | 1 + .../AWSQuickSight/models/Models.swift | 45 +- Sources/Services/AWSRDS/RDSClient.swift | 94 + .../Services/AWSRDS/RDSClientProtocol.swift | 28 + Sources/Services/AWSRDS/models/Models.swift | 283 +- .../Services/AWSRDSData/RDSDataClient.swift | 110 +- .../AWSRDSData/RDSDataClientProtocol.swift | 119 +- .../Services/AWSRDSData/models/Models.swift | 460 ++- .../AWSRedshiftServerless/models/Models.swift | 8 +- .../AWSRekognition/RekognitionClient.swift | 2 +- .../RekognitionClientProtocol.swift | 8 +- .../AWSRekognition/models/Models.swift | 123 +- .../Services/AWSRoute53/models/Models.swift | 140 +- .../AWSRoute53Resolver/models/Models.swift | 158 +- .../AWSS3Control/EndpointResolver.swift | 2 +- .../Services/AWSSageMaker/Paginators.swift | 3 +- .../Services/AWSSageMaker/models/Models.swift | 520 ++- .../AWSSecretsManager/EndpointResolver.swift | 2 +- .../SecretsManagerClient.swift | 4 +- .../SecretsManagerClientProtocol.swift | 4 +- .../AWSSecretsManager/models/Models.swift | 8 +- .../SecurityHubClientProtocol.swift | 2 +- .../AWSSecurityHub/models/Models.swift | 2 +- .../ServiceCatalogClient.swift | 3 + .../AWSServiceCatalog/models/Models.swift | 40 +- .../AWSSupplyChain/EndpointResolver.swift | 153 + .../AWSSupplyChain/SupplyChainClient.swift | 172 + .../SupplyChainClientProtocol.swift | 47 + .../AWSSupplyChain/models/Models.swift | 752 +++++ .../Services/AWSSupport/models/Models.swift | 4 +- .../Services/AWSTransfer/models/Models.swift | 46 +- Sources/Services/AWSWisdom/WisdomClient.swift | 2 + .../AWSWisdom/WisdomClientProtocol.swift | 2 + .../AWSWorkSpaces/WorkSpacesClient.swift | 4 +- .../WorkSpacesClientProtocol.swift | 4 +- .../AWSWorkSpaces/models/Models.swift | 6 +- .../EndpointResolverTest.swift | 19 - .../EndpointResolverTest.swift | 6 +- .../AWSIAMTests/EndpointResolverTest.swift | 85 +- .../EndpointResolverTest.swift | 19 - .../EndpointResolverTest.swift | 19 - .../EndpointResolverTest.swift | 509 +++ .../EndpointResolverTest.swift | 19 - .../EndpointResolverTest.swift | 85 +- .../EndpointResolverTest.swift | 366 ++- .../EndpointResolverTest.swift | 10 +- .../EndpointResolverTest.swift | 509 +++ packageDependencies.plist | 2 +- 158 files changed, 20988 insertions(+), 1020 deletions(-) create mode 100644 Sources/Services/AWSNeptuneGraph/Waiters.swift create mode 100644 Sources/Services/AWSNetworkMonitor/EndpointResolver.swift create mode 100644 Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift create mode 100644 Sources/Services/AWSNetworkMonitor/NetworkMonitorClientProtocol.swift create mode 100644 Sources/Services/AWSNetworkMonitor/Paginators.swift create mode 100644 Sources/Services/AWSNetworkMonitor/models/Models.swift create mode 100644 Sources/Services/AWSSupplyChain/EndpointResolver.swift create mode 100644 Sources/Services/AWSSupplyChain/SupplyChainClient.swift create mode 100644 Sources/Services/AWSSupplyChain/SupplyChainClientProtocol.swift create mode 100644 Sources/Services/AWSSupplyChain/models/Models.swift create mode 100644 Tests/Services/AWSNetworkMonitorTests/EndpointResolverTest.swift create mode 100644 Tests/Services/AWSSupplyChainTests/EndpointResolverTest.swift diff --git a/Package.swift b/Package.swift index cde570ac269..ae10b8fd3d9 100644 --- a/Package.swift +++ b/Package.swift @@ -230,7 +230,7 @@ func addResolvedTargets() { // MARK: - Generated addDependencies( - clientRuntimeVersion: "0.38.0", + clientRuntimeVersion: "0.39.0", crtVersion: "0.22.0" ) @@ -488,6 +488,7 @@ let serviceTargets: [String] = [ "AWSNeptunedata", "AWSNetworkFirewall", "AWSNetworkManager", + "AWSNetworkMonitor", "AWSNimble", "AWSOAM", "AWSOSIS", @@ -584,6 +585,7 @@ let serviceTargets: [String] = [ "AWSSnowball", "AWSSsmSap", "AWSStorageGateway", + "AWSSupplyChain", "AWSSupport", "AWSSupportApp", "AWSSynthetics", diff --git a/Package.version b/Package.version index 7d07a196012..75544d772ac 100644 --- a/Package.version +++ b/Package.version @@ -1 +1 @@ -0.33.0 \ No newline at end of file +0.34.0 \ No newline at end of file diff --git a/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md b/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md index 074d4951f54..33b40130f15 100644 --- a/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md +++ b/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md @@ -511,6 +511,8 @@ This SDK is open-source. Code is available on Github [here](https://github.com/ [AWSNetworkManager](../../../../../swift/api/awsnetworkmanager/latest) +[AWSNetworkMonitor](../../../../../swift/api/awsnetworkmonitor/latest) + [AWSNimble](../../../../../swift/api/awsnimble/latest) [AWSOAM](../../../../../swift/api/awsoam/latest) @@ -703,6 +705,8 @@ This SDK is open-source. Code is available on Github [here](https://github.com/ [AWSStorageGateway](../../../../../swift/api/awsstoragegateway/latest) +[AWSSupplyChain](../../../../../swift/api/awssupplychain/latest) + [AWSSupport](../../../../../swift/api/awssupport/latest) [AWSSupportApp](../../../../../swift/api/awssupportapp/latest) diff --git a/Sources/Services/AWSAmp/models/Models.swift b/Sources/Services/AWSAmp/models/Models.swift index 702c47fdea4..35ca34b82fc 100644 --- a/Sources/Services/AWSAmp/models/Models.swift +++ b/Sources/Services/AWSAmp/models/Models.swift @@ -1026,6 +1026,7 @@ extension CreateWorkspaceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alias case clientToken + case kmsKeyArn case tags } @@ -1037,6 +1038,9 @@ extension CreateWorkspaceInput: Swift.Encodable { if let clientToken = self.clientToken { try encodeContainer.encode(clientToken, forKey: .clientToken) } + if let kmsKeyArn = self.kmsKeyArn { + try encodeContainer.encode(kmsKeyArn, forKey: .kmsKeyArn) + } if let tags = tags { var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) for (dictKey0, tagMap0) in tags { @@ -1058,17 +1062,21 @@ public struct CreateWorkspaceInput: Swift.Equatable { public var alias: Swift.String? /// Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. public var clientToken: Swift.String? + /// Optional, customer managed KMS key used to encrypt data for this workspace + public var kmsKeyArn: Swift.String? /// Optional, user-provided tags for this workspace. public var tags: [Swift.String:Swift.String]? public init( alias: Swift.String? = nil, clientToken: Swift.String? = nil, + kmsKeyArn: Swift.String? = nil, tags: [Swift.String:Swift.String]? = nil ) { self.alias = alias self.clientToken = clientToken + self.kmsKeyArn = kmsKeyArn self.tags = tags } } @@ -1077,12 +1085,14 @@ struct CreateWorkspaceInputBody: Swift.Equatable { let alias: Swift.String? let clientToken: Swift.String? let tags: [Swift.String:Swift.String]? + let kmsKeyArn: Swift.String? } extension CreateWorkspaceInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alias case clientToken + case kmsKeyArn case tags } @@ -1103,6 +1113,8 @@ extension CreateWorkspaceInputBody: Swift.Decodable { } } tags = tagsDecoded0 + let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) + kmsKeyArn = kmsKeyArnDecoded } } @@ -1112,11 +1124,13 @@ extension CreateWorkspaceOutput: ClientRuntime.HttpResponseBinding { let responseDecoder = decoder { let output: CreateWorkspaceOutputBody = try responseDecoder.decode(responseBody: data) self.arn = output.arn + self.kmsKeyArn = output.kmsKeyArn self.status = output.status self.tags = output.tags self.workspaceId = output.workspaceId } else { self.arn = nil + self.kmsKeyArn = nil self.status = nil self.tags = nil self.workspaceId = nil @@ -1129,6 +1143,8 @@ public struct CreateWorkspaceOutput: Swift.Equatable { /// The ARN of the workspace that was just created. /// This member is required. public var arn: Swift.String? + /// Customer managed KMS key ARN for this workspace + public var kmsKeyArn: Swift.String? /// The status of the workspace that was just created (usually CREATING). /// This member is required. public var status: AmpClientTypes.WorkspaceStatus? @@ -1140,12 +1156,14 @@ public struct CreateWorkspaceOutput: Swift.Equatable { public init( arn: Swift.String? = nil, + kmsKeyArn: Swift.String? = nil, status: AmpClientTypes.WorkspaceStatus? = nil, tags: [Swift.String:Swift.String]? = nil, workspaceId: Swift.String? = nil ) { self.arn = arn + self.kmsKeyArn = kmsKeyArn self.status = status self.tags = tags self.workspaceId = workspaceId @@ -1157,11 +1175,13 @@ struct CreateWorkspaceOutputBody: Swift.Equatable { let arn: Swift.String? let status: AmpClientTypes.WorkspaceStatus? let tags: [Swift.String:Swift.String]? + let kmsKeyArn: Swift.String? } extension CreateWorkspaceOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn + case kmsKeyArn case status case tags case workspaceId @@ -1186,6 +1206,8 @@ extension CreateWorkspaceOutputBody: Swift.Decodable { } } tags = tagsDecoded0 + let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) + kmsKeyArn = kmsKeyArnDecoded } } @@ -4957,6 +4979,7 @@ extension AmpClientTypes.WorkspaceDescription: Swift.Codable { case alias case arn case createdAt + case kmsKeyArn case prometheusEndpoint case status case tags @@ -4974,6 +4997,9 @@ extension AmpClientTypes.WorkspaceDescription: Swift.Codable { if let createdAt = self.createdAt { try encodeContainer.encodeTimestamp(createdAt, format: .epochSeconds, forKey: .createdAt) } + if let kmsKeyArn = self.kmsKeyArn { + try encodeContainer.encode(kmsKeyArn, forKey: .kmsKeyArn) + } if let prometheusEndpoint = self.prometheusEndpoint { try encodeContainer.encode(prometheusEndpoint, forKey: .prometheusEndpoint) } @@ -5016,6 +5042,8 @@ extension AmpClientTypes.WorkspaceDescription: Swift.Codable { } } tags = tagsDecoded0 + let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) + kmsKeyArn = kmsKeyArnDecoded } } @@ -5030,6 +5058,8 @@ extension AmpClientTypes { /// The time when the workspace was created. /// This member is required. public var createdAt: ClientRuntime.Date? + /// The customer managed KMS key of this workspace. + public var kmsKeyArn: Swift.String? /// Prometheus endpoint URI. public var prometheusEndpoint: Swift.String? /// The status of this workspace. @@ -5045,6 +5075,7 @@ extension AmpClientTypes { alias: Swift.String? = nil, arn: Swift.String? = nil, createdAt: ClientRuntime.Date? = nil, + kmsKeyArn: Swift.String? = nil, prometheusEndpoint: Swift.String? = nil, status: AmpClientTypes.WorkspaceStatus? = nil, tags: [Swift.String:Swift.String]? = nil, @@ -5054,6 +5085,7 @@ extension AmpClientTypes { self.alias = alias self.arn = arn self.createdAt = createdAt + self.kmsKeyArn = kmsKeyArn self.prometheusEndpoint = prometheusEndpoint self.status = status self.tags = tags @@ -5151,6 +5183,7 @@ extension AmpClientTypes.WorkspaceSummary: Swift.Codable { case alias case arn case createdAt + case kmsKeyArn case status case tags case workspaceId @@ -5167,6 +5200,9 @@ extension AmpClientTypes.WorkspaceSummary: Swift.Codable { if let createdAt = self.createdAt { try encodeContainer.encodeTimestamp(createdAt, format: .epochSeconds, forKey: .createdAt) } + if let kmsKeyArn = self.kmsKeyArn { + try encodeContainer.encode(kmsKeyArn, forKey: .kmsKeyArn) + } if let status = self.status { try encodeContainer.encode(status, forKey: .status) } @@ -5204,6 +5240,8 @@ extension AmpClientTypes.WorkspaceSummary: Swift.Codable { } } tags = tagsDecoded0 + let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) + kmsKeyArn = kmsKeyArnDecoded } } @@ -5218,6 +5256,8 @@ extension AmpClientTypes { /// The time when the workspace was created. /// This member is required. public var createdAt: ClientRuntime.Date? + /// Customer managed KMS key ARN for this workspace + public var kmsKeyArn: Swift.String? /// The status of this workspace. /// This member is required. public var status: AmpClientTypes.WorkspaceStatus? @@ -5231,6 +5271,7 @@ extension AmpClientTypes { alias: Swift.String? = nil, arn: Swift.String? = nil, createdAt: ClientRuntime.Date? = nil, + kmsKeyArn: Swift.String? = nil, status: AmpClientTypes.WorkspaceStatus? = nil, tags: [Swift.String:Swift.String]? = nil, workspaceId: Swift.String? = nil @@ -5239,6 +5280,7 @@ extension AmpClientTypes { self.alias = alias self.arn = arn self.createdAt = createdAt + self.kmsKeyArn = kmsKeyArn self.status = status self.tags = tags self.workspaceId = workspaceId diff --git a/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift b/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift index 12ace10b999..5dd6533058d 100644 --- a/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift +++ b/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift @@ -84,6 +84,7 @@ extension AppIntegrationsClient: AppIntegrationsClientProtocol { /// - `InvalidRequestException` : The request is not valid. /// - `ResourceQuotaExceededException` : The allowed quota for the resource has been exceeded. /// - `ThrottlingException` : The throttling limit has been exceeded. + /// - `UnsupportedOperationException` : The operation is not supported. public func createApplication(input: CreateApplicationInput) async throws -> CreateApplicationOutput { let context = ClientRuntime.HttpContextBuilder() @@ -223,6 +224,53 @@ extension AppIntegrationsClient: AppIntegrationsClientProtocol { return result } + /// Performs the `DeleteApplication` operation on the `AmazonAppIntegrationService` service. + /// + /// Deletes the Application. Only Applications that don't have any Application Associations can be deleted. + /// + /// - Parameter DeleteApplicationInput : [no documentation found] + /// + /// - Returns: `DeleteApplicationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServiceError` : Request processing failed due to an error or failure with the service. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func deleteApplication(input: DeleteApplicationInput) async throws -> DeleteApplicationOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "deleteApplication") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "app-integrations") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "deleteApplication") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DeleteDataIntegration` operation on the `AmazonAppIntegrationService` service. /// /// Deletes the DataIntegration. Only DataIntegrations that don't have any DataIntegrationAssociations can be deleted. Deleting a DataIntegration also deletes the underlying Amazon AppFlow flow and service linked role. You cannot create a DataIntegration association for a DataIntegration that has been previously associated. Use a different DataIntegration, or recreate the DataIntegration using the [CreateDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html) API. @@ -458,6 +506,54 @@ extension AppIntegrationsClient: AppIntegrationsClientProtocol { return result } + /// Performs the `ListApplicationAssociations` operation on the `AmazonAppIntegrationService` service. + /// + /// Returns a paginated list of application associations for an application. + /// + /// - Parameter ListApplicationAssociationsInput : [no documentation found] + /// + /// - Returns: `ListApplicationAssociationsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServiceError` : Request processing failed due to an error or failure with the service. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func listApplicationAssociations(input: ListApplicationAssociationsInput) async throws -> ListApplicationAssociationsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listApplicationAssociations") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "app-integrations") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "listApplicationAssociations") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListApplicationAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `ListApplications` operation on the `AmazonAppIntegrationService` service. /// /// This API is in preview release and subject to change. Lists applications in the account. @@ -853,6 +949,7 @@ extension AppIntegrationsClient: AppIntegrationsClientProtocol { /// - `InvalidRequestException` : The request is not valid. /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. + /// - `UnsupportedOperationException` : The operation is not supported. public func updateApplication(input: UpdateApplicationInput) async throws -> UpdateApplicationOutput { let context = ClientRuntime.HttpContextBuilder() diff --git a/Sources/Services/AWSAppIntegrations/AppIntegrationsClientProtocol.swift b/Sources/Services/AWSAppIntegrations/AppIntegrationsClientProtocol.swift index 4e47d5c2062..c702c6c0d1e 100644 --- a/Sources/Services/AWSAppIntegrations/AppIntegrationsClientProtocol.swift +++ b/Sources/Services/AWSAppIntegrations/AppIntegrationsClientProtocol.swift @@ -21,6 +21,7 @@ public protocol AppIntegrationsClientProtocol { /// - `InvalidRequestException` : The request is not valid. /// - `ResourceQuotaExceededException` : The allowed quota for the resource has been exceeded. /// - `ThrottlingException` : The throttling limit has been exceeded. + /// - `UnsupportedOperationException` : The operation is not supported. func createApplication(input: CreateApplicationInput) async throws -> CreateApplicationOutput /// Performs the `CreateDataIntegration` operation on the `AmazonAppIntegrationService` service. /// @@ -58,6 +59,23 @@ public protocol AppIntegrationsClientProtocol { /// - `ResourceQuotaExceededException` : The allowed quota for the resource has been exceeded. /// - `ThrottlingException` : The throttling limit has been exceeded. func createEventIntegration(input: CreateEventIntegrationInput) async throws -> CreateEventIntegrationOutput + /// Performs the `DeleteApplication` operation on the `AmazonAppIntegrationService` service. + /// + /// Deletes the Application. Only Applications that don't have any Application Associations can be deleted. + /// + /// - Parameter DeleteApplicationInput : [no documentation found] + /// + /// - Returns: `DeleteApplicationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServiceError` : Request processing failed due to an error or failure with the service. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func deleteApplication(input: DeleteApplicationInput) async throws -> DeleteApplicationOutput /// Performs the `DeleteDataIntegration` operation on the `AmazonAppIntegrationService` service. /// /// Deletes the DataIntegration. Only DataIntegrations that don't have any DataIntegrationAssociations can be deleted. Deleting a DataIntegration also deletes the underlying Amazon AppFlow flow and service linked role. You cannot create a DataIntegration association for a DataIntegration that has been previously associated. Use a different DataIntegration, or recreate the DataIntegration using the [CreateDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html) API. @@ -143,6 +161,23 @@ public protocol AppIntegrationsClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func getEventIntegration(input: GetEventIntegrationInput) async throws -> GetEventIntegrationOutput + /// Performs the `ListApplicationAssociations` operation on the `AmazonAppIntegrationService` service. + /// + /// Returns a paginated list of application associations for an application. + /// + /// - Parameter ListApplicationAssociationsInput : [no documentation found] + /// + /// - Returns: `ListApplicationAssociationsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServiceError` : Request processing failed due to an error or failure with the service. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func listApplicationAssociations(input: ListApplicationAssociationsInput) async throws -> ListApplicationAssociationsOutput /// Performs the `ListApplications` operation on the `AmazonAppIntegrationService` service. /// /// This API is in preview release and subject to change. Lists applications in the account. @@ -289,6 +324,7 @@ public protocol AppIntegrationsClientProtocol { /// - `InvalidRequestException` : The request is not valid. /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. + /// - `UnsupportedOperationException` : The operation is not supported. func updateApplication(input: UpdateApplicationInput) async throws -> UpdateApplicationOutput /// Performs the `UpdateDataIntegration` operation on the `AmazonAppIntegrationService` service. /// diff --git a/Sources/Services/AWSAppIntegrations/Paginators.swift b/Sources/Services/AWSAppIntegrations/Paginators.swift index 50a9edab733..42b6b483921 100644 --- a/Sources/Services/AWSAppIntegrations/Paginators.swift +++ b/Sources/Services/AWSAppIntegrations/Paginators.swift @@ -2,6 +2,37 @@ import ClientRuntime +extension AppIntegrationsClient { + /// Paginate over `[ListApplicationAssociationsOutput]` 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 `[ListApplicationAssociationsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListApplicationAssociationsOutput` + public func listApplicationAssociationsPaginated(input: ListApplicationAssociationsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listApplicationAssociations(input:)) + } +} + +extension ListApplicationAssociationsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListApplicationAssociationsInput { + return ListApplicationAssociationsInput( + applicationId: self.applicationId, + maxResults: self.maxResults, + nextToken: token + )} +} + +extension PaginatorSequence where OperationStackInput == ListApplicationAssociationsInput, OperationStackOutput == ListApplicationAssociationsOutput { + /// This paginator transforms the `AsyncSequence` returned by `listApplicationAssociationsPaginated` + /// to access the nested member `[AppIntegrationsClientTypes.ApplicationAssociationSummary]` + /// - Returns: `[AppIntegrationsClientTypes.ApplicationAssociationSummary]` + public func applicationAssociations() async throws -> [AppIntegrationsClientTypes.ApplicationAssociationSummary] { + return try await self.asyncCompactMap { item in item.applicationAssociations } + } +} extension AppIntegrationsClient { /// Paginate over `[ListApplicationsOutput]` results. /// diff --git a/Sources/Services/AWSAppIntegrations/models/Models.swift b/Sources/Services/AWSAppIntegrations/models/Models.swift index ae5681be8c9..efcea308faa 100644 --- a/Sources/Services/AWSAppIntegrations/models/Models.swift +++ b/Sources/Services/AWSAppIntegrations/models/Models.swift @@ -57,6 +57,61 @@ extension AccessDeniedExceptionBody: Swift.Decodable { } } +extension AppIntegrationsClientTypes.ApplicationAssociationSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationArn = "ApplicationArn" + case applicationAssociationArn = "ApplicationAssociationArn" + case clientId = "ClientId" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let applicationArn = self.applicationArn { + try encodeContainer.encode(applicationArn, forKey: .applicationArn) + } + if let applicationAssociationArn = self.applicationAssociationArn { + try encodeContainer.encode(applicationAssociationArn, forKey: .applicationAssociationArn) + } + if let clientId = self.clientId { + try encodeContainer.encode(clientId, forKey: .clientId) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let applicationAssociationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationAssociationArn) + applicationAssociationArn = applicationAssociationArnDecoded + let applicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationArn) + applicationArn = applicationArnDecoded + let clientIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientId) + clientId = clientIdDecoded + } +} + +extension AppIntegrationsClientTypes { + /// Summary information about the Application Association. + public struct ApplicationAssociationSummary: Swift.Equatable { + /// The Amazon Resource Name (ARN) of the Application. + public var applicationArn: Swift.String? + /// The Amazon Resource Name (ARN) of the Application Association. + public var applicationAssociationArn: Swift.String? + /// The identifier for the client that is associated with the Application Association. + public var clientId: Swift.String? + + public init( + applicationArn: Swift.String? = nil, + applicationAssociationArn: Swift.String? = nil, + clientId: Swift.String? = nil + ) + { + self.applicationArn = applicationArn + self.applicationAssociationArn = applicationAssociationArn + self.clientId = clientId + } + } + +} + extension AppIntegrationsClientTypes.ApplicationSourceConfig: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case externalUrlConfig = "ExternalUrlConfig" @@ -184,6 +239,7 @@ extension CreateApplicationInput: Swift.Encodable { case description = "Description" case name = "Name" case namespace = "Namespace" + case permissions = "Permissions" case publications = "Publications" case subscriptions = "Subscriptions" case tags = "Tags" @@ -206,6 +262,12 @@ extension CreateApplicationInput: Swift.Encodable { if let namespace = self.namespace { try encodeContainer.encode(namespace, forKey: .namespace) } + if let permissions = permissions { + var permissionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .permissions) + for permission0 in permissions { + try permissionsContainer.encode(permission0) + } + } if let publications = publications { var publicationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .publications) for publication0 in publications { @@ -247,9 +309,13 @@ public struct CreateApplicationInput: Swift.Equatable { /// The namespace of the application. /// This member is required. public var namespace: Swift.String? + /// The configuration of events or requests that the application has access to. + public var permissions: [Swift.String]? /// The events that the application publishes. + @available(*, deprecated, message: "Publications has been replaced with Permissions") public var publications: [AppIntegrationsClientTypes.Publication]? /// The events that the application subscribes. + @available(*, deprecated, message: "Subscriptions has been replaced with Permissions") public var subscriptions: [AppIntegrationsClientTypes.Subscription]? /// The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }. public var tags: [Swift.String:Swift.String]? @@ -260,6 +326,7 @@ public struct CreateApplicationInput: Swift.Equatable { description: Swift.String? = nil, name: Swift.String? = nil, namespace: Swift.String? = nil, + permissions: [Swift.String]? = nil, publications: [AppIntegrationsClientTypes.Publication]? = nil, subscriptions: [AppIntegrationsClientTypes.Subscription]? = nil, tags: [Swift.String:Swift.String]? = nil @@ -270,6 +337,7 @@ public struct CreateApplicationInput: Swift.Equatable { self.description = description self.name = name self.namespace = namespace + self.permissions = permissions self.publications = publications self.subscriptions = subscriptions self.tags = tags @@ -285,6 +353,7 @@ struct CreateApplicationInputBody: Swift.Equatable { let publications: [AppIntegrationsClientTypes.Publication]? let clientToken: Swift.String? let tags: [Swift.String:Swift.String]? + let permissions: [Swift.String]? } extension CreateApplicationInputBody: Swift.Decodable { @@ -294,6 +363,7 @@ extension CreateApplicationInputBody: Swift.Decodable { case description = "Description" case name = "Name" case namespace = "Namespace" + case permissions = "Permissions" case publications = "Publications" case subscriptions = "Subscriptions" case tags = "Tags" @@ -344,6 +414,17 @@ extension CreateApplicationInputBody: Swift.Decodable { } } tags = tagsDecoded0 + let permissionsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .permissions) + var permissionsDecoded0:[Swift.String]? = nil + if let permissionsContainer = permissionsContainer { + permissionsDecoded0 = [Swift.String]() + for string0 in permissionsContainer { + if let string0 = string0 { + permissionsDecoded0?.append(string0) + } + } + } + permissions = permissionsDecoded0 } } @@ -408,6 +489,7 @@ enum CreateApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceQuotaExceededException": return try await ResourceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnsupportedOperationException": return try await UnsupportedOperationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } @@ -1079,6 +1161,62 @@ extension AppIntegrationsClientTypes { } +extension DeleteApplicationInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let arn = arn else { + return nil + } + return "/applications/\(arn.urlPercentEncoding())" + } +} + +public struct DeleteApplicationInput: Swift.Equatable { + /// The Amazon Resource Name (ARN) of the Application. + /// This member is required. + public var arn: Swift.String? + + public init( + arn: Swift.String? = nil + ) + { + self.arn = arn + } +} + +struct DeleteApplicationInputBody: Swift.Equatable { +} + +extension DeleteApplicationInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DeleteApplicationOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct DeleteApplicationOutput: Swift.Equatable { + + public init() { } +} + +enum DeleteApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServiceError": return try await InternalServiceError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension DeleteDataIntegrationInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let dataIntegrationIdentifier = dataIntegrationIdentifier else { @@ -1658,6 +1796,7 @@ extension GetApplicationOutput: ClientRuntime.HttpResponseBinding { self.lastModifiedTime = output.lastModifiedTime self.name = output.name self.namespace = output.namespace + self.permissions = output.permissions self.publications = output.publications self.subscriptions = output.subscriptions self.tags = output.tags @@ -1670,6 +1809,7 @@ extension GetApplicationOutput: ClientRuntime.HttpResponseBinding { self.lastModifiedTime = nil self.name = nil self.namespace = nil + self.permissions = nil self.publications = nil self.subscriptions = nil self.tags = nil @@ -1694,9 +1834,13 @@ public struct GetApplicationOutput: Swift.Equatable { public var name: Swift.String? /// The namespace of the application. public var namespace: Swift.String? + /// The configuration of events or requests that the application has access to. + public var permissions: [Swift.String]? /// The events that the application publishes. + @available(*, deprecated, message: "Publications has been replaced with Permissions") public var publications: [AppIntegrationsClientTypes.Publication]? /// The events that the application subscribes. + @available(*, deprecated, message: "Subscriptions has been replaced with Permissions") public var subscriptions: [AppIntegrationsClientTypes.Subscription]? /// The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }. public var tags: [Swift.String:Swift.String]? @@ -1710,6 +1854,7 @@ public struct GetApplicationOutput: Swift.Equatable { lastModifiedTime: ClientRuntime.Date? = nil, name: Swift.String? = nil, namespace: Swift.String? = nil, + permissions: [Swift.String]? = nil, publications: [AppIntegrationsClientTypes.Publication]? = nil, subscriptions: [AppIntegrationsClientTypes.Subscription]? = nil, tags: [Swift.String:Swift.String]? = nil @@ -1723,6 +1868,7 @@ public struct GetApplicationOutput: Swift.Equatable { self.lastModifiedTime = lastModifiedTime self.name = name self.namespace = namespace + self.permissions = permissions self.publications = publications self.subscriptions = subscriptions self.tags = tags @@ -1741,6 +1887,7 @@ struct GetApplicationOutputBody: Swift.Equatable { let createdTime: ClientRuntime.Date? let lastModifiedTime: ClientRuntime.Date? let tags: [Swift.String:Swift.String]? + let permissions: [Swift.String]? } extension GetApplicationOutputBody: Swift.Decodable { @@ -1753,6 +1900,7 @@ extension GetApplicationOutputBody: Swift.Decodable { case lastModifiedTime = "LastModifiedTime" case name = "Name" case namespace = "Namespace" + case permissions = "Permissions" case publications = "Publications" case subscriptions = "Subscriptions" case tags = "Tags" @@ -1809,6 +1957,17 @@ extension GetApplicationOutputBody: Swift.Decodable { } } tags = tagsDecoded0 + let permissionsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .permissions) + var permissionsDecoded0:[Swift.String]? = nil + if let permissionsContainer = permissionsContainer { + permissionsDecoded0 = [Swift.String]() + for string0 in permissionsContainer { + if let string0 = string0 { + permissionsDecoded0?.append(string0) + } + } + } + permissions = permissionsDecoded0 } } @@ -2290,6 +2449,136 @@ extension InvalidRequestExceptionBody: Swift.Decodable { } } +extension ListApplicationAssociationsInput: ClientRuntime.QueryItemProvider { + public var queryItems: [ClientRuntime.URLQueryItem] { + get throws { + var items = [ClientRuntime.URLQueryItem]() + if let nextToken = nextToken { + let nextTokenQueryItem = ClientRuntime.URLQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = maxResults { + let maxResultsQueryItem = ClientRuntime.URLQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + return items + } + } +} + +extension ListApplicationAssociationsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let applicationId = applicationId else { + return nil + } + return "/applications/\(applicationId.urlPercentEncoding())/associations" + } +} + +public struct ListApplicationAssociationsInput: Swift.Equatable { + /// A unique identifier for the Application. + /// This member is required. + public var applicationId: Swift.String? + /// The maximum number of results to return per page. + public var maxResults: Swift.Int? + /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. + public var nextToken: Swift.String? + + public init( + applicationId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil + ) + { + self.applicationId = applicationId + self.maxResults = maxResults + self.nextToken = nextToken + } +} + +struct ListApplicationAssociationsInputBody: Swift.Equatable { +} + +extension ListApplicationAssociationsInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension ListApplicationAssociationsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ListApplicationAssociationsOutputBody = try responseDecoder.decode(responseBody: data) + self.applicationAssociations = output.applicationAssociations + self.nextToken = output.nextToken + } else { + self.applicationAssociations = nil + self.nextToken = nil + } + } +} + +public struct ListApplicationAssociationsOutput: Swift.Equatable { + /// List of Application Associations for the Application. + public var applicationAssociations: [AppIntegrationsClientTypes.ApplicationAssociationSummary]? + /// If there are additional results, this is the token for the next set of results. + public var nextToken: Swift.String? + + public init( + applicationAssociations: [AppIntegrationsClientTypes.ApplicationAssociationSummary]? = nil, + nextToken: Swift.String? = nil + ) + { + self.applicationAssociations = applicationAssociations + self.nextToken = nextToken + } +} + +struct ListApplicationAssociationsOutputBody: Swift.Equatable { + let applicationAssociations: [AppIntegrationsClientTypes.ApplicationAssociationSummary]? + let nextToken: Swift.String? +} + +extension ListApplicationAssociationsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationAssociations = "ApplicationAssociations" + case nextToken = "NextToken" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let applicationAssociationsContainer = try containerValues.decodeIfPresent([AppIntegrationsClientTypes.ApplicationAssociationSummary?].self, forKey: .applicationAssociations) + var applicationAssociationsDecoded0:[AppIntegrationsClientTypes.ApplicationAssociationSummary]? = nil + if let applicationAssociationsContainer = applicationAssociationsContainer { + applicationAssociationsDecoded0 = [AppIntegrationsClientTypes.ApplicationAssociationSummary]() + for structure0 in applicationAssociationsContainer { + if let structure0 = structure0 { + applicationAssociationsDecoded0?.append(structure0) + } + } + } + applicationAssociations = applicationAssociationsDecoded0 + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + } +} + +enum ListApplicationAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServiceError": return try await InternalServiceError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension ListApplicationsInput: ClientRuntime.QueryItemProvider { public var queryItems: [ClientRuntime.URLQueryItem] { get throws { @@ -3423,6 +3712,61 @@ extension ThrottlingExceptionBody: Swift.Decodable { } } +extension UnsupportedOperationException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: UnsupportedOperationExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The operation is not supported. +public struct UnsupportedOperationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "UnsupportedOperationException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct UnsupportedOperationExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension UnsupportedOperationExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message = "Message" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension UntagResourceInput: ClientRuntime.QueryItemProvider { public var queryItems: [ClientRuntime.URLQueryItem] { get throws { @@ -3505,6 +3849,7 @@ extension UpdateApplicationInput: Swift.Encodable { case applicationSourceConfig = "ApplicationSourceConfig" case description = "Description" case name = "Name" + case permissions = "Permissions" case publications = "Publications" case subscriptions = "Subscriptions" } @@ -3520,6 +3865,12 @@ extension UpdateApplicationInput: Swift.Encodable { if let name = self.name { try encodeContainer.encode(name, forKey: .name) } + if let permissions = permissions { + var permissionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .permissions) + for permission0 in permissions { + try permissionsContainer.encode(permission0) + } + } if let publications = publications { var publicationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .publications) for publication0 in publications { @@ -3554,9 +3905,13 @@ public struct UpdateApplicationInput: Swift.Equatable { public var description: Swift.String? /// The name of the application. public var name: Swift.String? + /// The configuration of events or requests that the application has access to. + public var permissions: [Swift.String]? /// The events that the application publishes. + @available(*, deprecated, message: "Publications has been replaced with Permissions") public var publications: [AppIntegrationsClientTypes.Publication]? /// The events that the application subscribes. + @available(*, deprecated, message: "Subscriptions has been replaced with Permissions") public var subscriptions: [AppIntegrationsClientTypes.Subscription]? public init( @@ -3564,6 +3919,7 @@ public struct UpdateApplicationInput: Swift.Equatable { arn: Swift.String? = nil, description: Swift.String? = nil, name: Swift.String? = nil, + permissions: [Swift.String]? = nil, publications: [AppIntegrationsClientTypes.Publication]? = nil, subscriptions: [AppIntegrationsClientTypes.Subscription]? = nil ) @@ -3572,6 +3928,7 @@ public struct UpdateApplicationInput: Swift.Equatable { self.arn = arn self.description = description self.name = name + self.permissions = permissions self.publications = publications self.subscriptions = subscriptions } @@ -3583,6 +3940,7 @@ struct UpdateApplicationInputBody: Swift.Equatable { let applicationSourceConfig: AppIntegrationsClientTypes.ApplicationSourceConfig? let subscriptions: [AppIntegrationsClientTypes.Subscription]? let publications: [AppIntegrationsClientTypes.Publication]? + let permissions: [Swift.String]? } extension UpdateApplicationInputBody: Swift.Decodable { @@ -3590,6 +3948,7 @@ extension UpdateApplicationInputBody: Swift.Decodable { case applicationSourceConfig = "ApplicationSourceConfig" case description = "Description" case name = "Name" + case permissions = "Permissions" case publications = "Publications" case subscriptions = "Subscriptions" } @@ -3624,6 +3983,17 @@ extension UpdateApplicationInputBody: Swift.Decodable { } } publications = publicationsDecoded0 + let permissionsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .permissions) + var permissionsDecoded0:[Swift.String]? = nil + if let permissionsContainer = permissionsContainer { + permissionsDecoded0 = [Swift.String]() + for string0 in permissionsContainer { + if let string0 = string0 { + permissionsDecoded0?.append(string0) + } + } + } + permissions = permissionsDecoded0 } } @@ -3647,6 +4017,7 @@ enum UpdateApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnsupportedOperationException": return try await UnsupportedOperationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } diff --git a/Sources/Services/AWSAppRunner/models/Models.swift b/Sources/Services/AWSAppRunner/models/Models.swift index 6a7b3056b46..9bd665e2863 100644 --- a/Sources/Services/AWSAppRunner/models/Models.swift +++ b/Sources/Services/AWSAppRunner/models/Models.swift @@ -5749,7 +5749,7 @@ extension AppRunnerClientTypes { public var egressConfiguration: AppRunnerClientTypes.EgressConfiguration? /// Network configuration settings for inbound message traffic. public var ingressConfiguration: AppRunnerClientTypes.IngressConfiguration? - /// App Runner provides you with the option to choose between Internet Protocol version 4 (IPv4) and dual-stack (IPv4 and IPv6) for your incoming public network configuration. This is an optional parameter. If you do not specify an IpAddressType, it defaults to select IPv4. Currently, App Runner supports dual-stack for only Public endpoint. Only IPv4 is supported for Private endpoint. If you update a service that's using dual-stack Public endpoint to a Private endpoint, your App Runner service will default to support only IPv4 for Private endpoint and fail to receive traffic originating from IPv6 endpoint. + /// App Runner provides you with the option to choose between Internet Protocol version 4 (IPv4) and dual stack (IPv4 and IPv6) for your incoming public network configuration. This is an optional parameter. If you do not specify an IpAddressType, it defaults to select IPv4. Currently, App Runner supports dual stack for only Public endpoint. Only IPv4 is supported for Private endpoint. If you update a service that's using dual-stack Public endpoint to a Private endpoint, your App Runner service will default to support only IPv4 for Private endpoint and fail to receive traffic originating from IPv6 endpoint. public var ipAddressType: AppRunnerClientTypes.IpAddressType? public init( @@ -6466,8 +6466,10 @@ extension AppRunnerClientTypes { case nodejs12 case nodejs14 case nodejs16 + case nodejs18 case php81 case python3 + case python311 case ruby31 case sdkUnknown(Swift.String) @@ -6480,8 +6482,10 @@ extension AppRunnerClientTypes { .nodejs12, .nodejs14, .nodejs16, + .nodejs18, .php81, .python3, + .python311, .ruby31, .sdkUnknown("") ] @@ -6499,8 +6503,10 @@ extension AppRunnerClientTypes { case .nodejs12: return "NODEJS_12" case .nodejs14: return "NODEJS_14" case .nodejs16: return "NODEJS_16" + case .nodejs18: return "NODEJS_18" case .php81: return "PHP_81" case .python3: return "PYTHON_3" + case .python311: return "PYTHON_311" case .ruby31: return "RUBY_31" case let .sdkUnknown(s): return s } diff --git a/Sources/Services/AWSAppStream/AppStreamClient.swift b/Sources/Services/AWSAppStream/AppStreamClient.swift index 16f142f1176..e6387818e9b 100644 --- a/Sources/Services/AWSAppStream/AppStreamClient.swift +++ b/Sources/Services/AWSAppStream/AppStreamClient.swift @@ -904,6 +904,7 @@ extension AppStreamClient: AppStreamClientProtocol { /// - `InvalidParameterCombinationException` : Indicates an incorrect combination of parameters, or a missing parameter. /// - `InvalidRoleException` : The specified role is invalid. /// - `LimitExceededException` : The requested limit exceeds the permitted limit for an account. + /// - `OperationNotPermittedException` : The attempted operation is not permitted. /// - `ResourceAlreadyExistsException` : The specified resource already exists. /// - `ResourceNotFoundException` : The specified resource was not found. public func createStack(input: CreateStackInput) async throws -> CreateStackOutput diff --git a/Sources/Services/AWSAppStream/AppStreamClientProtocol.swift b/Sources/Services/AWSAppStream/AppStreamClientProtocol.swift index 42d5d936e35..42520bbbd54 100644 --- a/Sources/Services/AWSAppStream/AppStreamClientProtocol.swift +++ b/Sources/Services/AWSAppStream/AppStreamClientProtocol.swift @@ -301,6 +301,7 @@ public protocol AppStreamClientProtocol { /// - `InvalidParameterCombinationException` : Indicates an incorrect combination of parameters, or a missing parameter. /// - `InvalidRoleException` : The specified role is invalid. /// - `LimitExceededException` : The requested limit exceeds the permitted limit for an account. + /// - `OperationNotPermittedException` : The attempted operation is not permitted. /// - `ResourceAlreadyExistsException` : The specified resource already exists. /// - `ResourceNotFoundException` : The specified resource was not found. func createStack(input: CreateStackInput) async throws -> CreateStackOutput diff --git a/Sources/Services/AWSAppStream/models/Models.swift b/Sources/Services/AWSAppStream/models/Models.swift index bb21ff21afe..e063880e6c5 100644 --- a/Sources/Services/AWSAppStream/models/Models.swift +++ b/Sources/Services/AWSAppStream/models/Models.swift @@ -4653,6 +4653,7 @@ enum CreateStackOutputError: ClientRuntime.HttpResponseErrorBinding { case "InvalidParameterCombinationException": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InvalidRoleException": return try await InvalidRoleException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "OperationNotPermittedException": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceAlreadyExistsException": return try await ResourceAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) @@ -16353,6 +16354,7 @@ extension AppStreamClientTypes { extension AppStreamClientTypes.UserSetting: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" + case maximumLength = "MaximumLength" case permission = "Permission" } @@ -16361,6 +16363,9 @@ extension AppStreamClientTypes.UserSetting: Swift.Codable { if let action = self.action { try encodeContainer.encode(action.rawValue, forKey: .action) } + if let maximumLength = self.maximumLength { + try encodeContainer.encode(maximumLength, forKey: .maximumLength) + } if let permission = self.permission { try encodeContainer.encode(permission.rawValue, forKey: .permission) } @@ -16372,6 +16377,8 @@ extension AppStreamClientTypes.UserSetting: Swift.Codable { action = actionDecoded let permissionDecoded = try containerValues.decodeIfPresent(AppStreamClientTypes.Permission.self, forKey: .permission) permission = permissionDecoded + let maximumLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumLength) + maximumLength = maximumLengthDecoded } } @@ -16381,16 +16388,20 @@ extension AppStreamClientTypes { /// The action that is enabled or disabled. /// This member is required. public var action: AppStreamClientTypes.Action? + /// Specifies the number of characters that can be copied by end users from the local device to the remote session, and to the local device from the remote session. This can be specified only for the CLIPBOARD_COPY_FROM_LOCAL_DEVICE and CLIPBOARD_COPY_TO_LOCAL_DEVICE actions. This defaults to 20,971,520 (20 MB) when unspecified and the permission is ENABLED. This can't be specified when the permission is DISABLED. This can only be specified for AlwaysOn and OnDemand fleets. The attribute is not supported on Elastic fleets. The value can be between 1 and 20,971,520 (20 MB). + public var maximumLength: Swift.Int? /// Indicates whether the action is enabled or disabled. /// This member is required. public var permission: AppStreamClientTypes.Permission? public init( action: AppStreamClientTypes.Action? = nil, + maximumLength: Swift.Int? = nil, permission: AppStreamClientTypes.Permission? = nil ) { self.action = action + self.maximumLength = maximumLength self.permission = permission } } diff --git a/Sources/Services/AWSBedrockAgent/models/Models.swift b/Sources/Services/AWSBedrockAgent/models/Models.swift index b4c80383aeb..330f48098fc 100644 --- a/Sources/Services/AWSBedrockAgent/models/Models.swift +++ b/Sources/Services/AWSBedrockAgent/models/Models.swift @@ -5934,6 +5934,7 @@ extension BedrockAgentClientTypes { public enum KnowledgeBaseStorageType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case opensearchServerless case pinecone + case rds case redisEnterpriseCloud case sdkUnknown(Swift.String) @@ -5941,6 +5942,7 @@ extension BedrockAgentClientTypes { return [ .opensearchServerless, .pinecone, + .rds, .redisEnterpriseCloud, .sdkUnknown("") ] @@ -5953,6 +5955,7 @@ extension BedrockAgentClientTypes { switch self { case .opensearchServerless: return "OPENSEARCH_SERVERLESS" case .pinecone: return "PINECONE" + case .rds: return "RDS" case .redisEnterpriseCloud: return "REDIS_ENTERPRISE_CLOUD" case let .sdkUnknown(s): return s } @@ -7933,6 +7936,155 @@ extension BedrockAgentClientTypes { } } +extension BedrockAgentClientTypes.RdsConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case credentialsSecretArn + case databaseName + case fieldMapping + case resourceArn + case tableName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let credentialsSecretArn = self.credentialsSecretArn { + try encodeContainer.encode(credentialsSecretArn, forKey: .credentialsSecretArn) + } + if let databaseName = self.databaseName { + try encodeContainer.encode(databaseName, forKey: .databaseName) + } + if let fieldMapping = self.fieldMapping { + try encodeContainer.encode(fieldMapping, forKey: .fieldMapping) + } + if let resourceArn = self.resourceArn { + try encodeContainer.encode(resourceArn, forKey: .resourceArn) + } + if let tableName = self.tableName { + try encodeContainer.encode(tableName, forKey: .tableName) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + let credentialsSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .credentialsSecretArn) + credentialsSecretArn = credentialsSecretArnDecoded + let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) + databaseName = databaseNameDecoded + let tableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tableName) + tableName = tableNameDecoded + let fieldMappingDecoded = try containerValues.decodeIfPresent(BedrockAgentClientTypes.RdsFieldMapping.self, forKey: .fieldMapping) + fieldMapping = fieldMappingDecoded + } +} + +extension BedrockAgentClientTypes { + /// Contains the configurations to use RDS to store knowledge base data. + public struct RdsConfiguration: Swift.Equatable { + /// Arn of a SecretsManager Secret. + /// This member is required. + public var credentialsSecretArn: Swift.String? + /// Name of the database within RDS + /// This member is required. + public var databaseName: Swift.String? + /// A mapping of Bedrock Knowledge Base fields to RDS column names + /// This member is required. + public var fieldMapping: BedrockAgentClientTypes.RdsFieldMapping? + /// Arn of a RDS Resource. + /// This member is required. + public var resourceArn: Swift.String? + /// Name of the table within RDS + /// This member is required. + public var tableName: Swift.String? + + public init( + credentialsSecretArn: Swift.String? = nil, + databaseName: Swift.String? = nil, + fieldMapping: BedrockAgentClientTypes.RdsFieldMapping? = nil, + resourceArn: Swift.String? = nil, + tableName: Swift.String? = nil + ) + { + self.credentialsSecretArn = credentialsSecretArn + self.databaseName = databaseName + self.fieldMapping = fieldMapping + self.resourceArn = resourceArn + self.tableName = tableName + } + } + +} + +extension BedrockAgentClientTypes.RdsFieldMapping: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case metadataField + case primaryKeyField + case textField + case vectorField + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let metadataField = self.metadataField { + try encodeContainer.encode(metadataField, forKey: .metadataField) + } + if let primaryKeyField = self.primaryKeyField { + try encodeContainer.encode(primaryKeyField, forKey: .primaryKeyField) + } + if let textField = self.textField { + try encodeContainer.encode(textField, forKey: .textField) + } + if let vectorField = self.vectorField { + try encodeContainer.encode(vectorField, forKey: .vectorField) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let primaryKeyFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryKeyField) + primaryKeyField = primaryKeyFieldDecoded + let vectorFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vectorField) + vectorField = vectorFieldDecoded + let textFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .textField) + textField = textFieldDecoded + let metadataFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metadataField) + metadataField = metadataFieldDecoded + } +} + +extension BedrockAgentClientTypes { + /// A mapping of Bedrock Knowledge Base fields to RDS column names + public struct RdsFieldMapping: Swift.Equatable { + /// Name of the column + /// This member is required. + public var metadataField: Swift.String? + /// Name of the column + /// This member is required. + public var primaryKeyField: Swift.String? + /// Name of the column + /// This member is required. + public var textField: Swift.String? + /// Name of the column + /// This member is required. + public var vectorField: Swift.String? + + public init( + metadataField: Swift.String? = nil, + primaryKeyField: Swift.String? = nil, + textField: Swift.String? = nil, + vectorField: Swift.String? = nil + ) + { + self.metadataField = metadataField + self.primaryKeyField = primaryKeyField + self.textField = textField + self.vectorField = vectorField + } + } + +} + extension BedrockAgentClientTypes.RedisEnterpriseCloudConfiguration: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case credentialsSecretArn @@ -8480,6 +8632,7 @@ extension BedrockAgentClientTypes.StorageConfiguration: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case opensearchServerlessConfiguration case pineconeConfiguration + case rdsConfiguration case redisEnterpriseCloudConfiguration case type } @@ -8492,6 +8645,9 @@ extension BedrockAgentClientTypes.StorageConfiguration: Swift.Codable { if let pineconeConfiguration = self.pineconeConfiguration { try encodeContainer.encode(pineconeConfiguration, forKey: .pineconeConfiguration) } + if let rdsConfiguration = self.rdsConfiguration { + try encodeContainer.encode(rdsConfiguration, forKey: .rdsConfiguration) + } if let redisEnterpriseCloudConfiguration = self.redisEnterpriseCloudConfiguration { try encodeContainer.encode(redisEnterpriseCloudConfiguration, forKey: .redisEnterpriseCloudConfiguration) } @@ -8510,6 +8666,8 @@ extension BedrockAgentClientTypes.StorageConfiguration: Swift.Codable { pineconeConfiguration = pineconeConfigurationDecoded let redisEnterpriseCloudConfigurationDecoded = try containerValues.decodeIfPresent(BedrockAgentClientTypes.RedisEnterpriseCloudConfiguration.self, forKey: .redisEnterpriseCloudConfiguration) redisEnterpriseCloudConfiguration = redisEnterpriseCloudConfigurationDecoded + let rdsConfigurationDecoded = try containerValues.decodeIfPresent(BedrockAgentClientTypes.RdsConfiguration.self, forKey: .rdsConfiguration) + rdsConfiguration = rdsConfigurationDecoded } } @@ -8520,6 +8678,8 @@ extension BedrockAgentClientTypes { public var opensearchServerlessConfiguration: BedrockAgentClientTypes.OpenSearchServerlessConfiguration? /// Contains the configurations to use Pinecone to store knowledge base data. public var pineconeConfiguration: BedrockAgentClientTypes.PineconeConfiguration? + /// Contains the configurations to use RDS to store knowledge base data. + public var rdsConfiguration: BedrockAgentClientTypes.RdsConfiguration? /// Contains the configurations to use Redis Enterprise Cloud to store knowledge base data. public var redisEnterpriseCloudConfiguration: BedrockAgentClientTypes.RedisEnterpriseCloudConfiguration? /// The storage type of a knowledge base. @@ -8529,12 +8689,14 @@ extension BedrockAgentClientTypes { public init( opensearchServerlessConfiguration: BedrockAgentClientTypes.OpenSearchServerlessConfiguration? = nil, pineconeConfiguration: BedrockAgentClientTypes.PineconeConfiguration? = nil, + rdsConfiguration: BedrockAgentClientTypes.RdsConfiguration? = nil, redisEnterpriseCloudConfiguration: BedrockAgentClientTypes.RedisEnterpriseCloudConfiguration? = nil, type: BedrockAgentClientTypes.KnowledgeBaseStorageType? = nil ) { self.opensearchServerlessConfiguration = opensearchServerlessConfiguration self.pineconeConfiguration = pineconeConfiguration + self.rdsConfiguration = rdsConfiguration self.redisEnterpriseCloudConfiguration = redisEnterpriseCloudConfiguration self.type = type } diff --git a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift index 4dd535fab8a..29b46207360 100644 --- a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift +++ b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift @@ -459,7 +459,11 @@ extension CloudWatchLogsClient: CloudWatchLogsClientProtocol { /// Performs the `DeleteAccountPolicy` operation on the `Logs_20140328` service. /// - /// Deletes a CloudWatch Logs account policy. To use this operation, you must be signed on with the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions. + /// Deletes a CloudWatch Logs account policy. This stops the policy from applying to all log groups or a subset of log groups in the account. Log-group level policies will still be in effect. To use this operation, you must be signed on with the correct permissions depending on the type of policy that you are deleting. + /// + /// * To delete a data protection policy, you must have the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions. + /// + /// * To delete a subscription filter policy, you must have the logs:DeleteSubscriptionFilter and logs:DeleteAccountPolicy permissions. /// /// - Parameter DeleteAccountPolicyInput : [no documentation found] /// @@ -2653,7 +2657,18 @@ extension CloudWatchLogsClient: CloudWatchLogsClientProtocol { /// Performs the `PutAccountPolicy` operation on the `Logs_20140328` service. /// - /// Creates an account-level data protection policy that applies to all log groups in the account. A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level policy. Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked. If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked. By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command. For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions. The PutAccountPolicy operation applies to all log groups in the account. You can also use [PutDataProtectionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked. + /// Creates an account-level data protection policy or subscription filter policy that applies to all log groups or a subset of log groups in the account. Data protection policy A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level data protection policy. Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked. If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account-level policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked. By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command. For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). To use the PutAccountPolicy operation for a data protection policy, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions. The PutAccountPolicy operation applies to all log groups in the account. You can use [PutDataProtectionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked. Subscription filter policy A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other Amazon Web Services services. Account-level subscription filter policies apply to both existing log groups and log groups that are created later in this account. Supported destinations are Kinesis Data Streams, Kinesis Data Firehose, and Lambda. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format. The following destinations are supported for subscription filters: + /// + /// * An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * A Lambda function in the same account as the subscription policy, for same-account delivery. + /// + /// * A logical destination in a different account created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html), for cross-account delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations. + /// + /// + /// Each account can have one account-level subscription filter policy. If you are updating an existing filter, you must specify the correct name in PolicyName. To perform a PutAccountPolicy subscription filter operation for any destination except a Lambda function, you must also have the iam:PassRole permission. /// /// - Parameter PutAccountPolicyInput : [no documentation found] /// @@ -3384,7 +3399,7 @@ extension CloudWatchLogsClient: CloudWatchLogsClientProtocol { /// * A [SessionTimeoutException](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionTimeoutException.html) object is returned when the session times out, after it has been kept open for three hours. /// /// - /// You can end a session before it times out by closing the session stream or by closing the client that is receiving the stream. The session also ends if the established connection between the client and the server breaks. + /// You can end a session before it times out by closing the session stream or by closing the client that is receiving the stream. The session also ends if the established connection between the client and the server breaks. For examples of using an SDK to start a Live Tail session, see [ Start a Live Tail session using an Amazon Web Services SDK](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/example_cloudwatch-logs_StartLiveTail_section.html). /// /// - Parameter StartLiveTailInput : [no documentation found] /// diff --git a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClientProtocol.swift b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClientProtocol.swift index 6a423c288cc..4c853b6efd0 100644 --- a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClientProtocol.swift +++ b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClientProtocol.swift @@ -164,7 +164,11 @@ public protocol CloudWatchLogsClientProtocol { func createLogStream(input: CreateLogStreamInput) async throws -> CreateLogStreamOutput /// Performs the `DeleteAccountPolicy` operation on the `Logs_20140328` service. /// - /// Deletes a CloudWatch Logs account policy. To use this operation, you must be signed on with the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions. + /// Deletes a CloudWatch Logs account policy. This stops the policy from applying to all log groups or a subset of log groups in the account. Log-group level policies will still be in effect. To use this operation, you must be signed on with the correct permissions depending on the type of policy that you are deleting. + /// + /// * To delete a data protection policy, you must have the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions. + /// + /// * To delete a subscription filter policy, you must have the logs:DeleteSubscriptionFilter and logs:DeleteAccountPolicy permissions. /// /// - Parameter DeleteAccountPolicyInput : [no documentation found] /// @@ -862,7 +866,18 @@ public protocol CloudWatchLogsClientProtocol { func listTagsLogGroup(input: ListTagsLogGroupInput) async throws -> ListTagsLogGroupOutput /// Performs the `PutAccountPolicy` operation on the `Logs_20140328` service. /// - /// Creates an account-level data protection policy that applies to all log groups in the account. A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level policy. Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked. If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked. By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command. For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions. The PutAccountPolicy operation applies to all log groups in the account. You can also use [PutDataProtectionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked. + /// Creates an account-level data protection policy or subscription filter policy that applies to all log groups or a subset of log groups in the account. Data protection policy A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level data protection policy. Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked. If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account-level policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked. By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command. For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). To use the PutAccountPolicy operation for a data protection policy, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions. The PutAccountPolicy operation applies to all log groups in the account. You can use [PutDataProtectionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked. Subscription filter policy A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other Amazon Web Services services. Account-level subscription filter policies apply to both existing log groups and log groups that are created later in this account. Supported destinations are Kinesis Data Streams, Kinesis Data Firehose, and Lambda. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format. The following destinations are supported for subscription filters: + /// + /// * An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * A Lambda function in the same account as the subscription policy, for same-account delivery. + /// + /// * A logical destination in a different account created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html), for cross-account delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations. + /// + /// + /// Each account can have one account-level subscription filter policy. If you are updating an existing filter, you must specify the correct name in PolicyName. To perform a PutAccountPolicy subscription filter operation for any destination except a Lambda function, you must also have the iam:PassRole permission. /// /// - Parameter PutAccountPolicyInput : [no documentation found] /// @@ -1150,7 +1165,7 @@ public protocol CloudWatchLogsClientProtocol { /// * A [SessionTimeoutException](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionTimeoutException.html) object is returned when the session times out, after it has been kept open for three hours. /// /// - /// You can end a session before it times out by closing the session stream or by closing the client that is receiving the stream. The session also ends if the established connection between the client and the server breaks. + /// You can end a session before it times out by closing the session stream or by closing the client that is receiving the stream. The session also ends if the established connection between the client and the server breaks. For examples of using an SDK to start a Live Tail session, see [ Start a Live Tail session using an Amazon Web Services SDK](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/example_cloudwatch-logs_StartLiveTail_section.html). /// /// - Parameter StartLiveTailInput : [no documentation found] /// diff --git a/Sources/Services/AWSCloudWatchLogs/models/Models.swift b/Sources/Services/AWSCloudWatchLogs/models/Models.swift index 966026cdf14..6474f42b712 100644 --- a/Sources/Services/AWSCloudWatchLogs/models/Models.swift +++ b/Sources/Services/AWSCloudWatchLogs/models/Models.swift @@ -65,6 +65,7 @@ extension CloudWatchLogsClientTypes.AccountPolicy: Swift.Codable { case policyName case policyType case scope + case selectionCriteria } public func encode(to encoder: Swift.Encoder) throws { @@ -87,6 +88,9 @@ extension CloudWatchLogsClientTypes.AccountPolicy: Swift.Codable { if let scope = self.scope { try encodeContainer.encode(scope.rawValue, forKey: .scope) } + if let selectionCriteria = self.selectionCriteria { + try encodeContainer.encode(selectionCriteria, forKey: .selectionCriteria) + } } public init(from decoder: Swift.Decoder) throws { @@ -101,6 +105,8 @@ extension CloudWatchLogsClientTypes.AccountPolicy: Swift.Codable { policyType = policyTypeDecoded let scopeDecoded = try containerValues.decodeIfPresent(CloudWatchLogsClientTypes.Scope.self, forKey: .scope) scope = scopeDecoded + let selectionCriteriaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .selectionCriteria) + selectionCriteria = selectionCriteriaDecoded let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) accountId = accountIdDecoded } @@ -121,6 +127,8 @@ extension CloudWatchLogsClientTypes { public var policyType: CloudWatchLogsClientTypes.PolicyType? /// The scope of the account policy. public var scope: CloudWatchLogsClientTypes.Scope? + /// The log group selection criteria for this subscription filter policy. + public var selectionCriteria: Swift.String? public init( accountId: Swift.String? = nil, @@ -128,7 +136,8 @@ extension CloudWatchLogsClientTypes { policyDocument: Swift.String? = nil, policyName: Swift.String? = nil, policyType: CloudWatchLogsClientTypes.PolicyType? = nil, - scope: CloudWatchLogsClientTypes.Scope? = nil + scope: CloudWatchLogsClientTypes.Scope? = nil, + selectionCriteria: Swift.String? = nil ) { self.accountId = accountId @@ -137,6 +146,7 @@ extension CloudWatchLogsClientTypes { self.policyName = policyName self.policyType = policyType self.scope = scope + self.selectionCriteria = selectionCriteria } } @@ -1393,7 +1403,7 @@ public struct CreateLogGroupInput: Swift.Equatable { /// * The Infrequent Access log class supports a subset of CloudWatch Logs features and incurs lower costs. /// /// - /// If you omit this parameter, the default of STANDARD is used. After a log group is created, its class can't be changed. For details about the features supported by each class, see [Log classes](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html) + /// If you omit this parameter, the default of STANDARD is used. The value of logGroupClass can't be changed after a log group is created. For details about the features supported by each class, see [Log classes](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html) public var logGroupClass: CloudWatchLogsClientTypes.LogGroupClass? /// A name for the log group. /// This member is required. @@ -1691,7 +1701,7 @@ public struct DeleteAccountPolicyInput: Swift.Equatable { /// The name of the policy to delete. /// This member is required. public var policyName: Swift.String? - /// The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY. + /// The type of policy to delete. /// This member is required. public var policyType: CloudWatchLogsClientTypes.PolicyType? @@ -3260,7 +3270,7 @@ public struct DescribeAccountPoliciesInput: Swift.Equatable { public var accountIdentifiers: [Swift.String]? /// Use this parameter to limit the returned policies to only the policy with the name that you specify. public var policyName: Swift.String? - /// Use this parameter to limit the returned policies to only the policies that match the policy type that you specify. Currently, the only valid value is DATA_PROTECTION_POLICY. + /// Use this parameter to limit the returned policies to only the policies that match the policy type that you specify. /// This member is required. public var policyType: CloudWatchLogsClientTypes.PolicyType? @@ -9486,11 +9496,13 @@ extension CloudWatchLogsClientTypes { extension CloudWatchLogsClientTypes { public enum PolicyType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case dataProtectionPolicy + case subscriptionFilterPolicy case sdkUnknown(Swift.String) public static var allCases: [PolicyType] { return [ .dataProtectionPolicy, + .subscriptionFilterPolicy, .sdkUnknown("") ] } @@ -9501,6 +9513,7 @@ extension CloudWatchLogsClientTypes { public var rawValue: Swift.String { switch self { case .dataProtectionPolicy: return "DATA_PROTECTION_POLICY" + case .subscriptionFilterPolicy: return "SUBSCRIPTION_FILTER_POLICY" case let .sdkUnknown(s): return s } } @@ -9518,6 +9531,7 @@ extension PutAccountPolicyInput: Swift.Encodable { case policyName case policyType case scope + case selectionCriteria } public func encode(to encoder: Swift.Encoder) throws { @@ -9534,6 +9548,9 @@ extension PutAccountPolicyInput: Swift.Encodable { if let scope = self.scope { try encodeContainer.encode(scope.rawValue, forKey: .scope) } + if let selectionCriteria = self.selectionCriteria { + try encodeContainer.encode(selectionCriteria, forKey: .selectionCriteria) + } } } @@ -9544,36 +9561,59 @@ extension PutAccountPolicyInput: ClientRuntime.URLPathProvider { } public struct PutAccountPolicyInput: Swift.Equatable { - /// Specify the data protection policy, in JSON. This policy must include two JSON blocks: + /// Specify the policy, in JSON. Data protection policy A data protection policy must include two JSON blocks: /// /// * The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see [Types of data that you can mask](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). The Operation property with an Audit action is required to find the sensitive data terms. This Audit action must contain a FindingsDestination object. You can optionally use that FindingsDestination object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Kinesis Data Firehose streams, and S3 buckets, they must already exist. /// /// * The second block must include both a DataIdentifer array and an Operation property with an Deidentify action. The DataIdentifer array must exactly match the DataIdentifer array in the first block of the policy. The Operation property with the Deidentify action is what actually masks the data, and it must contain the "MaskConfig": {} object. The "MaskConfig": {} object must be empty. /// /// - /// For an example data protection policy, see the Examples section on this page. The contents of the two DataIdentifer arrays must match exactly. In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is different than the operation's policyName parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch. The JSON specified in policyDocument can be up to 30,720 characters. + /// For an example data protection policy, see the Examples section on this page. The contents of the two DataIdentifer arrays must match exactly. In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is different than the operation's policyName parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch. The JSON specified in policyDocument can be up to 30,720 characters long. Subscription filter policy A subscription filter policy can include the following attributes in a JSON block: + /// + /// * DestinationArn The ARN of the destination to deliver log events to. Supported destinations are: + /// + /// * An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * A Lambda function in the same account as the subscription policy, for same-account delivery. + /// + /// * A logical destination in a different account created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html), for cross-account delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations. + /// + /// + /// + /// + /// * RoleArn The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. + /// + /// * FilterPattern A filter pattern for subscribing to a filtered stream of log events. + /// + /// * DistributionThe method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to Random for a more even distribution. This property is only applicable when the destination is an Kinesis Data Streams data stream. /// This member is required. public var policyDocument: Swift.String? /// A name for the policy. This must be unique within the account. /// This member is required. public var policyName: Swift.String? - /// Currently the only valid value for this parameter is DATA_PROTECTION_POLICY. + /// The type of policy that you're creating or updating. /// This member is required. public var policyType: CloudWatchLogsClientTypes.PolicyType? /// Currently the only valid value for this parameter is ALL, which specifies that the data protection policy applies to all log groups in the account. If you omit this parameter, the default of ALL is used. public var scope: CloudWatchLogsClientTypes.Scope? + /// Use this parameter to apply the subscription filter policy to a subset of log groups in the account. Currently, the only supported filter is LogGroupName NOT IN []. The selectionCriteria string can be up to 25KB in length. The length is determined by using its UTF-8 bytes. Using the selectionCriteria parameter is useful to help prevent infinite loops. For more information, see [Log recursion prevention](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions-recursion-prevention.html). Specifing selectionCriteria is valid only when you specify SUBSCRIPTION_FILTER_POLICY for policyType. + public var selectionCriteria: Swift.String? public init( policyDocument: Swift.String? = nil, policyName: Swift.String? = nil, policyType: CloudWatchLogsClientTypes.PolicyType? = nil, - scope: CloudWatchLogsClientTypes.Scope? = nil + scope: CloudWatchLogsClientTypes.Scope? = nil, + selectionCriteria: Swift.String? = nil ) { self.policyDocument = policyDocument self.policyName = policyName self.policyType = policyType self.scope = scope + self.selectionCriteria = selectionCriteria } } @@ -9582,6 +9622,7 @@ struct PutAccountPolicyInputBody: Swift.Equatable { let policyDocument: Swift.String? let policyType: CloudWatchLogsClientTypes.PolicyType? let scope: CloudWatchLogsClientTypes.Scope? + let selectionCriteria: Swift.String? } extension PutAccountPolicyInputBody: Swift.Decodable { @@ -9590,6 +9631,7 @@ extension PutAccountPolicyInputBody: Swift.Decodable { case policyName case policyType case scope + case selectionCriteria } public init(from decoder: Swift.Decoder) throws { @@ -9602,6 +9644,8 @@ extension PutAccountPolicyInputBody: Swift.Decodable { policyType = policyTypeDecoded let scopeDecoded = try containerValues.decodeIfPresent(CloudWatchLogsClientTypes.Scope.self, forKey: .scope) scope = scopeDecoded + let selectionCriteriaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .selectionCriteria) + selectionCriteria = selectionCriteriaDecoded } } @@ -12305,9 +12349,9 @@ public struct StartLiveTailInput: Swift.Equatable { /// An array where each item in the array is a log group to include in the Live Tail session. Specify each log group by its ARN. If you specify an ARN, the ARN can't end with an asterisk (*). You can include up to 10 log groups. /// This member is required. public var logGroupIdentifiers: [Swift.String]? - /// If you specify this parameter, then only log events in the log streams that have names that start with the prefixes that you specify here are included in the Live Tail session. You can specify this parameter only if you specify only one log group in logGroupIdentifiers. + /// If you specify this parameter, then only log events in the log streams that have names that start with the prefixes that you specify here are included in the Live Tail session. If you specify this field, you can't also specify the logStreamNames field. You can specify this parameter only if you specify only one log group in logGroupIdentifiers. public var logStreamNamePrefixes: [Swift.String]? - /// If you specify this parameter, then only log events in the log streams that you specify here are included in the Live Tail session. You can specify this parameter only if you specify only one log group in logGroupIdentifiers. + /// If you specify this parameter, then only log events in the log streams that you specify here are included in the Live Tail session. If you specify this field, you can't also specify the logStreamNamePrefixes field. You can specify this parameter only if you specify only one log group in logGroupIdentifiers. public var logStreamNames: [Swift.String]? public init( diff --git a/Sources/Services/AWSCodeBuild/models/Models.swift b/Sources/Services/AWSCodeBuild/models/Models.swift index 1d5619036db..5de9f8c1713 100644 --- a/Sources/Services/AWSCodeBuild/models/Models.swift +++ b/Sources/Services/AWSCodeBuild/models/Models.swift @@ -3094,6 +3094,7 @@ extension CodeBuildClientTypes { case buildGeneral1Large case buildGeneral1Medium case buildGeneral1Small + case buildGeneral1Xlarge case buildLambda10gb case buildLambda1gb case buildLambda2gb @@ -3107,6 +3108,7 @@ extension CodeBuildClientTypes { .buildGeneral1Large, .buildGeneral1Medium, .buildGeneral1Small, + .buildGeneral1Xlarge, .buildLambda10gb, .buildLambda1gb, .buildLambda2gb, @@ -3125,6 +3127,7 @@ extension CodeBuildClientTypes { case .buildGeneral1Large: return "BUILD_GENERAL1_LARGE" case .buildGeneral1Medium: return "BUILD_GENERAL1_MEDIUM" case .buildGeneral1Small: return "BUILD_GENERAL1_SMALL" + case .buildGeneral1Xlarge: return "BUILD_GENERAL1_XLARGE" case .buildLambda10gb: return "BUILD_LAMBDA_10GB" case .buildLambda1gb: return "BUILD_LAMBDA_1GB" case .buildLambda2gb: return "BUILD_LAMBDA_2GB" @@ -8916,6 +8919,8 @@ extension CodeBuildClientTypes { /// /// * BUILD_GENERAL1_LARGE: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. /// + /// * BUILD_GENERAL1_XLARGE: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. + /// /// * BUILD_GENERAL1_2XLARGE: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed. /// /// * BUILD_LAMBDA_1GB: Use up to 1 GB memory for builds. Only available for environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER. diff --git a/Sources/Services/AWSCodeCommit/CodeCommitClient.swift b/Sources/Services/AWSCodeCommit/CodeCommitClient.swift index f74dab8a5a3..afdcb31281b 100644 --- a/Sources/Services/AWSCodeCommit/CodeCommitClient.swift +++ b/Sources/Services/AWSCodeCommit/CodeCommitClient.swift @@ -758,6 +758,8 @@ extension CodeCommitClient: CodeCommitClientProtocol { /// - `EncryptionIntegrityChecksFailedException` : An encryption integrity check failed. /// - `EncryptionKeyAccessDeniedException` : An encryption key could not be accessed. /// - `EncryptionKeyDisabledException` : The encryption key is disabled. + /// - `EncryptionKeyInvalidIdException` : The Key Management Service encryption key is not valid. + /// - `EncryptionKeyInvalidUsageException` : A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation. /// - `EncryptionKeyNotFoundException` : No encryption key was found. /// - `EncryptionKeyUnavailableException` : The encryption key is not available. /// - `InvalidRepositoryDescriptionException` : The specified repository description is not valid. @@ -4693,6 +4695,63 @@ extension CodeCommitClient: CodeCommitClientProtocol { return result } + /// Performs the `UpdateRepositoryEncryptionKey` operation on the `CodeCommit_20150413` service. + /// + /// Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository. + /// + /// - Parameter UpdateRepositoryEncryptionKeyInput : [no documentation found] + /// + /// - Returns: `UpdateRepositoryEncryptionKeyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `EncryptionIntegrityChecksFailedException` : An encryption integrity check failed. + /// - `EncryptionKeyAccessDeniedException` : An encryption key could not be accessed. + /// - `EncryptionKeyDisabledException` : The encryption key is disabled. + /// - `EncryptionKeyInvalidIdException` : The Key Management Service encryption key is not valid. + /// - `EncryptionKeyInvalidUsageException` : A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation. + /// - `EncryptionKeyNotFoundException` : No encryption key was found. + /// - `EncryptionKeyRequiredException` : A KMS encryption key ID is required but was not specified. + /// - `EncryptionKeyUnavailableException` : The encryption key is not available. + /// - `InvalidRepositoryNameException` : A specified repository name is not valid. This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist. + /// - `RepositoryDoesNotExistException` : The specified repository does not exist. + /// - `RepositoryNameRequiredException` : A repository name is required, but was not specified. + public func updateRepositoryEncryptionKey(input: UpdateRepositoryEncryptionKeyInput) async throws -> UpdateRepositoryEncryptionKeyOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "updateRepositoryEncryptionKey") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "codecommit") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "updateRepositoryEncryptionKey") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "CodeCommit_20150413.UpdateRepositoryEncryptionKey")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.1")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateRepositoryEncryptionKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `UpdateRepositoryName` operation on the `CodeCommit_20150413` service. /// /// Renames a repository. The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix .git is prohibited. For more information about the limits on repository names, see [Quotas](https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) in the CodeCommit User Guide. diff --git a/Sources/Services/AWSCodeCommit/CodeCommitClientProtocol.swift b/Sources/Services/AWSCodeCommit/CodeCommitClientProtocol.swift index 125e28d09f2..13bae15888b 100644 --- a/Sources/Services/AWSCodeCommit/CodeCommitClientProtocol.swift +++ b/Sources/Services/AWSCodeCommit/CodeCommitClientProtocol.swift @@ -16,6 +16,8 @@ import ClientRuntime /// /// * [UpdateRepositoryDescription], which sets or updates the description of the repository. /// +/// * [UpdateRepositoryEncryptionKey], which updates the Key Management Service encryption key used to encrypt and decrypt a repository. +/// /// * [UpdateRepositoryName], which changes the name of the repository. If you change the name of a repository, no other users of that repository can access it until you send them the new HTTPS or SSH URL to use. /// /// @@ -506,6 +508,8 @@ public protocol CodeCommitClientProtocol { /// - `EncryptionIntegrityChecksFailedException` : An encryption integrity check failed. /// - `EncryptionKeyAccessDeniedException` : An encryption key could not be accessed. /// - `EncryptionKeyDisabledException` : The encryption key is disabled. + /// - `EncryptionKeyInvalidIdException` : The Key Management Service encryption key is not valid. + /// - `EncryptionKeyInvalidUsageException` : A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation. /// - `EncryptionKeyNotFoundException` : No encryption key was found. /// - `EncryptionKeyUnavailableException` : The encryption key is not available. /// - `InvalidRepositoryDescriptionException` : The specified repository description is not valid. @@ -2194,6 +2198,29 @@ public protocol CodeCommitClientProtocol { /// - `RepositoryDoesNotExistException` : The specified repository does not exist. /// - `RepositoryNameRequiredException` : A repository name is required, but was not specified. func updateRepositoryDescription(input: UpdateRepositoryDescriptionInput) async throws -> UpdateRepositoryDescriptionOutput + /// Performs the `UpdateRepositoryEncryptionKey` operation on the `CodeCommit_20150413` service. + /// + /// Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository. + /// + /// - Parameter UpdateRepositoryEncryptionKeyInput : [no documentation found] + /// + /// - Returns: `UpdateRepositoryEncryptionKeyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `EncryptionIntegrityChecksFailedException` : An encryption integrity check failed. + /// - `EncryptionKeyAccessDeniedException` : An encryption key could not be accessed. + /// - `EncryptionKeyDisabledException` : The encryption key is disabled. + /// - `EncryptionKeyInvalidIdException` : The Key Management Service encryption key is not valid. + /// - `EncryptionKeyInvalidUsageException` : A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation. + /// - `EncryptionKeyNotFoundException` : No encryption key was found. + /// - `EncryptionKeyRequiredException` : A KMS encryption key ID is required but was not specified. + /// - `EncryptionKeyUnavailableException` : The encryption key is not available. + /// - `InvalidRepositoryNameException` : A specified repository name is not valid. This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist. + /// - `RepositoryDoesNotExistException` : The specified repository does not exist. + /// - `RepositoryNameRequiredException` : A repository name is required, but was not specified. + func updateRepositoryEncryptionKey(input: UpdateRepositoryEncryptionKeyInput) async throws -> UpdateRepositoryEncryptionKeyOutput /// Performs the `UpdateRepositoryName` operation on the `CodeCommit_20150413` service. /// /// Renames a repository. The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix .git is prohibited. For more information about the limits on repository names, see [Quotas](https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) in the CodeCommit User Guide. diff --git a/Sources/Services/AWSCodeCommit/models/Models.swift b/Sources/Services/AWSCodeCommit/models/Models.swift index 965a30650e2..f0c95c471c5 100644 --- a/Sources/Services/AWSCodeCommit/models/Models.swift +++ b/Sources/Services/AWSCodeCommit/models/Models.swift @@ -2222,6 +2222,115 @@ enum BatchGetCommitsOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension CodeCommitClientTypes.BatchGetRepositoriesError: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case errorCode + case errorMessage + case repositoryId + case repositoryName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let errorCode = self.errorCode { + try encodeContainer.encode(errorCode.rawValue, forKey: .errorCode) + } + if let errorMessage = self.errorMessage { + try encodeContainer.encode(errorMessage, forKey: .errorMessage) + } + if let repositoryId = self.repositoryId { + try encodeContainer.encode(repositoryId, forKey: .repositoryId) + } + if let repositoryName = self.repositoryName { + try encodeContainer.encode(repositoryName, forKey: .repositoryName) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let repositoryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .repositoryId) + repositoryId = repositoryIdDecoded + let repositoryNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .repositoryName) + repositoryName = repositoryNameDecoded + let errorCodeDecoded = try containerValues.decodeIfPresent(CodeCommitClientTypes.BatchGetRepositoriesErrorCodeEnum.self, forKey: .errorCode) + errorCode = errorCodeDecoded + let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) + errorMessage = errorMessageDecoded + } +} + +extension CodeCommitClientTypes { + /// Returns information about errors in a BatchGetRepositories operation. + public struct BatchGetRepositoriesError: Swift.Equatable { + /// An error code that specifies the type of failure. + public var errorCode: CodeCommitClientTypes.BatchGetRepositoriesErrorCodeEnum? + /// An error message that provides detail about why the repository either was not found or was not in a valid state. + public var errorMessage: Swift.String? + /// The ID of a repository that either could not be found or was not in a valid state. + public var repositoryId: Swift.String? + /// The name of a repository that either could not be found or was not in a valid state. + public var repositoryName: Swift.String? + + public init( + errorCode: CodeCommitClientTypes.BatchGetRepositoriesErrorCodeEnum? = nil, + errorMessage: Swift.String? = nil, + repositoryId: Swift.String? = nil, + repositoryName: Swift.String? = nil + ) + { + self.errorCode = errorCode + self.errorMessage = errorMessage + self.repositoryId = repositoryId + self.repositoryName = repositoryName + } + } + +} + +extension CodeCommitClientTypes { + public enum BatchGetRepositoriesErrorCodeEnum: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case encryptionIntegrityChecksFailedException + case encryptionKeyAccessDeniedException + case encryptionKeyDisabledException + case encryptionKeyNotFoundException + case encryptionKeyUnavailableException + case repositoryDoesNotExistException + case sdkUnknown(Swift.String) + + public static var allCases: [BatchGetRepositoriesErrorCodeEnum] { + return [ + .encryptionIntegrityChecksFailedException, + .encryptionKeyAccessDeniedException, + .encryptionKeyDisabledException, + .encryptionKeyNotFoundException, + .encryptionKeyUnavailableException, + .repositoryDoesNotExistException, + .sdkUnknown("") + ] + } + 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 .encryptionIntegrityChecksFailedException: return "EncryptionIntegrityChecksFailedException" + case .encryptionKeyAccessDeniedException: return "EncryptionKeyAccessDeniedException" + case .encryptionKeyDisabledException: return "EncryptionKeyDisabledException" + case .encryptionKeyNotFoundException: return "EncryptionKeyNotFoundException" + case .encryptionKeyUnavailableException: return "EncryptionKeyUnavailableException" + case .repositoryDoesNotExistException: return "RepositoryDoesNotExistException" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = BatchGetRepositoriesErrorCodeEnum(rawValue: rawValue) ?? BatchGetRepositoriesErrorCodeEnum.sdkUnknown(rawValue) + } + } +} + extension BatchGetRepositoriesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case repositoryNames @@ -2288,9 +2397,11 @@ extension BatchGetRepositoriesOutput: ClientRuntime.HttpResponseBinding { if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { let output: BatchGetRepositoriesOutputBody = try responseDecoder.decode(responseBody: data) + self.errors = output.errors self.repositories = output.repositories self.repositoriesNotFound = output.repositoriesNotFound } else { + self.errors = nil self.repositories = nil self.repositoriesNotFound = nil } @@ -2299,16 +2410,20 @@ extension BatchGetRepositoriesOutput: ClientRuntime.HttpResponseBinding { /// Represents the output of a batch get repositories operation. public struct BatchGetRepositoriesOutput: Swift.Equatable { + /// Returns information about any errors returned when attempting to retrieve information about the repositories. + public var errors: [CodeCommitClientTypes.BatchGetRepositoriesError]? /// A list of repositories returned by the batch get repositories operation. public var repositories: [CodeCommitClientTypes.RepositoryMetadata]? /// Returns a list of repository names for which information could not be found. public var repositoriesNotFound: [Swift.String]? public init( + errors: [CodeCommitClientTypes.BatchGetRepositoriesError]? = nil, repositories: [CodeCommitClientTypes.RepositoryMetadata]? = nil, repositoriesNotFound: [Swift.String]? = nil ) { + self.errors = errors self.repositories = repositories self.repositoriesNotFound = repositoriesNotFound } @@ -2317,10 +2432,12 @@ public struct BatchGetRepositoriesOutput: Swift.Equatable { struct BatchGetRepositoriesOutputBody: Swift.Equatable { let repositories: [CodeCommitClientTypes.RepositoryMetadata]? let repositoriesNotFound: [Swift.String]? + let errors: [CodeCommitClientTypes.BatchGetRepositoriesError]? } extension BatchGetRepositoriesOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case errors case repositories case repositoriesNotFound } @@ -2349,6 +2466,17 @@ extension BatchGetRepositoriesOutputBody: Swift.Decodable { } } repositoriesNotFound = repositoriesNotFoundDecoded0 + let errorsContainer = try containerValues.decodeIfPresent([CodeCommitClientTypes.BatchGetRepositoriesError?].self, forKey: .errors) + var errorsDecoded0:[CodeCommitClientTypes.BatchGetRepositoriesError]? = nil + if let errorsContainer = errorsContainer { + errorsDecoded0 = [CodeCommitClientTypes.BatchGetRepositoriesError]() + for structure0 in errorsContainer { + if let structure0 = structure0 { + errorsDecoded0?.append(structure0) + } + } + } + errors = errorsDecoded0 } } @@ -5611,6 +5739,7 @@ enum CreatePullRequestOutputError: ClientRuntime.HttpResponseErrorBinding { extension CreateRepositoryInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId case repositoryDescription case repositoryName case tags @@ -5618,6 +5747,9 @@ extension CreateRepositoryInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let kmsKeyId = self.kmsKeyId { + try encodeContainer.encode(kmsKeyId, forKey: .kmsKeyId) + } if let repositoryDescription = self.repositoryDescription { try encodeContainer.encode(repositoryDescription, forKey: .repositoryDescription) } @@ -5641,6 +5773,8 @@ extension CreateRepositoryInput: ClientRuntime.URLPathProvider { /// Represents the input of a create repository operation. public struct CreateRepositoryInput: Swift.Equatable { + /// The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see [KeyId](https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId) in the Decrypt API description in the Key Management Service API Reference. If no key is specified, the default aws/codecommit Amazon Web Services managed key is used. + public var kmsKeyId: Swift.String? /// A comment or description about the new repository. The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage. public var repositoryDescription: Swift.String? /// The name of the new repository to be created. The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see [Quotas](https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) in the CodeCommit User Guide. The suffix .git is prohibited. @@ -5650,11 +5784,13 @@ public struct CreateRepositoryInput: Swift.Equatable { public var tags: [Swift.String:Swift.String]? public init( + kmsKeyId: Swift.String? = nil, repositoryDescription: Swift.String? = nil, repositoryName: Swift.String? = nil, tags: [Swift.String:Swift.String]? = nil ) { + self.kmsKeyId = kmsKeyId self.repositoryDescription = repositoryDescription self.repositoryName = repositoryName self.tags = tags @@ -5665,10 +5801,12 @@ struct CreateRepositoryInputBody: Swift.Equatable { let repositoryName: Swift.String? let repositoryDescription: Swift.String? let tags: [Swift.String:Swift.String]? + let kmsKeyId: Swift.String? } extension CreateRepositoryInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId case repositoryDescription case repositoryName case tags @@ -5691,6 +5829,8 @@ extension CreateRepositoryInputBody: Swift.Decodable { } } tags = tagsDecoded0 + let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) + kmsKeyId = kmsKeyIdDecoded } } @@ -5743,6 +5883,8 @@ enum CreateRepositoryOutputError: ClientRuntime.HttpResponseErrorBinding { case "EncryptionIntegrityChecksFailedException": return try await EncryptionIntegrityChecksFailedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "EncryptionKeyAccessDeniedException": return try await EncryptionKeyAccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "EncryptionKeyDisabledException": return try await EncryptionKeyDisabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyInvalidIdException": return try await EncryptionKeyInvalidIdException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyInvalidUsageException": return try await EncryptionKeyInvalidUsageException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "EncryptionKeyNotFoundException": return try await EncryptionKeyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "EncryptionKeyUnavailableException": return try await EncryptionKeyUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InvalidRepositoryDescriptionException": return try await InvalidRepositoryDescriptionException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) @@ -7752,6 +7894,118 @@ extension EncryptionKeyDisabledExceptionBody: Swift.Decodable { } } +extension EncryptionKeyInvalidIdException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: EncryptionKeyInvalidIdExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The Key Management Service encryption key is not valid. +public struct EncryptionKeyInvalidIdException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// Any message associated with the exception. + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "EncryptionKeyInvalidIdException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct EncryptionKeyInvalidIdExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension EncryptionKeyInvalidIdExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension EncryptionKeyInvalidUsageException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: EncryptionKeyInvalidUsageExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation. +public struct EncryptionKeyInvalidUsageException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// Any message associated with the exception. + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "EncryptionKeyInvalidUsageException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct EncryptionKeyInvalidUsageExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension EncryptionKeyInvalidUsageExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension EncryptionKeyNotFoundException { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { if let data = try await httpResponse.body.readData(), @@ -7808,6 +8062,62 @@ extension EncryptionKeyNotFoundExceptionBody: Swift.Decodable { } } +extension EncryptionKeyRequiredException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: EncryptionKeyRequiredExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// A KMS encryption key ID is required but was not specified. +public struct EncryptionKeyRequiredException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// Any message associated with the exception. + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "EncryptionKeyRequiredException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct EncryptionKeyRequiredExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension EncryptionKeyRequiredExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension EncryptionKeyUnavailableException { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { if let data = try await httpResponse.body.readData(), @@ -23376,6 +23686,7 @@ extension CodeCommitClientTypes.RepositoryMetadata: Swift.Codable { case cloneUrlSsh case creationDate case defaultBranch + case kmsKeyId case lastModifiedDate case repositoryDescription case repositoryId @@ -23402,6 +23713,9 @@ extension CodeCommitClientTypes.RepositoryMetadata: Swift.Codable { if let defaultBranch = self.defaultBranch { try encodeContainer.encode(defaultBranch, forKey: .defaultBranch) } + if let kmsKeyId = self.kmsKeyId { + try encodeContainer.encode(kmsKeyId, forKey: .kmsKeyId) + } if let lastModifiedDate = self.lastModifiedDate { try encodeContainer.encodeTimestamp(lastModifiedDate, format: .epochSeconds, forKey: .lastModifiedDate) } @@ -23438,6 +23752,8 @@ extension CodeCommitClientTypes.RepositoryMetadata: Swift.Codable { cloneUrlSsh = cloneUrlSshDecoded let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) arn = arnDecoded + let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) + kmsKeyId = kmsKeyIdDecoded } } @@ -23456,6 +23772,8 @@ extension CodeCommitClientTypes { public var creationDate: ClientRuntime.Date? /// The repository's default branch name. public var defaultBranch: Swift.String? + /// The ID of the Key Management Service encryption key used to encrypt and decrypt the repository. + public var kmsKeyId: Swift.String? /// The date and time the repository was last modified, in timestamp format. public var lastModifiedDate: ClientRuntime.Date? /// A comment or description about the repository. @@ -23472,6 +23790,7 @@ extension CodeCommitClientTypes { cloneUrlSsh: Swift.String? = nil, creationDate: ClientRuntime.Date? = nil, defaultBranch: Swift.String? = nil, + kmsKeyId: Swift.String? = nil, lastModifiedDate: ClientRuntime.Date? = nil, repositoryDescription: Swift.String? = nil, repositoryId: Swift.String? = nil, @@ -23484,6 +23803,7 @@ extension CodeCommitClientTypes { self.cloneUrlSsh = cloneUrlSsh self.creationDate = creationDate self.defaultBranch = defaultBranch + self.kmsKeyId = kmsKeyId self.lastModifiedDate = lastModifiedDate self.repositoryDescription = repositoryDescription self.repositoryId = repositoryId @@ -27157,6 +27477,148 @@ enum UpdateRepositoryDescriptionOutputError: ClientRuntime.HttpResponseErrorBind } } +extension UpdateRepositoryEncryptionKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId + case repositoryName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let kmsKeyId = self.kmsKeyId { + try encodeContainer.encode(kmsKeyId, forKey: .kmsKeyId) + } + if let repositoryName = self.repositoryName { + try encodeContainer.encode(repositoryName, forKey: .repositoryName) + } + } +} + +extension UpdateRepositoryEncryptionKeyInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct UpdateRepositoryEncryptionKeyInput: Swift.Equatable { + /// The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for keyID, see [KeyId](https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId) in the Decrypt API description in the Key Management Service API Reference. + /// This member is required. + public var kmsKeyId: Swift.String? + /// The name of the repository for which you want to update the KMS encryption key used to encrypt and decrypt the repository. + /// This member is required. + public var repositoryName: Swift.String? + + public init( + kmsKeyId: Swift.String? = nil, + repositoryName: Swift.String? = nil + ) + { + self.kmsKeyId = kmsKeyId + self.repositoryName = repositoryName + } +} + +struct UpdateRepositoryEncryptionKeyInputBody: Swift.Equatable { + let repositoryName: Swift.String? + let kmsKeyId: Swift.String? +} + +extension UpdateRepositoryEncryptionKeyInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId + case repositoryName + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let repositoryNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .repositoryName) + repositoryName = repositoryNameDecoded + let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) + kmsKeyId = kmsKeyIdDecoded + } +} + +extension UpdateRepositoryEncryptionKeyOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: UpdateRepositoryEncryptionKeyOutputBody = try responseDecoder.decode(responseBody: data) + self.kmsKeyId = output.kmsKeyId + self.originalKmsKeyId = output.originalKmsKeyId + self.repositoryId = output.repositoryId + } else { + self.kmsKeyId = nil + self.originalKmsKeyId = nil + self.repositoryId = nil + } + } +} + +public struct UpdateRepositoryEncryptionKeyOutput: Swift.Equatable { + /// The ID of the encryption key. + public var kmsKeyId: Swift.String? + /// The ID of the encryption key formerly used to encrypt and decrypt the repository. + public var originalKmsKeyId: Swift.String? + /// The ID of the repository. + public var repositoryId: Swift.String? + + public init( + kmsKeyId: Swift.String? = nil, + originalKmsKeyId: Swift.String? = nil, + repositoryId: Swift.String? = nil + ) + { + self.kmsKeyId = kmsKeyId + self.originalKmsKeyId = originalKmsKeyId + self.repositoryId = repositoryId + } +} + +struct UpdateRepositoryEncryptionKeyOutputBody: Swift.Equatable { + let repositoryId: Swift.String? + let kmsKeyId: Swift.String? + let originalKmsKeyId: Swift.String? +} + +extension UpdateRepositoryEncryptionKeyOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId + case originalKmsKeyId + case repositoryId + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let repositoryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .repositoryId) + repositoryId = repositoryIdDecoded + let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) + kmsKeyId = kmsKeyIdDecoded + let originalKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalKmsKeyId) + originalKmsKeyId = originalKmsKeyIdDecoded + } +} + +enum UpdateRepositoryEncryptionKeyOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "EncryptionIntegrityChecksFailedException": return try await EncryptionIntegrityChecksFailedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyAccessDeniedException": return try await EncryptionKeyAccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyDisabledException": return try await EncryptionKeyDisabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyInvalidIdException": return try await EncryptionKeyInvalidIdException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyInvalidUsageException": return try await EncryptionKeyInvalidUsageException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyNotFoundException": return try await EncryptionKeyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyRequiredException": return try await EncryptionKeyRequiredException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "EncryptionKeyUnavailableException": return try await EncryptionKeyUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRepositoryNameException": return try await InvalidRepositoryNameException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RepositoryDoesNotExistException": return try await RepositoryDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RepositoryNameRequiredException": return try await RepositoryNameRequiredException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension UpdateRepositoryNameInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case newName diff --git a/Sources/Services/AWSCodeStarconnections/models/Models.swift b/Sources/Services/AWSCodeStarconnections/models/Models.swift index 2481cd8699a..fdc420366e6 100644 --- a/Sources/Services/AWSCodeStarconnections/models/Models.swift +++ b/Sources/Services/AWSCodeStarconnections/models/Models.swift @@ -3325,6 +3325,7 @@ extension CodeStarconnectionsClientTypes { case github case githubEnterpriseServer case gitlab + case gitlabSelfManaged case sdkUnknown(Swift.String) public static var allCases: [ProviderType] { @@ -3333,6 +3334,7 @@ extension CodeStarconnectionsClientTypes { .github, .githubEnterpriseServer, .gitlab, + .gitlabSelfManaged, .sdkUnknown("") ] } @@ -3346,6 +3348,7 @@ extension CodeStarconnectionsClientTypes { case .github: return "GitHub" case .githubEnterpriseServer: return "GitHubEnterpriseServer" case .gitlab: return "GitLab" + case .gitlabSelfManaged: return "GitLabSelfManaged" case let .sdkUnknown(s): return s } } diff --git a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift index cd3865e2e6a..9c0c1eec1fa 100644 --- a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift +++ b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift @@ -78,10 +78,10 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : AWS CodeStar Notifications can't create the notification rule because you do not have sufficient permissions. - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `AccessDeniedException` : CodeStar Notifications can't create the notification rule because you do not have sufficient permissions. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. /// - `ConfigurationException` : Some or all of the configuration is incomplete, missing, or not valid. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. /// - `ResourceAlreadyExistsException` : A resource with the same name or ID already exists. Notification rule names must be unique in your Amazon Web Services account. /// - `ValidationException` : One or more parameter values are not valid. public func createNotificationRule(input: CreateNotificationRuleInput) async throws -> CreateNotificationRuleOutput @@ -130,8 +130,8 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. /// - `ValidationException` : One or more parameter values are not valid. public func deleteNotificationRule(input: DeleteNotificationRuleInput) async throws -> DeleteNotificationRuleOutput { @@ -224,7 +224,7 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. public func describeNotificationRule(input: DescribeNotificationRuleInput) async throws -> DescribeNotificationRuleOutput { @@ -365,7 +365,7 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { @@ -460,7 +460,7 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// /// __Possible Exceptions:__ /// - `ConfigurationException` : Some or all of the configuration is incomplete, missing, or not valid. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. public func subscribe(input: SubscribeInput) async throws -> SubscribeOutput { @@ -507,9 +507,9 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { @@ -602,9 +602,9 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { @@ -650,7 +650,7 @@ extension CodestarnotificationsClient: CodestarnotificationsClientProtocol { /// /// __Possible Exceptions:__ /// - `ConfigurationException` : Some or all of the configuration is incomplete, missing, or not valid. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. public func updateNotificationRule(input: UpdateNotificationRuleInput) async throws -> UpdateNotificationRuleOutput { diff --git a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClientProtocol.swift b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClientProtocol.swift index f1b7e5f1b1e..775eada8822 100644 --- a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClientProtocol.swift +++ b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClientProtocol.swift @@ -2,7 +2,7 @@ import ClientRuntime -/// This AWS CodeStar Notifications API Reference provides descriptions and usage examples of the operations and data types for the AWS CodeStar Notifications API. You can use the AWS CodeStar Notifications API to work with the following objects: Notification rules, by calling the following: +/// This CodeStar Notifications API Reference provides descriptions and usage examples of the operations and data types for the CodeStar Notifications API. You can use the CodeStar Notifications API to work with the following objects: Notification rules, by calling the following: /// /// * [CreateNotificationRule], which creates a notification rule for a resource in your account. /// @@ -40,7 +40,7 @@ import ClientRuntime /// * [UntagResource], which removes a tag from a notification rule in your account. /// /// -/// For information about how to use AWS CodeStar Notifications, see the [Amazon Web Services Developer Tools Console User Guide](https://docs.aws.amazon.com/dtconsole/latest/userguide/what-is-dtconsole.html). +/// For information about how to use CodeStar Notifications, see the [Amazon Web Services Developer Tools Console User Guide](https://docs.aws.amazon.com/dtconsole/latest/userguide/what-is-dtconsole.html). public protocol CodestarnotificationsClientProtocol { /// Performs the `CreateNotificationRule` operation on the `CodeStarNotifications_20191015` service. /// @@ -53,10 +53,10 @@ public protocol CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : AWS CodeStar Notifications can't create the notification rule because you do not have sufficient permissions. - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `AccessDeniedException` : CodeStar Notifications can't create the notification rule because you do not have sufficient permissions. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. /// - `ConfigurationException` : Some or all of the configuration is incomplete, missing, or not valid. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. /// - `ResourceAlreadyExistsException` : A resource with the same name or ID already exists. Notification rule names must be unique in your Amazon Web Services account. /// - `ValidationException` : One or more parameter values are not valid. func createNotificationRule(input: CreateNotificationRuleInput) async throws -> CreateNotificationRuleOutput @@ -71,8 +71,8 @@ public protocol CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. /// - `ValidationException` : One or more parameter values are not valid. func deleteNotificationRule(input: DeleteNotificationRuleInput) async throws -> DeleteNotificationRuleOutput /// Performs the `DeleteTarget` operation on the `CodeStarNotifications_20191015` service. @@ -99,7 +99,7 @@ public protocol CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. func describeNotificationRule(input: DescribeNotificationRuleInput) async throws -> DescribeNotificationRuleOutput /// Performs the `ListEventTypes` operation on the `CodeStarNotifications_20191015` service. @@ -141,7 +141,7 @@ public protocol CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput /// Performs the `ListTargets` operation on the `CodeStarNotifications_20191015` service. @@ -170,7 +170,7 @@ public protocol CodestarnotificationsClientProtocol { /// /// __Possible Exceptions:__ /// - `ConfigurationException` : Some or all of the configuration is incomplete, missing, or not valid. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. func subscribe(input: SubscribeInput) async throws -> SubscribeOutput /// Performs the `TagResource` operation on the `CodeStarNotifications_20191015` service. @@ -184,9 +184,9 @@ public protocol CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. func tagResource(input: TagResourceInput) async throws -> TagResourceOutput /// Performs the `Unsubscribe` operation on the `CodeStarNotifications_20191015` service. @@ -213,9 +213,9 @@ public protocol CodestarnotificationsClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `ConcurrentModificationException` : AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. - /// - `LimitExceededException` : One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ConcurrentModificationException` : CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. + /// - `LimitExceededException` : One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput /// Performs the `UpdateNotificationRule` operation on the `CodeStarNotifications_20191015` service. @@ -230,7 +230,7 @@ public protocol CodestarnotificationsClientProtocol { /// /// __Possible Exceptions:__ /// - `ConfigurationException` : Some or all of the configuration is incomplete, missing, or not valid. - /// - `ResourceNotFoundException` : AWS CodeStar Notifications can't find a resource that matches the provided ARN. + /// - `ResourceNotFoundException` : CodeStar Notifications can't find a resource that matches the provided ARN. /// - `ValidationException` : One or more parameter values are not valid. func updateNotificationRule(input: UpdateNotificationRuleInput) async throws -> UpdateNotificationRuleOutput } diff --git a/Sources/Services/AWSCodestarnotifications/models/Models.swift b/Sources/Services/AWSCodestarnotifications/models/Models.swift index 5a6769a21b7..ffca140bf21 100644 --- a/Sources/Services/AWSCodestarnotifications/models/Models.swift +++ b/Sources/Services/AWSCodestarnotifications/models/Models.swift @@ -17,7 +17,7 @@ extension AccessDeniedException { } } -/// AWS CodeStar Notifications can't create the notification rule because you do not have sufficient permissions. +/// CodeStar Notifications can't create the notification rule because you do not have sufficient permissions. public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -72,7 +72,7 @@ extension ConcurrentModificationException { } } -/// AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. +/// CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again. public struct ConcurrentModificationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -231,7 +231,7 @@ extension CreateNotificationRuleInput: ClientRuntime.URLPathProvider { public struct CreateNotificationRuleInput: Swift.Equatable { /// A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token. The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you. public var clientRequestToken: Swift.String? - /// The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. + /// The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created. /// This member is required. public var detailType: CodestarnotificationsClientTypes.DetailType? /// A list of event types associated with this notification rule. For a list of allowed events, see [EventTypeSummary]. @@ -680,7 +680,7 @@ public struct DescribeNotificationRuleOutput: Swift.Equatable { public var createdBy: Swift.String? /// The date and time the notification rule was created, in timestamp format. public var createdTimestamp: ClientRuntime.Date? - /// The level of detail included in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. + /// The level of detail included in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created. public var detailType: CodestarnotificationsClientTypes.DetailType? /// A list of the event types associated with the notification rule. public var eventTypes: [CodestarnotificationsClientTypes.EventTypeSummary]? @@ -987,7 +987,7 @@ extension LimitExceededException { } } -/// One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. +/// One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits. public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -1991,7 +1991,7 @@ extension ResourceNotFoundException { } } -/// AWS CodeStar Notifications can't find a resource that matches the provided ARN. +/// CodeStar Notifications can't find a resource that matches the provided ARN. public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -2701,7 +2701,7 @@ public struct UpdateNotificationRuleInput: Swift.Equatable { /// The Amazon Resource Name (ARN) of the notification rule. /// This member is required. public var arn: Swift.String? - /// The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. + /// The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created. public var detailType: CodestarnotificationsClientTypes.DetailType? /// A list of event types associated with this notification rule. For a complete list of event types and IDs, see [Notification concepts](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api) in the Developer Tools Console User Guide. public var eventTypeIds: [Swift.String]? diff --git a/Sources/Services/AWSConfigService/models/Models.swift b/Sources/Services/AWSConfigService/models/Models.swift index 9886af05371..868357e7cd1 100644 --- a/Sources/Services/AWSConfigService/models/Models.swift +++ b/Sources/Services/AWSConfigService/models/Models.swift @@ -3017,7 +3017,7 @@ extension ConfigClientTypes { /// /// * Continuous recording allows you to record configuration changes continuously whenever a change occurs. /// - /// * Daily recording allows you record configuration data once every 24 hours, only if a change has occurred. + /// * Daily recording allows you to receive a configuration item (CI) representing the most recent state of your resources over the last 24-hour period, only if it’s different from the previous CI recorded. /// /// /// Firewall Manager depends on continuous recording to monitor your resources. If you are using Firewall Manager, it is recommended that you set the recording frequency to Continuous. You can also override the recording frequency for specific resource types. @@ -20734,7 +20734,7 @@ extension ConfigClientTypes { /// /// * Continuous recording allows you to record configuration changes continuously whenever a change occurs. /// - /// * Daily recording allows you record configuration data once every 24 hours, only if a change has occurred. + /// * Daily recording allows you to receive a configuration item (CI) representing the most recent state of your resources over the last 24-hour period, only if it’s different from the previous CI recorded. /// /// /// Firewall Manager depends on continuous recording to monitor your resources. If you are using Firewall Manager, it is recommended that you set the recording frequency to Continuous. You can also override the recording frequency for specific resource types. @@ -20818,7 +20818,7 @@ extension ConfigClientTypes { /// /// * Continuous recording allows you to record configuration changes continuously whenever a change occurs. /// - /// * Daily recording allows you record configuration data once every 24 hours, only if a change has occurred. + /// * Daily recording allows you to receive a configuration item (CI) representing the most recent state of your resources over the last 24-hour period, only if it’s different from the previous CI recorded. /// /// /// Firewall Manager depends on continuous recording to monitor your resources. If you are using Firewall Manager, it is recommended that you set the recording frequency to Continuous. @@ -21121,7 +21121,7 @@ extension ConfigClientTypes { public var parameters: [Swift.String:ConfigClientTypes.RemediationParameterValue]? /// The type of a resource. public var resourceType: Swift.String? - /// Maximum time in seconds that Config runs auto-remediation. If you do not select a number, the default is 60 seconds. For example, if you specify RetryAttemptSeconds as 50 seconds and MaximumAutomaticAttempts as 5, Config will run auto-remediations 5 times within 50 seconds before throwing an exception. + /// Time window to determine whether or not to add a remediation exception to prevent infinite remediation attempts. If MaximumAutomaticAttempts remediation attempts have been made under RetryAttemptSeconds, a remediation exception will be added to the resource. If you do not select a number, the default is 60 seconds. For example, if you specify RetryAttemptSeconds as 50 seconds and MaximumAutomaticAttempts as 5, Config will run auto-remediations 5 times within 50 seconds before adding a remediation exception to the resource. public var retryAttemptSeconds: Swift.Int? /// Target ID is the name of the SSM document. /// This member is required. @@ -22473,6 +22473,7 @@ extension ConfigClientTypes { case apprunnervpcconnector case appstreamapplication case appstreamdirectoryconfig + case appstreamfleet case appstreamstack case appsyncgraphqlapi case application @@ -22512,6 +22513,9 @@ extension ConfigClientTypes { case codedeploydeploymentgroup case codeguruprofilerprofilinggroup case codegurureviewerrepositoryassociation + case cognitouserpool + case cognitouserpoolclient + case cognitouserpoolgroup case conformancepackcompliance case connectinstance case connectphonenumber @@ -22552,6 +22556,8 @@ extension ConfigClientTypes { case ec2ipam case ec2ipampool case ec2ipamscope + case ec2networkinsightsaccessscope + case ec2networkinsightsanalysis case ec2networkinsightspath case ec2prefixlist case ec2spotfleet @@ -22610,8 +22616,10 @@ extension ConfigClientTypes { case glueclassifier case gluejob case gluemltransform + case grafanaworkspace case greengrassv2componentversion case groundstationconfig + case groundstationdataflowendpointgroup case groundstationmissionprofile case group case guarddutydetector @@ -22630,6 +22638,7 @@ extension ConfigClientTypes { case imagebuildercontainerrecipe case imagebuilderdistributionconfiguration case imagebuilderimagepipeline + case imagebuilderimagerecipe case imagebuilderinfrastructureconfiguration case inspectorv2filter case instance @@ -22667,6 +22676,7 @@ extension ConfigClientTypes { case iotwirelessfuotatask case iotwirelessmulticastgroup case iotwirelessserviceprofile + case kmsalias case kafkaconnectconnector case kendraindex case key @@ -22691,6 +22701,7 @@ extension ConfigClientTypes { case logsdestination case lookoutmetricsalert case lookoutvisionproject + case m2environment case mskbatchscramsecret case mskcluster case mskconfiguration @@ -22739,9 +22750,14 @@ extension ConfigClientTypes { case protection case qldbledger case queue + case quicksightdatasource + case quicksighttemplate + case quicksighttheme case rdsglobalcluster + case rdsoptiongroup case rumappmonitor case ratebasedrule + case redshiftendpointaccess case redshifteventsubscription case redshiftscheduledaction case regexpatternsetv2 @@ -22770,6 +22786,7 @@ extension ConfigClientTypes { case route53recoveryreadinessrecoverygroup case route53recoveryreadinessresourceset case route53resolverfirewalldomainlist + case route53resolverfirewallrulegroup case route53resolverfirewallrulegroupassociation case route53resolverresolverendpoint case route53resolverresolverqueryloggingconfig @@ -22788,6 +22805,7 @@ extension ConfigClientTypes { case sesreceiptfilter case sesreceiptruleset case sestemplate + case ssmdocument case sagemakerappimageconfig case sagemakercoderepository case sagemakerdomain @@ -22866,6 +22884,7 @@ extension ConfigClientTypes { .apprunnervpcconnector, .appstreamapplication, .appstreamdirectoryconfig, + .appstreamfleet, .appstreamstack, .appsyncgraphqlapi, .application, @@ -22905,6 +22924,9 @@ extension ConfigClientTypes { .codedeploydeploymentgroup, .codeguruprofilerprofilinggroup, .codegurureviewerrepositoryassociation, + .cognitouserpool, + .cognitouserpoolclient, + .cognitouserpoolgroup, .conformancepackcompliance, .connectinstance, .connectphonenumber, @@ -22945,6 +22967,8 @@ extension ConfigClientTypes { .ec2ipam, .ec2ipampool, .ec2ipamscope, + .ec2networkinsightsaccessscope, + .ec2networkinsightsanalysis, .ec2networkinsightspath, .ec2prefixlist, .ec2spotfleet, @@ -23003,8 +23027,10 @@ extension ConfigClientTypes { .glueclassifier, .gluejob, .gluemltransform, + .grafanaworkspace, .greengrassv2componentversion, .groundstationconfig, + .groundstationdataflowendpointgroup, .groundstationmissionprofile, .group, .guarddutydetector, @@ -23023,6 +23049,7 @@ extension ConfigClientTypes { .imagebuildercontainerrecipe, .imagebuilderdistributionconfiguration, .imagebuilderimagepipeline, + .imagebuilderimagerecipe, .imagebuilderinfrastructureconfiguration, .inspectorv2filter, .instance, @@ -23060,6 +23087,7 @@ extension ConfigClientTypes { .iotwirelessfuotatask, .iotwirelessmulticastgroup, .iotwirelessserviceprofile, + .kmsalias, .kafkaconnectconnector, .kendraindex, .key, @@ -23084,6 +23112,7 @@ extension ConfigClientTypes { .logsdestination, .lookoutmetricsalert, .lookoutvisionproject, + .m2environment, .mskbatchscramsecret, .mskcluster, .mskconfiguration, @@ -23132,9 +23161,14 @@ extension ConfigClientTypes { .protection, .qldbledger, .queue, + .quicksightdatasource, + .quicksighttemplate, + .quicksighttheme, .rdsglobalcluster, + .rdsoptiongroup, .rumappmonitor, .ratebasedrule, + .redshiftendpointaccess, .redshifteventsubscription, .redshiftscheduledaction, .regexpatternsetv2, @@ -23163,6 +23197,7 @@ extension ConfigClientTypes { .route53recoveryreadinessrecoverygroup, .route53recoveryreadinessresourceset, .route53resolverfirewalldomainlist, + .route53resolverfirewallrulegroup, .route53resolverfirewallrulegroupassociation, .route53resolverresolverendpoint, .route53resolverresolverqueryloggingconfig, @@ -23181,6 +23216,7 @@ extension ConfigClientTypes { .sesreceiptfilter, .sesreceiptruleset, .sestemplate, + .ssmdocument, .sagemakerappimageconfig, .sagemakercoderepository, .sagemakerdomain, @@ -23264,6 +23300,7 @@ extension ConfigClientTypes { case .apprunnervpcconnector: return "AWS::AppRunner::VpcConnector" case .appstreamapplication: return "AWS::AppStream::Application" case .appstreamdirectoryconfig: return "AWS::AppStream::DirectoryConfig" + case .appstreamfleet: return "AWS::AppStream::Fleet" case .appstreamstack: return "AWS::AppStream::Stack" case .appsyncgraphqlapi: return "AWS::AppSync::GraphQLApi" case .application: return "AWS::ElasticBeanstalk::Application" @@ -23303,6 +23340,9 @@ extension ConfigClientTypes { case .codedeploydeploymentgroup: return "AWS::CodeDeploy::DeploymentGroup" case .codeguruprofilerprofilinggroup: return "AWS::CodeGuruProfiler::ProfilingGroup" case .codegurureviewerrepositoryassociation: return "AWS::CodeGuruReviewer::RepositoryAssociation" + case .cognitouserpool: return "AWS::Cognito::UserPool" + case .cognitouserpoolclient: return "AWS::Cognito::UserPoolClient" + case .cognitouserpoolgroup: return "AWS::Cognito::UserPoolGroup" case .conformancepackcompliance: return "AWS::Config::ConformancePackCompliance" case .connectinstance: return "AWS::Connect::Instance" case .connectphonenumber: return "AWS::Connect::PhoneNumber" @@ -23343,6 +23383,8 @@ extension ConfigClientTypes { case .ec2ipam: return "AWS::EC2::IPAM" case .ec2ipampool: return "AWS::EC2::IPAMPool" case .ec2ipamscope: return "AWS::EC2::IPAMScope" + case .ec2networkinsightsaccessscope: return "AWS::EC2::NetworkInsightsAccessScope" + case .ec2networkinsightsanalysis: return "AWS::EC2::NetworkInsightsAnalysis" case .ec2networkinsightspath: return "AWS::EC2::NetworkInsightsPath" case .ec2prefixlist: return "AWS::EC2::PrefixList" case .ec2spotfleet: return "AWS::EC2::SpotFleet" @@ -23401,8 +23443,10 @@ extension ConfigClientTypes { case .glueclassifier: return "AWS::Glue::Classifier" case .gluejob: return "AWS::Glue::Job" case .gluemltransform: return "AWS::Glue::MLTransform" + case .grafanaworkspace: return "AWS::Grafana::Workspace" case .greengrassv2componentversion: return "AWS::GreengrassV2::ComponentVersion" case .groundstationconfig: return "AWS::GroundStation::Config" + case .groundstationdataflowendpointgroup: return "AWS::GroundStation::DataflowEndpointGroup" case .groundstationmissionprofile: return "AWS::GroundStation::MissionProfile" case .group: return "AWS::IAM::Group" case .guarddutydetector: return "AWS::GuardDuty::Detector" @@ -23421,6 +23465,7 @@ extension ConfigClientTypes { case .imagebuildercontainerrecipe: return "AWS::ImageBuilder::ContainerRecipe" case .imagebuilderdistributionconfiguration: return "AWS::ImageBuilder::DistributionConfiguration" case .imagebuilderimagepipeline: return "AWS::ImageBuilder::ImagePipeline" + case .imagebuilderimagerecipe: return "AWS::ImageBuilder::ImageRecipe" case .imagebuilderinfrastructureconfiguration: return "AWS::ImageBuilder::InfrastructureConfiguration" case .inspectorv2filter: return "AWS::InspectorV2::Filter" case .instance: return "AWS::EC2::Instance" @@ -23458,6 +23503,7 @@ extension ConfigClientTypes { case .iotwirelessfuotatask: return "AWS::IoTWireless::FuotaTask" case .iotwirelessmulticastgroup: return "AWS::IoTWireless::MulticastGroup" case .iotwirelessserviceprofile: return "AWS::IoTWireless::ServiceProfile" + case .kmsalias: return "AWS::KMS::Alias" case .kafkaconnectconnector: return "AWS::KafkaConnect::Connector" case .kendraindex: return "AWS::Kendra::Index" case .key: return "AWS::KMS::Key" @@ -23482,6 +23528,7 @@ extension ConfigClientTypes { case .logsdestination: return "AWS::Logs::Destination" case .lookoutmetricsalert: return "AWS::LookoutMetrics::Alert" case .lookoutvisionproject: return "AWS::LookoutVision::Project" + case .m2environment: return "AWS::M2::Environment" case .mskbatchscramsecret: return "AWS::MSK::BatchScramSecret" case .mskcluster: return "AWS::MSK::Cluster" case .mskconfiguration: return "AWS::MSK::Configuration" @@ -23530,9 +23577,14 @@ extension ConfigClientTypes { case .protection: return "AWS::Shield::Protection" case .qldbledger: return "AWS::QLDB::Ledger" case .queue: return "AWS::SQS::Queue" + case .quicksightdatasource: return "AWS::QuickSight::DataSource" + case .quicksighttemplate: return "AWS::QuickSight::Template" + case .quicksighttheme: return "AWS::QuickSight::Theme" case .rdsglobalcluster: return "AWS::RDS::GlobalCluster" + case .rdsoptiongroup: return "AWS::RDS::OptionGroup" case .rumappmonitor: return "AWS::RUM::AppMonitor" case .ratebasedrule: return "AWS::WAF::RateBasedRule" + case .redshiftendpointaccess: return "AWS::Redshift::EndpointAccess" case .redshifteventsubscription: return "AWS::Redshift::EventSubscription" case .redshiftscheduledaction: return "AWS::Redshift::ScheduledAction" case .regexpatternsetv2: return "AWS::WAFv2::RegexPatternSet" @@ -23561,6 +23613,7 @@ extension ConfigClientTypes { case .route53recoveryreadinessrecoverygroup: return "AWS::Route53RecoveryReadiness::RecoveryGroup" case .route53recoveryreadinessresourceset: return "AWS::Route53RecoveryReadiness::ResourceSet" case .route53resolverfirewalldomainlist: return "AWS::Route53Resolver::FirewallDomainList" + case .route53resolverfirewallrulegroup: return "AWS::Route53Resolver::FirewallRuleGroup" case .route53resolverfirewallrulegroupassociation: return "AWS::Route53Resolver::FirewallRuleGroupAssociation" case .route53resolverresolverendpoint: return "AWS::Route53Resolver::ResolverEndpoint" case .route53resolverresolverqueryloggingconfig: return "AWS::Route53Resolver::ResolverQueryLoggingConfig" @@ -23579,6 +23632,7 @@ extension ConfigClientTypes { case .sesreceiptfilter: return "AWS::SES::ReceiptFilter" case .sesreceiptruleset: return "AWS::SES::ReceiptRuleSet" case .sestemplate: return "AWS::SES::Template" + case .ssmdocument: return "AWS::SSM::Document" case .sagemakerappimageconfig: return "AWS::SageMaker::AppImageConfig" case .sagemakercoderepository: return "AWS::SageMaker::CodeRepository" case .sagemakerdomain: return "AWS::SageMaker::Domain" diff --git a/Sources/Services/AWSConnect/ConnectClient.swift b/Sources/Services/AWSConnect/ConnectClient.swift index 753ef1bdefa..ad210577d92 100644 --- a/Sources/Services/AWSConnect/ConnectClient.swift +++ b/Sources/Services/AWSConnect/ConnectClient.swift @@ -781,6 +781,56 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `AssociateUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// >Associates a set of proficiencies with a user. + /// + /// - Parameter AssociateUserProficienciesInput : [no documentation found] + /// + /// - Returns: `AssociateUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func associateUserProficiencies(input: AssociateUserProficienciesInput) async throws -> AssociateUserProficienciesOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "associateUserProficiencies") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "associateUserProficiencies") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateUserProficienciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `BatchAssociateAnalyticsDataSet` operation on the `AmazonConnectService` service. /// /// This API is in preview release for Amazon Connect and is subject to change. Associates a list of analytics datasets for a given Amazon Connect instance to a target account. You can associate multiple datasets in a single call. @@ -1503,6 +1553,58 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `CreatePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Creates a new predefined attribute for the specified Amazon Connect instance. + /// + /// - Parameter CreatePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `CreatePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `DuplicateResourceException` : A resource with the specified name already exists. + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `LimitExceededException` : The allowed limit for the resource has been exceeded. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func createPredefinedAttribute(input: CreatePredefinedAttributeInput) async throws -> CreatePredefinedAttributeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .put) + .withServiceName(value: serviceName) + .withOperation(value: "createPredefinedAttribute") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "createPredefinedAttribute") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePredefinedAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `CreatePrompt` operation on the `AmazonConnectService` service. /// /// Creates a prompt. For more information about prompts, such as supported file types and maximum length, see [Create prompts](https://docs.aws.amazon.com/connect/latest/adminguide/prompts.html) in the Amazon Connect Administrator's Guide. @@ -2624,6 +2726,54 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `DeletePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Deletes a predefined attribute from the specified Amazon Connect instance. + /// + /// - Parameter DeletePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `DeletePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceInUseException` : That resource is already in use. Please try another. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func deletePredefinedAttribute(input: DeletePredefinedAttributeInput) async throws -> DeletePredefinedAttributeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "deletePredefinedAttribute") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "deletePredefinedAttribute") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePredefinedAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DeletePrompt` operation on the `AmazonConnectService` service. /// /// Deletes a prompt. @@ -3808,6 +3958,53 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `DescribePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Describes a predefined attribute for the specified Amazon Connect instance. + /// + /// - Parameter DescribePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `DescribePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func describePredefinedAttribute(input: DescribePredefinedAttributeInput) async throws -> DescribePredefinedAttributeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "describePredefinedAttribute") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "describePredefinedAttribute") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePredefinedAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DescribePrompt` operation on the `AmazonConnectService` service. /// /// Describes the prompt. @@ -4956,6 +5153,56 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `DisassociateUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// Disassociates a set of proficiencies from a user. + /// + /// - Parameter DisassociateUserProficienciesInput : [no documentation found] + /// + /// - Returns: `DisassociateUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func disassociateUserProficiencies(input: DisassociateUserProficienciesInput) async throws -> DisassociateUserProficienciesOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "disassociateUserProficiencies") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "disassociateUserProficiencies") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateUserProficienciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DismissUserContact` operation on the `AmazonConnectService` service. /// /// Dismisses contacts from an agent’s CCP and returns the agent to an available state, which allows the agent to receive a new routed contact. Contacts can only be dismissed if they are in a MISSED, ERROR, ENDED, or REJECTED state in the [Agent Event Stream](https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html). @@ -6555,6 +6802,54 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `ListPredefinedAttributes` operation on the `AmazonConnectService` service. + /// + /// Lists predefined attributes for the specified Amazon Connect instance. + /// + /// - Parameter ListPredefinedAttributesInput : [no documentation found] + /// + /// - Returns: `ListPredefinedAttributesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func listPredefinedAttributes(input: ListPredefinedAttributesInput) async throws -> ListPredefinedAttributesOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listPredefinedAttributes") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "listPredefinedAttributes") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPredefinedAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `ListPrompts` operation on the `AmazonConnectService` service. /// /// Provides information about the prompts for the specified Amazon Connect instance. @@ -7419,6 +7714,54 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `ListUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// Lists proficiencies associated with a user. + /// + /// - Parameter ListUserProficienciesInput : [no documentation found] + /// + /// - Returns: `ListUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func listUserProficiencies(input: ListUserProficienciesInput) async throws -> ListUserProficienciesOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listUserProficiencies") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "listUserProficiencies") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListUserProficienciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `ListUsers` operation on the `AmazonConnectService` service. /// /// Provides summary information about the users for the specified Amazon Connect instance. @@ -7976,6 +8319,56 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `SearchContacts` operation on the `AmazonConnectService` service. + /// + /// Searches contacts in an Amazon Connect instance. + /// + /// - Parameter SearchContactsInput : [no documentation found] + /// + /// - Returns: `SearchContactsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func searchContacts(input: SearchContactsInput) async throws -> SearchContactsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "searchContacts") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "searchContacts") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SearchContactsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `SearchHoursOfOperations` operation on the `AmazonConnectService` service. /// /// Searches the hours of operation in an Amazon Connect instance, with optional filtering. @@ -8026,6 +8419,56 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `SearchPredefinedAttributes` operation on the `AmazonConnectService` service. + /// + /// Predefined attributes that meet certain criteria. + /// + /// - Parameter SearchPredefinedAttributesInput : [no documentation found] + /// + /// - Returns: `SearchPredefinedAttributesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func searchPredefinedAttributes(input: SearchPredefinedAttributesInput) async throws -> SearchPredefinedAttributesOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "searchPredefinedAttributes") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "searchPredefinedAttributes") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SearchPredefinedAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `SearchPrompts` operation on the `AmazonConnectService` service. /// /// Searches prompts in an Amazon Connect instance, with optional filtering. @@ -9849,6 +10292,57 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `UpdateContactRoutingData` operation on the `AmazonConnectService` service. + /// + /// This API is in preview release for Amazon Connect and is subject to change. Updates routing priority and age on the contact (QueuePriority and QueueTimeAdjustmentInSeconds). These properties can be used to change a customer's position in the queue. For example, you can move a contact to the back of the queue by setting a lower routing priority relative to other contacts in queue; or you can move a contact to the front of the queue by increasing the routing age which will make the contact look artificially older and therefore higher up in the first-in-first-out routing order. Note that adjusting the routing age of a contact affects only its position in queue, and not its actual queue wait time as reported through metrics. These properties can also be updated by using [the Set routing priority / age flow block](https://docs.aws.amazon.com/connect/latest/adminguide/change-routing-priority.html). + /// + /// - Parameter UpdateContactRoutingDataInput : [no documentation found] + /// + /// - Returns: `UpdateContactRoutingDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient permissions to perform this action. + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `ResourceConflictException` : A resource already has that name. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func updateContactRoutingData(input: UpdateContactRoutingDataInput) async throws -> UpdateContactRoutingDataOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "updateContactRoutingData") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "updateContactRoutingData") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateContactRoutingDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `UpdateContactSchedule` operation on the `AmazonConnectService` service. /// /// Updates the scheduled time of a task contact that is already scheduled. @@ -10273,6 +10767,56 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `UpdatePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Updates a predefined attribute for the specified Amazon Connect instance. + /// + /// - Parameter UpdatePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `UpdatePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func updatePredefinedAttribute(input: UpdatePredefinedAttributeInput) async throws -> UpdatePredefinedAttributeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "updatePredefinedAttribute") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "updatePredefinedAttribute") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdatePredefinedAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `UpdatePrompt` operation on the `AmazonConnectService` service. /// /// Updates a prompt. @@ -11386,6 +11930,56 @@ extension ConnectClient: ConnectClientProtocol { return result } + /// Performs the `UpdateUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// Updates the properties associated with the proficiencies of a user. + /// + /// - Parameter UpdateUserProficienciesInput : [no documentation found] + /// + /// - Returns: `UpdateUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + public func updateUserProficiencies(input: UpdateUserProficienciesInput) async throws -> UpdateUserProficienciesOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "updateUserProficiencies") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "connect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "updateUserProficiencies") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateUserProficienciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `UpdateUserRoutingProfile` operation on the `AmazonConnectService` service. /// /// Assigns the specified routing profile to the specified user. diff --git a/Sources/Services/AWSConnect/ConnectClientProtocol.swift b/Sources/Services/AWSConnect/ConnectClientProtocol.swift index 5014746341d..3be4c74bd26 100644 --- a/Sources/Services/AWSConnect/ConnectClientProtocol.swift +++ b/Sources/Services/AWSConnect/ConnectClientProtocol.swift @@ -256,6 +256,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func associateTrafficDistributionGroupUser(input: AssociateTrafficDistributionGroupUserInput) async throws -> AssociateTrafficDistributionGroupUserOutput + /// Performs the `AssociateUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// >Associates a set of proficiencies with a user. + /// + /// - Parameter AssociateUserProficienciesInput : [no documentation found] + /// + /// - Returns: `AssociateUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func associateUserProficiencies(input: AssociateUserProficienciesInput) async throws -> AssociateUserProficienciesOutput /// Performs the `BatchAssociateAnalyticsDataSet` operation on the `AmazonConnectService` service. /// /// This API is in preview release for Amazon Connect and is subject to change. Associates a list of analytics datasets for a given Amazon Connect instance to a target account. You can associate multiple datasets in a single call. @@ -511,6 +528,25 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func createPersistentContactAssociation(input: CreatePersistentContactAssociationInput) async throws -> CreatePersistentContactAssociationOutput + /// Performs the `CreatePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Creates a new predefined attribute for the specified Amazon Connect instance. + /// + /// - Parameter CreatePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `CreatePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `DuplicateResourceException` : A resource with the specified name already exists. + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `LimitExceededException` : The allowed limit for the resource has been exceeded. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func createPredefinedAttribute(input: CreatePredefinedAttributeInput) async throws -> CreatePredefinedAttributeOutput /// Performs the `CreatePrompt` operation on the `AmazonConnectService` service. /// /// Creates a prompt. For more information about prompts, such as supported file types and maximum length, see [Create prompts](https://docs.aws.amazon.com/connect/latest/adminguide/prompts.html) in the Amazon Connect Administrator's Guide. @@ -922,6 +958,24 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func deleteIntegrationAssociation(input: DeleteIntegrationAssociationInput) async throws -> DeleteIntegrationAssociationOutput + /// Performs the `DeletePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Deletes a predefined attribute from the specified Amazon Connect instance. + /// + /// - Parameter DeletePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `DeletePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceInUseException` : That resource is already in use. Please try another. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func deletePredefinedAttribute(input: DeletePredefinedAttributeInput) async throws -> DeletePredefinedAttributeOutput /// Performs the `DeletePrompt` operation on the `AmazonConnectService` service. /// /// Deletes a prompt. @@ -1354,6 +1408,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func describePhoneNumber(input: DescribePhoneNumberInput) async throws -> DescribePhoneNumberOutput + /// Performs the `DescribePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Describes a predefined attribute for the specified Amazon Connect instance. + /// + /// - Parameter DescribePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `DescribePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func describePredefinedAttribute(input: DescribePredefinedAttributeInput) async throws -> DescribePredefinedAttributeOutput /// Performs the `DescribePrompt` operation on the `AmazonConnectService` service. /// /// Describes the prompt. @@ -1764,6 +1835,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func disassociateTrafficDistributionGroupUser(input: DisassociateTrafficDistributionGroupUserInput) async throws -> DisassociateTrafficDistributionGroupUserOutput + /// Performs the `DisassociateUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// Disassociates a set of proficiencies from a user. + /// + /// - Parameter DisassociateUserProficienciesInput : [no documentation found] + /// + /// - Returns: `DisassociateUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func disassociateUserProficiencies(input: DisassociateUserProficienciesInput) async throws -> DisassociateUserProficienciesOutput /// Performs the `DismissUserContact` operation on the `AmazonConnectService` service. /// /// Dismisses contacts from an agent’s CCP and returns the agent to an available state, which allows the agent to receive a new routed contact. Contacts can only be dismissed if they are in a MISSED, ERROR, ENDED, or REJECTED state in the [Agent Event Stream](https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html). @@ -2328,6 +2416,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func listPhoneNumbersV2(input: ListPhoneNumbersV2Input) async throws -> ListPhoneNumbersV2Output + /// Performs the `ListPredefinedAttributes` operation on the `AmazonConnectService` service. + /// + /// Lists predefined attributes for the specified Amazon Connect instance. + /// + /// - Parameter ListPredefinedAttributesInput : [no documentation found] + /// + /// - Returns: `ListPredefinedAttributesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func listPredefinedAttributes(input: ListPredefinedAttributesInput) async throws -> ListPredefinedAttributesOutput /// Performs the `ListPrompts` operation on the `AmazonConnectService` service. /// /// Provides information about the prompts for the specified Amazon Connect instance. @@ -2633,6 +2738,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func listUserHierarchyGroups(input: ListUserHierarchyGroupsInput) async throws -> ListUserHierarchyGroupsOutput + /// Performs the `ListUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// Lists proficiencies associated with a user. + /// + /// - Parameter ListUserProficienciesInput : [no documentation found] + /// + /// - Returns: `ListUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func listUserProficiencies(input: ListUserProficienciesInput) async throws -> ListUserProficienciesOutput /// Performs the `ListUsers` operation on the `AmazonConnectService` service. /// /// Provides summary information about the users for the specified Amazon Connect instance. @@ -2832,6 +2954,23 @@ public protocol ConnectClientProtocol { /// - `InvalidParameterException` : One or more of the specified parameters are not valid. /// - `ThrottlingException` : The throttling limit has been exceeded. func searchAvailablePhoneNumbers(input: SearchAvailablePhoneNumbersInput) async throws -> SearchAvailablePhoneNumbersOutput + /// Performs the `SearchContacts` operation on the `AmazonConnectService` service. + /// + /// Searches contacts in an Amazon Connect instance. + /// + /// - Parameter SearchContactsInput : [no documentation found] + /// + /// - Returns: `SearchContactsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func searchContacts(input: SearchContactsInput) async throws -> SearchContactsOutput /// Performs the `SearchHoursOfOperations` operation on the `AmazonConnectService` service. /// /// Searches the hours of operation in an Amazon Connect instance, with optional filtering. @@ -2849,6 +2988,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func searchHoursOfOperations(input: SearchHoursOfOperationsInput) async throws -> SearchHoursOfOperationsOutput + /// Performs the `SearchPredefinedAttributes` operation on the `AmazonConnectService` service. + /// + /// Predefined attributes that meet certain criteria. + /// + /// - Parameter SearchPredefinedAttributesInput : [no documentation found] + /// + /// - Returns: `SearchPredefinedAttributesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func searchPredefinedAttributes(input: SearchPredefinedAttributesInput) async throws -> SearchPredefinedAttributesOutput /// Performs the `SearchPrompts` operation on the `AmazonConnectService` service. /// /// Searches prompts in an Amazon Connect instance, with optional filtering. @@ -3514,6 +3670,24 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func updateContactFlowName(input: UpdateContactFlowNameInput) async throws -> UpdateContactFlowNameOutput + /// Performs the `UpdateContactRoutingData` operation on the `AmazonConnectService` service. + /// + /// This API is in preview release for Amazon Connect and is subject to change. Updates routing priority and age on the contact (QueuePriority and QueueTimeAdjustmentInSeconds). These properties can be used to change a customer's position in the queue. For example, you can move a contact to the back of the queue by setting a lower routing priority relative to other contacts in queue; or you can move a contact to the front of the queue by increasing the routing age which will make the contact look artificially older and therefore higher up in the first-in-first-out routing order. Note that adjusting the routing age of a contact affects only its position in queue, and not its actual queue wait time as reported through metrics. These properties can also be updated by using [the Set routing priority / age flow block](https://docs.aws.amazon.com/connect/latest/adminguide/change-routing-priority.html). + /// + /// - Parameter UpdateContactRoutingDataInput : [no documentation found] + /// + /// - Returns: `UpdateContactRoutingDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient permissions to perform this action. + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `ResourceConflictException` : A resource already has that name. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func updateContactRoutingData(input: UpdateContactRoutingDataInput) async throws -> UpdateContactRoutingDataOutput /// Performs the `UpdateContactSchedule` operation on the `AmazonConnectService` service. /// /// Updates the scheduled time of a task contact that is already scheduled. @@ -3670,6 +3844,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func updatePhoneNumberMetadata(input: UpdatePhoneNumberMetadataInput) async throws -> UpdatePhoneNumberMetadataOutput + /// Performs the `UpdatePredefinedAttribute` operation on the `AmazonConnectService` service. + /// + /// Updates a predefined attribute for the specified Amazon Connect instance. + /// + /// - Parameter UpdatePredefinedAttributeInput : [no documentation found] + /// + /// - Returns: `UpdatePredefinedAttributeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func updatePredefinedAttribute(input: UpdatePredefinedAttributeInput) async throws -> UpdatePredefinedAttributeOutput /// Performs the `UpdatePrompt` operation on the `AmazonConnectService` service. /// /// Updates a prompt. @@ -4057,6 +4248,23 @@ public protocol ConnectClientProtocol { /// - `ResourceNotFoundException` : The specified resource was not found. /// - `ThrottlingException` : The throttling limit has been exceeded. func updateUserPhoneConfig(input: UpdateUserPhoneConfigInput) async throws -> UpdateUserPhoneConfigOutput + /// Performs the `UpdateUserProficiencies` operation on the `AmazonConnectService` service. + /// + /// Updates the properties associated with the proficiencies of a user. + /// + /// - Parameter UpdateUserProficienciesInput : [no documentation found] + /// + /// - Returns: `UpdateUserProficienciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceException` : Request processing failed because of an error or failure with the service. + /// - `InvalidParameterException` : One or more of the specified parameters are not valid. + /// - `InvalidRequestException` : The request is not valid. + /// - `ResourceNotFoundException` : The specified resource was not found. + /// - `ThrottlingException` : The throttling limit has been exceeded. + func updateUserProficiencies(input: UpdateUserProficienciesInput) async throws -> UpdateUserProficienciesOutput /// Performs the `UpdateUserRoutingProfile` operation on the `AmazonConnectService` service. /// /// Assigns the specified routing profile to the specified user. diff --git a/Sources/Services/AWSConnect/Paginators.swift b/Sources/Services/AWSConnect/Paginators.swift index 8e1acdb7f1e..fead7338153 100644 --- a/Sources/Services/AWSConnect/Paginators.swift +++ b/Sources/Services/AWSConnect/Paginators.swift @@ -742,6 +742,37 @@ extension PaginatorSequence where OperationStackInput == ListPhoneNumbersV2Input return try await self.asyncCompactMap { item in item.listPhoneNumbersSummaryList } } } +extension ConnectClient { + /// Paginate over `[ListPredefinedAttributesOutput]` 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 `[ListPredefinedAttributesInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListPredefinedAttributesOutput` + public func listPredefinedAttributesPaginated(input: ListPredefinedAttributesInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listPredefinedAttributes(input:)) + } +} + +extension ListPredefinedAttributesInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListPredefinedAttributesInput { + return ListPredefinedAttributesInput( + instanceId: self.instanceId, + maxResults: self.maxResults, + nextToken: token + )} +} + +extension PaginatorSequence where OperationStackInput == ListPredefinedAttributesInput, OperationStackOutput == ListPredefinedAttributesOutput { + /// This paginator transforms the `AsyncSequence` returned by `listPredefinedAttributesPaginated` + /// to access the nested member `[ConnectClientTypes.PredefinedAttributeSummary]` + /// - Returns: `[ConnectClientTypes.PredefinedAttributeSummary]` + public func predefinedAttributeSummaryList() async throws -> [ConnectClientTypes.PredefinedAttributeSummary] { + return try await self.asyncCompactMap { item in item.predefinedAttributeSummaryList } + } +} extension ConnectClient { /// Paginate over `[ListPromptsOutput]` results. /// @@ -1274,6 +1305,38 @@ extension PaginatorSequence where OperationStackInput == ListUserHierarchyGroups return try await self.asyncCompactMap { item in item.userHierarchyGroupSummaryList } } } +extension ConnectClient { + /// Paginate over `[ListUserProficienciesOutput]` 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 `[ListUserProficienciesInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListUserProficienciesOutput` + public func listUserProficienciesPaginated(input: ListUserProficienciesInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listUserProficiencies(input:)) + } +} + +extension ListUserProficienciesInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListUserProficienciesInput { + return ListUserProficienciesInput( + instanceId: self.instanceId, + maxResults: self.maxResults, + nextToken: token, + userId: self.userId + )} +} + +extension PaginatorSequence where OperationStackInput == ListUserProficienciesInput, OperationStackOutput == ListUserProficienciesOutput { + /// This paginator transforms the `AsyncSequence` returned by `listUserProficienciesPaginated` + /// to access the nested member `[ConnectClientTypes.UserProficiency]` + /// - Returns: `[ConnectClientTypes.UserProficiency]` + public func userProficiencyList() async throws -> [ConnectClientTypes.UserProficiency] { + return try await self.asyncCompactMap { item in item.userProficiencyList } + } +} extension ConnectClient { /// Paginate over `[ListUsersOutput]` results. /// @@ -1404,6 +1467,40 @@ extension PaginatorSequence where OperationStackInput == SearchAvailablePhoneNum return try await self.asyncCompactMap { item in item.availableNumbersList } } } +extension ConnectClient { + /// Paginate over `[SearchContactsOutput]` 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 `[SearchContactsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `SearchContactsOutput` + public func searchContactsPaginated(input: SearchContactsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.searchContacts(input:)) + } +} + +extension SearchContactsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> SearchContactsInput { + return SearchContactsInput( + instanceId: self.instanceId, + maxResults: self.maxResults, + nextToken: token, + searchCriteria: self.searchCriteria, + sort: self.sort, + timeRange: self.timeRange + )} +} + +extension PaginatorSequence where OperationStackInput == SearchContactsInput, OperationStackOutput == SearchContactsOutput { + /// This paginator transforms the `AsyncSequence` returned by `searchContactsPaginated` + /// to access the nested member `[ConnectClientTypes.ContactSearchSummary]` + /// - Returns: `[ConnectClientTypes.ContactSearchSummary]` + public func contacts() async throws -> [ConnectClientTypes.ContactSearchSummary] { + return try await self.asyncCompactMap { item in item.contacts } + } +} extension ConnectClient { /// Paginate over `[SearchHoursOfOperationsOutput]` results. /// @@ -1437,6 +1534,38 @@ extension PaginatorSequence where OperationStackInput == SearchHoursOfOperations return try await self.asyncCompactMap { item in item.hoursOfOperations } } } +extension ConnectClient { + /// Paginate over `[SearchPredefinedAttributesOutput]` 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 `[SearchPredefinedAttributesInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `SearchPredefinedAttributesOutput` + public func searchPredefinedAttributesPaginated(input: SearchPredefinedAttributesInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.searchPredefinedAttributes(input:)) + } +} + +extension SearchPredefinedAttributesInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> SearchPredefinedAttributesInput { + return SearchPredefinedAttributesInput( + instanceId: self.instanceId, + maxResults: self.maxResults, + nextToken: token, + searchCriteria: self.searchCriteria + )} +} + +extension PaginatorSequence where OperationStackInput == SearchPredefinedAttributesInput, OperationStackOutput == SearchPredefinedAttributesOutput { + /// This paginator transforms the `AsyncSequence` returned by `searchPredefinedAttributesPaginated` + /// to access the nested member `[ConnectClientTypes.PredefinedAttribute]` + /// - Returns: `[ConnectClientTypes.PredefinedAttribute]` + public func predefinedAttributes() async throws -> [ConnectClientTypes.PredefinedAttribute] { + return try await self.asyncCompactMap { item in item.predefinedAttributes } + } +} extension ConnectClient { /// Paginate over `[SearchPromptsOutput]` results. /// diff --git a/Sources/Services/AWSConnect/models/Models.swift b/Sources/Services/AWSConnect/models/Models.swift index 70e5653b026..1a0adc35767 100644 --- a/Sources/Services/AWSConnect/models/Models.swift +++ b/Sources/Services/AWSConnect/models/Models.swift @@ -457,6 +457,141 @@ extension ConnectClientTypes { } +extension ConnectClientTypes.AgentHierarchyGroups: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case l1Ids = "L1Ids" + case l2Ids = "L2Ids" + case l3Ids = "L3Ids" + case l4Ids = "L4Ids" + case l5Ids = "L5Ids" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let l1Ids = l1Ids { + var l1IdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .l1Ids) + for hierarchygroupid0 in l1Ids { + try l1IdsContainer.encode(hierarchygroupid0) + } + } + if let l2Ids = l2Ids { + var l2IdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .l2Ids) + for hierarchygroupid0 in l2Ids { + try l2IdsContainer.encode(hierarchygroupid0) + } + } + if let l3Ids = l3Ids { + var l3IdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .l3Ids) + for hierarchygroupid0 in l3Ids { + try l3IdsContainer.encode(hierarchygroupid0) + } + } + if let l4Ids = l4Ids { + var l4IdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .l4Ids) + for hierarchygroupid0 in l4Ids { + try l4IdsContainer.encode(hierarchygroupid0) + } + } + if let l5Ids = l5Ids { + var l5IdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .l5Ids) + for hierarchygroupid0 in l5Ids { + try l5IdsContainer.encode(hierarchygroupid0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let l1IdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .l1Ids) + var l1IdsDecoded0:[Swift.String]? = nil + if let l1IdsContainer = l1IdsContainer { + l1IdsDecoded0 = [Swift.String]() + for string0 in l1IdsContainer { + if let string0 = string0 { + l1IdsDecoded0?.append(string0) + } + } + } + l1Ids = l1IdsDecoded0 + let l2IdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .l2Ids) + var l2IdsDecoded0:[Swift.String]? = nil + if let l2IdsContainer = l2IdsContainer { + l2IdsDecoded0 = [Swift.String]() + for string0 in l2IdsContainer { + if let string0 = string0 { + l2IdsDecoded0?.append(string0) + } + } + } + l2Ids = l2IdsDecoded0 + let l3IdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .l3Ids) + var l3IdsDecoded0:[Swift.String]? = nil + if let l3IdsContainer = l3IdsContainer { + l3IdsDecoded0 = [Swift.String]() + for string0 in l3IdsContainer { + if let string0 = string0 { + l3IdsDecoded0?.append(string0) + } + } + } + l3Ids = l3IdsDecoded0 + let l4IdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .l4Ids) + var l4IdsDecoded0:[Swift.String]? = nil + if let l4IdsContainer = l4IdsContainer { + l4IdsDecoded0 = [Swift.String]() + for string0 in l4IdsContainer { + if let string0 = string0 { + l4IdsDecoded0?.append(string0) + } + } + } + l4Ids = l4IdsDecoded0 + let l5IdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .l5Ids) + var l5IdsDecoded0:[Swift.String]? = nil + if let l5IdsContainer = l5IdsContainer { + l5IdsDecoded0 = [Swift.String]() + for string0 in l5IdsContainer { + if let string0 = string0 { + l5IdsDecoded0?.append(string0) + } + } + } + l5Ids = l5IdsDecoded0 + } +} + +extension ConnectClientTypes { + /// A structure that defines search criteria for contacts using agent hierarchy group levels. For more information about agent hierarchies, see [Set Up Agent Hierarchies](https://docs.aws.amazon.com/connect/latest/adminguide/agent-hierarchy.html) in the Amazon Connect Administrator Guide. + public struct AgentHierarchyGroups: Swift.Equatable { + /// The identifiers for level 1 hierarchy groups. + public var l1Ids: [Swift.String]? + /// The identifiers for level 2 hierarchy groups. + public var l2Ids: [Swift.String]? + /// The identifiers for level 3 hierarchy groups. + public var l3Ids: [Swift.String]? + /// The identifiers for level 4 hierarchy groups. + public var l4Ids: [Swift.String]? + /// The identifiers for level 5 hierarchy groups. + public var l5Ids: [Swift.String]? + + public init( + l1Ids: [Swift.String]? = nil, + l2Ids: [Swift.String]? = nil, + l3Ids: [Swift.String]? = nil, + l4Ids: [Swift.String]? = nil, + l5Ids: [Swift.String]? = nil + ) + { + self.l1Ids = l1Ids + self.l2Ids = l2Ids + self.l3Ids = l3Ids + self.l4Ids = l4Ids + self.l5Ids = l5Ids + } + } + +} + extension ConnectClientTypes.AgentInfo: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case agentPauseDurationInSeconds = "AgentPauseDurationInSeconds" @@ -2445,6 +2580,107 @@ enum AssociateTrafficDistributionGroupUserOutputError: ClientRuntime.HttpRespons } } +extension AssociateUserProficienciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userProficiencies = "UserProficiencies" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let userProficiencies = userProficiencies { + var userProficienciesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .userProficiencies) + for userproficiency0 in userProficiencies { + try userProficienciesContainer.encode(userproficiency0) + } + } + } +} + +extension AssociateUserProficienciesInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let userId = userId else { + return nil + } + return "/users/\(instanceId.urlPercentEncoding())/\(userId.urlPercentEncoding())/associate-proficiencies" + } +} + +public struct AssociateUserProficienciesInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN of the instance). + /// This member is required. + public var instanceId: Swift.String? + /// The identifier of the user account. + /// This member is required. + public var userId: Swift.String? + /// The proficiencies to associate with the user. + /// This member is required. + public var userProficiencies: [ConnectClientTypes.UserProficiency]? + + public init( + instanceId: Swift.String? = nil, + userId: Swift.String? = nil, + userProficiencies: [ConnectClientTypes.UserProficiency]? = nil + ) + { + self.instanceId = instanceId + self.userId = userId + self.userProficiencies = userProficiencies + } +} + +struct AssociateUserProficienciesInputBody: Swift.Equatable { + let userProficiencies: [ConnectClientTypes.UserProficiency]? +} + +extension AssociateUserProficienciesInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userProficiencies = "UserProficiencies" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let userProficienciesContainer = try containerValues.decodeIfPresent([ConnectClientTypes.UserProficiency?].self, forKey: .userProficiencies) + var userProficienciesDecoded0:[ConnectClientTypes.UserProficiency]? = nil + if let userProficienciesContainer = userProficienciesContainer { + userProficienciesDecoded0 = [ConnectClientTypes.UserProficiency]() + for structure0 in userProficienciesContainer { + if let structure0 = structure0 { + userProficienciesDecoded0?.append(structure0) + } + } + } + userProficiencies = userProficienciesDecoded0 + } +} + +extension AssociateUserProficienciesOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct AssociateUserProficienciesOutput: Swift.Equatable { + + public init() { } +} + +enum AssociateUserProficienciesOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension ConnectClientTypes.AttachmentReference: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" @@ -4152,6 +4388,8 @@ extension ConnectClientTypes.Contact: Swift.Codable { case name = "Name" case previousContactId = "PreviousContactId" case queueInfo = "QueueInfo" + case queuePriority = "QueuePriority" + case queueTimeAdjustmentSeconds = "QueueTimeAdjustmentSeconds" case relatedContactId = "RelatedContactId" case scheduledTimestamp = "ScheduledTimestamp" case tags = "Tags" @@ -4207,6 +4445,12 @@ extension ConnectClientTypes.Contact: Swift.Codable { if let queueInfo = self.queueInfo { try encodeContainer.encode(queueInfo, forKey: .queueInfo) } + if let queuePriority = self.queuePriority { + try encodeContainer.encode(queuePriority, forKey: .queuePriority) + } + if let queueTimeAdjustmentSeconds = self.queueTimeAdjustmentSeconds { + try encodeContainer.encode(queueTimeAdjustmentSeconds, forKey: .queueTimeAdjustmentSeconds) + } if let relatedContactId = self.relatedContactId { try encodeContainer.encode(relatedContactId, forKey: .relatedContactId) } @@ -4272,6 +4516,10 @@ extension ConnectClientTypes.Contact: Swift.Codable { relatedContactId = relatedContactIdDecoded let wisdomInfoDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.WisdomInfo.self, forKey: .wisdomInfo) wisdomInfo = wisdomInfoDecoded + let queueTimeAdjustmentSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .queueTimeAdjustmentSeconds) + queueTimeAdjustmentSeconds = queueTimeAdjustmentSecondsDecoded + let queuePriorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .queuePriority) + queuePriority = queuePriorityDecoded let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) var tagsDecoded0: [Swift.String:Swift.String]? = nil if let tagsContainer = tagsContainer { @@ -4286,6 +4534,11 @@ extension ConnectClientTypes.Contact: Swift.Codable { } } +extension ConnectClientTypes.Contact: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "Contact(agentInfo: \(Swift.String(describing: agentInfo)), arn: \(Swift.String(describing: arn)), channel: \(Swift.String(describing: channel)), disconnectTimestamp: \(Swift.String(describing: disconnectTimestamp)), id: \(Swift.String(describing: id)), initialContactId: \(Swift.String(describing: initialContactId)), initiationMethod: \(Swift.String(describing: initiationMethod)), initiationTimestamp: \(Swift.String(describing: initiationTimestamp)), lastPausedTimestamp: \(Swift.String(describing: lastPausedTimestamp)), lastResumedTimestamp: \(Swift.String(describing: lastResumedTimestamp)), lastUpdateTimestamp: \(Swift.String(describing: lastUpdateTimestamp)), previousContactId: \(Swift.String(describing: previousContactId)), queueInfo: \(Swift.String(describing: queueInfo)), queuePriority: \(Swift.String(describing: queuePriority)), queueTimeAdjustmentSeconds: \(Swift.String(describing: queueTimeAdjustmentSeconds)), relatedContactId: \(Swift.String(describing: relatedContactId)), scheduledTimestamp: \(Swift.String(describing: scheduledTimestamp)), tags: \(Swift.String(describing: tags)), totalPauseCount: \(Swift.String(describing: totalPauseCount)), totalPauseDurationInSeconds: \(Swift.String(describing: totalPauseDurationInSeconds)), wisdomInfo: \(Swift.String(describing: wisdomInfo)), description: \"CONTENT_REDACTED\", name: \"CONTENT_REDACTED\")"} +} + extension ConnectClientTypes { /// Contains information about a contact. public struct Contact: Swift.Equatable { @@ -4319,6 +4572,10 @@ extension ConnectClientTypes { public var previousContactId: Swift.String? /// If this contact was queued, this contains information about the queue. public var queueInfo: ConnectClientTypes.QueueInfo? + /// An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5. + public var queuePriority: Swift.Int? + /// An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value. + public var queueTimeAdjustmentSeconds: Swift.Int? /// The contactId that is [related](https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html#relatedcontactid) to this contact. public var relatedContactId: Swift.String? /// The timestamp, in Unix epoch time format, at which to start running the inbound flow. @@ -4348,6 +4605,8 @@ extension ConnectClientTypes { name: Swift.String? = nil, previousContactId: Swift.String? = nil, queueInfo: ConnectClientTypes.QueueInfo? = nil, + queuePriority: Swift.Int? = nil, + queueTimeAdjustmentSeconds: Swift.Int? = nil, relatedContactId: Swift.String? = nil, scheduledTimestamp: ClientRuntime.Date? = nil, tags: [Swift.String:Swift.String]? = nil, @@ -4371,6 +4630,8 @@ extension ConnectClientTypes { self.name = name self.previousContactId = previousContactId self.queueInfo = queueInfo + self.queuePriority = queuePriority + self.queueTimeAdjustmentSeconds = queueTimeAdjustmentSeconds self.relatedContactId = relatedContactId self.scheduledTimestamp = scheduledTimestamp self.tags = tags @@ -4382,6 +4643,41 @@ extension ConnectClientTypes { } +extension ConnectClientTypes.ContactAnalysis: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case transcript = "Transcript" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let transcript = self.transcript { + try encodeContainer.encode(transcript, forKey: .transcript) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let transcriptDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.Transcript.self, forKey: .transcript) + transcript = transcriptDecoded + } +} + +extension ConnectClientTypes { + /// A structure that defines search criteria for contacts using analysis outputs from Amazon Connect Contact Lens. + public struct ContactAnalysis: Swift.Equatable { + /// Search criteria based on transcript analyzed by Amazon Connect Contact Lens. + public var transcript: ConnectClientTypes.Transcript? + + public init( + transcript: ConnectClientTypes.Transcript? = nil + ) + { + self.transcript = transcript + } + } + +} + extension ConnectClientTypes.ContactDataRequest: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributes = "Attributes" @@ -5213,6 +5509,231 @@ extension ContactNotFoundExceptionBody: Swift.Decodable { } } +extension ConnectClientTypes.ContactSearchSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case agentInfo = "AgentInfo" + case arn = "Arn" + case channel = "Channel" + case disconnectTimestamp = "DisconnectTimestamp" + case id = "Id" + case initialContactId = "InitialContactId" + case initiationMethod = "InitiationMethod" + case initiationTimestamp = "InitiationTimestamp" + case previousContactId = "PreviousContactId" + case queueInfo = "QueueInfo" + case scheduledTimestamp = "ScheduledTimestamp" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let agentInfo = self.agentInfo { + try encodeContainer.encode(agentInfo, forKey: .agentInfo) + } + if let arn = self.arn { + try encodeContainer.encode(arn, forKey: .arn) + } + if let channel = self.channel { + try encodeContainer.encode(channel.rawValue, forKey: .channel) + } + if let disconnectTimestamp = self.disconnectTimestamp { + try encodeContainer.encodeTimestamp(disconnectTimestamp, format: .epochSeconds, forKey: .disconnectTimestamp) + } + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + if let initialContactId = self.initialContactId { + try encodeContainer.encode(initialContactId, forKey: .initialContactId) + } + if let initiationMethod = self.initiationMethod { + try encodeContainer.encode(initiationMethod.rawValue, forKey: .initiationMethod) + } + if let initiationTimestamp = self.initiationTimestamp { + try encodeContainer.encodeTimestamp(initiationTimestamp, format: .epochSeconds, forKey: .initiationTimestamp) + } + if let previousContactId = self.previousContactId { + try encodeContainer.encode(previousContactId, forKey: .previousContactId) + } + if let queueInfo = self.queueInfo { + try encodeContainer.encode(queueInfo, forKey: .queueInfo) + } + if let scheduledTimestamp = self.scheduledTimestamp { + try encodeContainer.encodeTimestamp(scheduledTimestamp, format: .epochSeconds, forKey: .scheduledTimestamp) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) + arn = arnDecoded + let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) + id = idDecoded + let initialContactIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .initialContactId) + initialContactId = initialContactIdDecoded + let previousContactIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .previousContactId) + previousContactId = previousContactIdDecoded + let initiationMethodDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.ContactInitiationMethod.self, forKey: .initiationMethod) + initiationMethod = initiationMethodDecoded + let channelDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.Channel.self, forKey: .channel) + channel = channelDecoded + let queueInfoDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.ContactSearchSummaryQueueInfo.self, forKey: .queueInfo) + queueInfo = queueInfoDecoded + let agentInfoDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.ContactSearchSummaryAgentInfo.self, forKey: .agentInfo) + agentInfo = agentInfoDecoded + let initiationTimestampDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .initiationTimestamp) + initiationTimestamp = initiationTimestampDecoded + let disconnectTimestampDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .disconnectTimestamp) + disconnectTimestamp = disconnectTimestampDecoded + let scheduledTimestampDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .scheduledTimestamp) + scheduledTimestamp = scheduledTimestampDecoded + } +} + +extension ConnectClientTypes { + /// Information of returned contact. + public struct ContactSearchSummary: Swift.Equatable { + /// Information about the agent who accepted the contact. + public var agentInfo: ConnectClientTypes.ContactSearchSummaryAgentInfo? + /// The Amazon Resource Name (ARN) of the contact. + public var arn: Swift.String? + /// How the contact reached your contact center. + public var channel: ConnectClientTypes.Channel? + /// The timestamp when the customer endpoint disconnected from Amazon Connect. + public var disconnectTimestamp: ClientRuntime.Date? + /// The identifier of the contact summary. + public var id: Swift.String? + /// If this contact is related to other contacts, this is the ID of the initial contact. + public var initialContactId: Swift.String? + /// Indicates how the contact was initiated. + public var initiationMethod: ConnectClientTypes.ContactInitiationMethod? + /// The date and time this contact was initiated, in UTC time. For INBOUND, this is when the contact arrived. For OUTBOUND, this is when the agent began dialing. For CALLBACK, this is when the callback contact was created. For TRANSFER and QUEUE_TRANSFER, this is when the transfer was initiated. For API, this is when the request arrived. For EXTERNAL_OUTBOUND, this is when the agent started dialing the external participant. For MONITOR, this is when the supervisor started listening to a contact. + public var initiationTimestamp: ClientRuntime.Date? + /// If this contact is not the first contact, this is the ID of the previous contact. + public var previousContactId: Swift.String? + /// If this contact was queued, this contains information about the queue. + public var queueInfo: ConnectClientTypes.ContactSearchSummaryQueueInfo? + /// The timestamp, in Unix epoch time format, at which to start running the inbound flow. + public var scheduledTimestamp: ClientRuntime.Date? + + public init( + agentInfo: ConnectClientTypes.ContactSearchSummaryAgentInfo? = nil, + arn: Swift.String? = nil, + channel: ConnectClientTypes.Channel? = nil, + disconnectTimestamp: ClientRuntime.Date? = nil, + id: Swift.String? = nil, + initialContactId: Swift.String? = nil, + initiationMethod: ConnectClientTypes.ContactInitiationMethod? = nil, + initiationTimestamp: ClientRuntime.Date? = nil, + previousContactId: Swift.String? = nil, + queueInfo: ConnectClientTypes.ContactSearchSummaryQueueInfo? = nil, + scheduledTimestamp: ClientRuntime.Date? = nil + ) + { + self.agentInfo = agentInfo + self.arn = arn + self.channel = channel + self.disconnectTimestamp = disconnectTimestamp + self.id = id + self.initialContactId = initialContactId + self.initiationMethod = initiationMethod + self.initiationTimestamp = initiationTimestamp + self.previousContactId = previousContactId + self.queueInfo = queueInfo + self.scheduledTimestamp = scheduledTimestamp + } + } + +} + +extension ConnectClientTypes.ContactSearchSummaryAgentInfo: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case connectedToAgentTimestamp = "ConnectedToAgentTimestamp" + case id = "Id" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let connectedToAgentTimestamp = self.connectedToAgentTimestamp { + try encodeContainer.encodeTimestamp(connectedToAgentTimestamp, format: .epochSeconds, forKey: .connectedToAgentTimestamp) + } + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) + id = idDecoded + let connectedToAgentTimestampDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .connectedToAgentTimestamp) + connectedToAgentTimestamp = connectedToAgentTimestampDecoded + } +} + +extension ConnectClientTypes { + /// Information about the agent who accepted the contact. + public struct ContactSearchSummaryAgentInfo: Swift.Equatable { + /// The timestamp when the contact was connected to the agent. + public var connectedToAgentTimestamp: ClientRuntime.Date? + /// The identifier of the agent who accepted the contact. + public var id: Swift.String? + + public init( + connectedToAgentTimestamp: ClientRuntime.Date? = nil, + id: Swift.String? = nil + ) + { + self.connectedToAgentTimestamp = connectedToAgentTimestamp + self.id = id + } + } + +} + +extension ConnectClientTypes.ContactSearchSummaryQueueInfo: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enqueueTimestamp = "EnqueueTimestamp" + case id = "Id" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let enqueueTimestamp = self.enqueueTimestamp { + try encodeContainer.encodeTimestamp(enqueueTimestamp, format: .epochSeconds, forKey: .enqueueTimestamp) + } + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) + id = idDecoded + let enqueueTimestampDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .enqueueTimestamp) + enqueueTimestamp = enqueueTimestampDecoded + } +} + +extension ConnectClientTypes { + /// If this contact was queued, this contains information about the queue. + public struct ContactSearchSummaryQueueInfo: Swift.Equatable { + /// The timestamp when the contact was added to the queue. + public var enqueueTimestamp: ClientRuntime.Date? + /// The unique identifier for the queue. + public var id: Swift.String? + + public init( + enqueueTimestamp: ClientRuntime.Date? = nil, + id: Swift.String? = nil + ) + { + self.enqueueTimestamp = enqueueTimestamp + self.id = id + } + } + +} + extension ConnectClientTypes { public enum ContactState: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case connected @@ -7096,6 +7617,102 @@ enum CreatePersistentContactAssociationOutputError: ClientRuntime.HttpResponseEr } } +extension CreatePredefinedAttributeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case name = "Name" + case values = "Values" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + if let values = self.values { + try encodeContainer.encode(values, forKey: .values) + } + } +} + +extension CreatePredefinedAttributeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + return "/predefined-attributes/\(instanceId.urlPercentEncoding())" + } +} + +public struct CreatePredefinedAttributeInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The name of the predefined attribute. + /// This member is required. + public var name: Swift.String? + /// The values of the predefined attribute. + /// This member is required. + public var values: ConnectClientTypes.PredefinedAttributeValues? + + public init( + instanceId: Swift.String? = nil, + name: Swift.String? = nil, + values: ConnectClientTypes.PredefinedAttributeValues? = nil + ) + { + self.instanceId = instanceId + self.name = name + self.values = values + } +} + +struct CreatePredefinedAttributeInputBody: Swift.Equatable { + let name: Swift.String? + let values: ConnectClientTypes.PredefinedAttributeValues? +} + +extension CreatePredefinedAttributeInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case name = "Name" + case values = "Values" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let valuesDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.PredefinedAttributeValues.self, forKey: .values) + values = valuesDecoded + } +} + +extension CreatePredefinedAttributeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct CreatePredefinedAttributeOutput: Swift.Equatable { + + public init() { } +} + +enum CreatePredefinedAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "DuplicateResourceException": return try await DuplicateResourceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension CreatePromptInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" @@ -9059,6 +9676,11 @@ enum CreateUserHierarchyGroupOutputError: ClientRuntime.HttpResponseErrorBinding } } +extension CreateUserInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "CreateUserInput(directoryUserId: \(Swift.String(describing: directoryUserId)), hierarchyGroupId: \(Swift.String(describing: hierarchyGroupId)), identityInfo: \(Swift.String(describing: identityInfo)), instanceId: \(Swift.String(describing: instanceId)), phoneConfig: \(Swift.String(describing: phoneConfig)), routingProfileId: \(Swift.String(describing: routingProfileId)), securityProfileIds: \(Swift.String(describing: securityProfileIds)), tags: \(Swift.String(describing: tags)), username: \(Swift.String(describing: username)), password: \"CONTENT_REDACTED\")"} +} + extension CreateUserInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case directoryUserId = "DirectoryUserId" @@ -9869,7 +10491,8 @@ extension ConnectClientTypes.Credentials: Swift.Codable { extension ConnectClientTypes.Credentials: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { - "Credentials(accessTokenExpiration: \(Swift.String(describing: accessTokenExpiration)), refreshTokenExpiration: \(Swift.String(describing: refreshTokenExpiration)), accessToken: \"CONTENT_REDACTED\", refreshToken: \"CONTENT_REDACTED\")"} + "CONTENT_REDACTED" + } } extension ConnectClientTypes { @@ -10906,6 +11529,71 @@ enum DeleteIntegrationAssociationOutputError: ClientRuntime.HttpResponseErrorBin } } +extension DeletePredefinedAttributeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let name = name else { + return nil + } + return "/predefined-attributes/\(instanceId.urlPercentEncoding())/\(name.urlPercentEncoding())" + } +} + +public struct DeletePredefinedAttributeInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The name of the predefined attribute. + /// This member is required. + public var name: Swift.String? + + public init( + instanceId: Swift.String? = nil, + name: Swift.String? = nil + ) + { + self.instanceId = instanceId + self.name = name + } +} + +struct DeletePredefinedAttributeInputBody: Swift.Equatable { +} + +extension DeletePredefinedAttributeInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DeletePredefinedAttributeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct DeletePredefinedAttributeOutput: Swift.Equatable { + + public init() { } +} + +enum DeletePredefinedAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceInUseException": return try await ResourceInUseException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension DeletePromptInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let instanceId = instanceId else { @@ -12938,6 +13626,100 @@ enum DescribePhoneNumberOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension DescribePredefinedAttributeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let name = name else { + return nil + } + return "/predefined-attributes/\(instanceId.urlPercentEncoding())/\(name.urlPercentEncoding())" + } +} + +public struct DescribePredefinedAttributeInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The name of the predefined attribute. + /// This member is required. + public var name: Swift.String? + + public init( + instanceId: Swift.String? = nil, + name: Swift.String? = nil + ) + { + self.instanceId = instanceId + self.name = name + } +} + +struct DescribePredefinedAttributeInputBody: Swift.Equatable { +} + +extension DescribePredefinedAttributeInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DescribePredefinedAttributeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: DescribePredefinedAttributeOutputBody = try responseDecoder.decode(responseBody: data) + self.predefinedAttribute = output.predefinedAttribute + } else { + self.predefinedAttribute = nil + } + } +} + +public struct DescribePredefinedAttributeOutput: Swift.Equatable { + /// Information about the predefined attribute. + public var predefinedAttribute: ConnectClientTypes.PredefinedAttribute? + + public init( + predefinedAttribute: ConnectClientTypes.PredefinedAttribute? = nil + ) + { + self.predefinedAttribute = predefinedAttribute + } +} + +struct DescribePredefinedAttributeOutputBody: Swift.Equatable { + let predefinedAttribute: ConnectClientTypes.PredefinedAttribute? +} + +extension DescribePredefinedAttributeOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case predefinedAttribute = "PredefinedAttribute" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let predefinedAttributeDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.PredefinedAttribute.self, forKey: .predefinedAttribute) + predefinedAttribute = predefinedAttributeDecoded + } +} + +enum DescribePredefinedAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension DescribePromptInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let instanceId = instanceId else { @@ -14114,6 +14896,7 @@ extension ConnectClientTypes.Dimensions: Swift.Codable { case channel = "Channel" case queue = "Queue" case routingProfile = "RoutingProfile" + case routingStepExpression = "RoutingStepExpression" } public func encode(to encoder: Swift.Encoder) throws { @@ -14127,6 +14910,9 @@ extension ConnectClientTypes.Dimensions: Swift.Codable { if let routingProfile = self.routingProfile { try encodeContainer.encode(routingProfile, forKey: .routingProfile) } + if let routingStepExpression = self.routingStepExpression { + try encodeContainer.encode(routingStepExpression, forKey: .routingStepExpression) + } } public init(from decoder: Swift.Decoder) throws { @@ -14137,6 +14923,8 @@ extension ConnectClientTypes.Dimensions: Swift.Codable { channel = channelDecoded let routingProfileDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.RoutingProfileReference.self, forKey: .routingProfile) routingProfile = routingProfileDecoded + let routingStepExpressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routingStepExpression) + routingStepExpression = routingStepExpressionDecoded } } @@ -14149,16 +14937,20 @@ extension ConnectClientTypes { public var queue: ConnectClientTypes.QueueReference? /// Information about the routing profile assigned to the user. public var routingProfile: ConnectClientTypes.RoutingProfileReference? + /// The expression of a step in a routing criteria. + public var routingStepExpression: Swift.String? public init( channel: ConnectClientTypes.Channel? = nil, queue: ConnectClientTypes.QueueReference? = nil, - routingProfile: ConnectClientTypes.RoutingProfileReference? = nil + routingProfile: ConnectClientTypes.RoutingProfileReference? = nil, + routingStepExpression: Swift.String? = nil ) { self.channel = channel self.queue = queue self.routingProfile = routingProfile + self.routingStepExpression = routingStepExpression } } @@ -15209,6 +16001,107 @@ enum DisassociateTrafficDistributionGroupUserOutputError: ClientRuntime.HttpResp } } +extension DisassociateUserProficienciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userProficiencies = "UserProficiencies" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let userProficiencies = userProficiencies { + var userProficienciesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .userProficiencies) + for userproficiencydisassociate0 in userProficiencies { + try userProficienciesContainer.encode(userproficiencydisassociate0) + } + } + } +} + +extension DisassociateUserProficienciesInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let userId = userId else { + return nil + } + return "/users/\(instanceId.urlPercentEncoding())/\(userId.urlPercentEncoding())/disassociate-proficiencies" + } +} + +public struct DisassociateUserProficienciesInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The identifier of the user account. + /// This member is required. + public var userId: Swift.String? + /// The proficiencies to disassociate from the user. + /// This member is required. + public var userProficiencies: [ConnectClientTypes.UserProficiencyDisassociate]? + + public init( + instanceId: Swift.String? = nil, + userId: Swift.String? = nil, + userProficiencies: [ConnectClientTypes.UserProficiencyDisassociate]? = nil + ) + { + self.instanceId = instanceId + self.userId = userId + self.userProficiencies = userProficiencies + } +} + +struct DisassociateUserProficienciesInputBody: Swift.Equatable { + let userProficiencies: [ConnectClientTypes.UserProficiencyDisassociate]? +} + +extension DisassociateUserProficienciesInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userProficiencies = "UserProficiencies" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let userProficienciesContainer = try containerValues.decodeIfPresent([ConnectClientTypes.UserProficiencyDisassociate?].self, forKey: .userProficiencies) + var userProficienciesDecoded0:[ConnectClientTypes.UserProficiencyDisassociate]? = nil + if let userProficienciesContainer = userProficienciesContainer { + userProficienciesDecoded0 = [ConnectClientTypes.UserProficiencyDisassociate]() + for structure0 in userProficienciesContainer { + if let structure0 = structure0 { + userProficienciesDecoded0?.append(structure0) + } + } + } + userProficiencies = userProficienciesDecoded0 + } +} + +extension DisassociateUserProficienciesOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct DisassociateUserProficienciesOutput: Swift.Equatable { + + public init() { } +} + +enum DisassociateUserProficienciesOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension ConnectClientTypes.DisconnectReason: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case code = "Code" @@ -17613,7 +18506,7 @@ extension ConnectClientTypes.EvaluationNote: Swift.Codable { extension ConnectClientTypes { /// Information about notes for a contact evaluation. public struct EvaluationNote: Swift.Equatable { - /// The note for an item (section or question) in a contact evaluation. + /// The note for an item (section or question) in a contact evaluation. Even though a note in an evaluation can have up to 3072 chars, there is also a limit on the total number of chars for all the notes in the evaluation combined. Assuming there are N questions in the evaluation being submitted, then the max char limit for all notes combined is N x 1024. public var value: Swift.String? public init( @@ -18216,6 +19109,7 @@ extension ConnectClientTypes.Filters: Swift.Codable { case channels = "Channels" case queues = "Queues" case routingProfiles = "RoutingProfiles" + case routingStepExpressions = "RoutingStepExpressions" } public func encode(to encoder: Swift.Encoder) throws { @@ -18238,6 +19132,12 @@ extension ConnectClientTypes.Filters: Swift.Codable { try routingProfilesContainer.encode(routingprofileid0) } } + if let routingStepExpressions = routingStepExpressions { + var routingStepExpressionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .routingStepExpressions) + for routingexpression0 in routingStepExpressions { + try routingStepExpressionsContainer.encode(routingexpression0) + } + } } public init(from decoder: Swift.Decoder) throws { @@ -18275,6 +19175,17 @@ extension ConnectClientTypes.Filters: Swift.Codable { } } routingProfiles = routingProfilesDecoded0 + let routingStepExpressionsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .routingStepExpressions) + var routingStepExpressionsDecoded0:[Swift.String]? = nil + if let routingStepExpressionsContainer = routingStepExpressionsContainer { + routingStepExpressionsDecoded0 = [Swift.String]() + for string0 in routingStepExpressionsContainer { + if let string0 = string0 { + routingStepExpressionsDecoded0?.append(string0) + } + } + } + routingStepExpressions = routingStepExpressionsDecoded0 } } @@ -18287,16 +19198,20 @@ extension ConnectClientTypes { public var queues: [Swift.String]? /// A list of up to 100 routing profile IDs or ARNs. public var routingProfiles: [Swift.String]? + /// A list of expressions as a filter, in which an expression is an object of a step in a routing criteria. + public var routingStepExpressions: [Swift.String]? public init( channels: [ConnectClientTypes.Channel]? = nil, queues: [Swift.String]? = nil, - routingProfiles: [Swift.String]? = nil + routingProfiles: [Swift.String]? = nil, + routingStepExpressions: [Swift.String]? = nil ) { self.channels = channels self.queues = queues self.routingProfiles = routingProfiles + self.routingStepExpressions = routingStepExpressions } } @@ -18539,7 +19454,7 @@ extension GetCurrentMetricDataInput: ClientRuntime.URLPathProvider { } public struct GetCurrentMetricDataInput: Swift.Equatable { - /// The metrics to retrieve. Specify the name and unit for each metric. The following metrics are available. For a description of all the metrics, see [Real-time Metrics Definitions](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html) in the Amazon Connect Administrator Guide. AGENTS_AFTER_CONTACT_WORK Unit: COUNT Name in real-time metrics report: [ACW](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#aftercallwork-real-time) AGENTS_AVAILABLE Unit: COUNT Name in real-time metrics report: [Available](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#available-real-time) AGENTS_ERROR Unit: COUNT Name in real-time metrics report: [Error](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#error-real-time) AGENTS_NON_PRODUCTIVE Unit: COUNT Name in real-time metrics report: [NPT (Non-Productive Time)](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#non-productive-time-real-time) AGENTS_ON_CALL Unit: COUNT Name in real-time metrics report: [On contact](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#on-call-real-time) AGENTS_ON_CONTACT Unit: COUNT Name in real-time metrics report: [On contact](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#on-call-real-time) AGENTS_ONLINE Unit: COUNT Name in real-time metrics report: [Online](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#online-real-time) AGENTS_STAFFED Unit: COUNT Name in real-time metrics report: [Staffed](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#staffed-real-time) CONTACTS_IN_QUEUE Unit: COUNT Name in real-time metrics report: [In queue](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#in-queue-real-time) CONTACTS_SCHEDULED Unit: COUNT Name in real-time metrics report: [Scheduled](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#scheduled-real-time) OLDEST_CONTACT_AGE Unit: SECONDS When you use groupings, Unit says SECONDS and the Value is returned in SECONDS. When you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For example, if you get a response like this: { "Metric": { "Name": "OLDEST_CONTACT_AGE", "Unit": "SECONDS" }, "Value": 24113.0 } The actual OLDEST_CONTACT_AGE is 24 seconds. Name in real-time metrics report: [Oldest](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#oldest-real-time) SLOTS_ACTIVE Unit: COUNT Name in real-time metrics report: [Active](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#active-real-time) SLOTS_AVAILABLE Unit: COUNT Name in real-time metrics report: [Availability](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#availability-real-time) + /// The metrics to retrieve. Specify the name and unit for each metric. The following metrics are available. For a description of all the metrics, see [Real-time Metrics Definitions](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html) in the Amazon Connect Administrator Guide. AGENTS_AFTER_CONTACT_WORK Unit: COUNT Name in real-time metrics report: [ACW](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#aftercallwork-real-time) AGENTS_AVAILABLE Unit: COUNT Name in real-time metrics report: [Available](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#available-real-time) AGENTS_ERROR Unit: COUNT Name in real-time metrics report: [Error](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#error-real-time) AGENTS_NON_PRODUCTIVE Unit: COUNT Name in real-time metrics report: [NPT (Non-Productive Time)](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#non-productive-time-real-time) AGENTS_ON_CALL Unit: COUNT Name in real-time metrics report: [On contact](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#on-call-real-time) AGENTS_ON_CONTACT Unit: COUNT Name in real-time metrics report: [On contact](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#on-call-real-time) AGENTS_ONLINE Unit: COUNT Name in real-time metrics report: [Online](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#online-real-time) AGENTS_STAFFED Unit: COUNT Name in real-time metrics report: [Staffed](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#staffed-real-time) CONTACTS_IN_QUEUE Unit: COUNT Name in real-time metrics report: [In queue](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#in-queue-real-time) CONTACTS_SCHEDULED Unit: COUNT Name in real-time metrics report: [Scheduled](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#scheduled-real-time) OLDEST_CONTACT_AGE Unit: SECONDS When you use groupings, Unit says SECONDS and the Value is returned in SECONDS. When you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For example, if you get a response like this: { "Metric": { "Name": "OLDEST_CONTACT_AGE", "Unit": "SECONDS" }, "Value": 24113.0 } The actual OLDEST_CONTACT_AGE is 24 seconds. When the filter RoutingStepExpression is used, this metric is still calculated from enqueue time. For example, if a contact that has been queued under for 10 seconds has expired and becomes active, then OLDEST_CONTACT_AGE for this queue will be counted starting from 10, not 0. Name in real-time metrics report: [Oldest](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#oldest-real-time) SLOTS_ACTIVE Unit: COUNT Name in real-time metrics report: [Active](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#active-real-time) SLOTS_AVAILABLE Unit: COUNT Name in real-time metrics report: [Availability](https://docs.aws.amazon.com/connect/latest/adminguide/real-time-metrics-definitions.html#availability-real-time) /// This member is required. public var currentMetrics: [ConnectClientTypes.CurrentMetric]? /// The filters to apply to returned metrics. You can filter up to the following limits: @@ -18550,8 +19465,10 @@ public struct GetCurrentMetricDataInput: Swift.Equatable { /// /// * Channels: 3 (VOICE, CHAT, and TASK channels are supported.) /// + /// * RoutingStepExpressions: 50 /// - /// Metric data is retrieved only for the resources associated with the queues or routing profiles, and by any channels included in the filter. (You cannot filter by both queue AND routing profile.) You can include both resource IDs and resource ARNs in the same request. Currently tagging is only supported on the resources that are passed in the filter. + /// + /// Metric data is retrieved only for the resources associated with the queues or routing profiles, and by any channels included in the filter. (You cannot filter by both queue AND routing profile.) You can include both resource IDs and resource ARNs in the same request. When using RoutingStepExpression, you need to pass exactly one QueueId. Currently tagging is only supported on the resources that are passed in the filter. /// This member is required. public var filters: ConnectClientTypes.Filters? /// The grouping applied to the metrics returned. For example, when grouped by QUEUE, the metrics returned apply to each queue rather than aggregated for all queues. @@ -18561,6 +19478,8 @@ public struct GetCurrentMetricDataInput: Swift.Equatable { /// * If you group by ROUTING_PROFILE, you must include either a queue or routing profile filter. In addition, a routing profile filter is required for metrics CONTACTS_SCHEDULED, CONTACTS_IN_QUEUE, and OLDEST_CONTACT_AGE. /// /// * If no Grouping is included in the request, a summary of metrics is returned. + /// + /// * When using the RoutingStepExpression filter, group by ROUTING_STEP_EXPRESSION is required. public var groupings: [ConnectClientTypes.Grouping]? /// The identifier of the Amazon Connect instance. You can [find the instance ID](https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) in the Amazon Resource Name (ARN) of the instance. /// This member is required. @@ -18959,6 +19878,11 @@ extension GetFederationTokenInputBody: Swift.Decodable { } } +extension GetFederationTokenOutput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "GetFederationTokenOutput(signInUrl: \(Swift.String(describing: signInUrl)), userArn: \(Swift.String(describing: userArn)), userId: \(Swift.String(describing: userId)), credentials: \"CONTENT_REDACTED\")"} +} + extension GetFederationTokenOutput: ClientRuntime.HttpResponseBinding { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { if let data = try await httpResponse.body.readData(), @@ -19224,10 +20148,10 @@ public struct GetMetricDataInput: Swift.Equatable { /// The timestamp, in UNIX Epoch time format, at which to end the reporting interval for the retrieval of historical metrics data. The time must be specified using an interval of 5 minutes, such as 11:00, 11:05, 11:10, and must be later than the start time timestamp. The time range between the start and end time must be less than 24 hours. /// This member is required. public var endTime: ClientRuntime.Date? - /// The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported. To filter by Queues, enter the queue ID/ARN, not the name of the queue. + /// The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported. RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features. To filter by Queues, enter the queue ID/ARN, not the name of the queue. /// This member is required. public var filters: ConnectClientTypes.Filters? - /// The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues. If no grouping is specified, a summary of metrics for all queues is returned. + /// The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues. If no grouping is specified, a summary of metrics for all queues is returned. RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features. public var groupings: [ConnectClientTypes.Grouping]? /// The metrics to retrieve. Specify the name, unit, and statistic for each metric. The following historical metrics are available. For a description of each metric, see [Historical Metrics Definitions](https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html) in the Amazon Connect Administrator Guide. This API does not support a contacts incoming metric (there's no CONTACTS_INCOMING metric missing from the documented list). ABANDON_TIME Unit: SECONDS Statistic: AVG AFTER_CONTACT_WORK_TIME Unit: SECONDS Statistic: AVG API_CONTACTS_HANDLED Unit: COUNT Statistic: SUM CALLBACK_CONTACTS_HANDLED Unit: COUNT Statistic: SUM CONTACTS_ABANDONED Unit: COUNT Statistic: SUM CONTACTS_AGENT_HUNG_UP_FIRST Unit: COUNT Statistic: SUM CONTACTS_CONSULTED Unit: COUNT Statistic: SUM CONTACTS_HANDLED Unit: COUNT Statistic: SUM CONTACTS_HANDLED_INCOMING Unit: COUNT Statistic: SUM CONTACTS_HANDLED_OUTBOUND Unit: COUNT Statistic: SUM CONTACTS_HOLD_ABANDONS Unit: COUNT Statistic: SUM CONTACTS_MISSED Unit: COUNT Statistic: SUM CONTACTS_QUEUED Unit: COUNT Statistic: SUM CONTACTS_TRANSFERRED_IN Unit: COUNT Statistic: SUM CONTACTS_TRANSFERRED_IN_FROM_QUEUE Unit: COUNT Statistic: SUM CONTACTS_TRANSFERRED_OUT Unit: COUNT Statistic: SUM CONTACTS_TRANSFERRED_OUT_FROM_QUEUE Unit: COUNT Statistic: SUM HANDLE_TIME Unit: SECONDS Statistic: AVG HOLD_TIME Unit: SECONDS Statistic: AVG INTERACTION_AND_HOLD_TIME Unit: SECONDS Statistic: AVG INTERACTION_TIME Unit: SECONDS Statistic: AVG OCCUPANCY Unit: PERCENT Statistic: AVG QUEUE_ANSWER_TIME Unit: SECONDS Statistic: AVG QUEUED_TIME Unit: SECONDS Statistic: MAX SERVICE_LEVEL You can include up to 20 SERVICE_LEVEL metrics in a request. Unit: PERCENT Statistic: AVG Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). /// This member is required. @@ -19475,15 +20399,17 @@ public struct GetMetricDataV2Input: Swift.Equatable { /// /// * Feature /// + /// * Routing step expression + /// /// /// At least one filter must be passed from queues, routing profiles, agents, or user hierarchy groups. To filter by phone number, see [Create a historical metrics report](https://docs.aws.amazon.com/connect/latest/adminguide/create-historical-metrics-report.html) in the Amazon Connect Administrator's Guide. Note the following limits: /// - /// * Filter keys: A maximum of 5 filter keys are supported in a single request. Valid filter keys: QUEUE | ROUTING_PROFILE | AGENT | CHANNEL | AGENT_HIERARCHY_LEVEL_ONE | AGENT_HIERARCHY_LEVEL_TWO | AGENT_HIERARCHY_LEVEL_THREE | AGENT_HIERARCHY_LEVEL_FOUR | AGENT_HIERARCHY_LEVEL_FIVE | FEATURE | contact/segmentAttributes/connect:Subtype + /// * Filter keys: A maximum of 5 filter keys are supported in a single request. Valid filter keys: QUEUE | ROUTING_PROFILE | AGENT | CHANNEL | AGENT_HIERARCHY_LEVEL_ONE | AGENT_HIERARCHY_LEVEL_TWO | AGENT_HIERARCHY_LEVEL_THREE | AGENT_HIERARCHY_LEVEL_FOUR | AGENT_HIERARCHY_LEVEL_FIVE | FEATURE | contact/segmentAttributes/connect:Subtype | ROUTING_STEP_EXPRESSION /// - /// * Filter values: A maximum of 100 filter values are supported in a single request. VOICE, CHAT, and TASK are valid filterValue for the CHANNEL filter key. They do not count towards limitation of 100 filter values. For example, a GetMetricDataV2 request can filter by 50 queues, 35 agents, and 15 routing profiles for a total of 100 filter values, along with 3 channel filters. contact_lens_conversational_analytics is a valid filterValue for the FEATURE filter key. It is available only to contacts analyzed by Contact Lens conversational analytics. connect:Chat, connect:SMS, connect:Telephony, and connect:WebRTC are valid filterValue examples (not exhaustive) for the contact/segmentAttributes/connect:Subtype filter key. + /// * Filter values: A maximum of 100 filter values are supported in a single request. VOICE, CHAT, and TASK are valid filterValue for the CHANNEL filter key. They do not count towards limitation of 100 filter values. For example, a GetMetricDataV2 request can filter by 50 queues, 35 agents, and 15 routing profiles for a total of 100 filter values, along with 3 channel filters. contact_lens_conversational_analytics is a valid filterValue for the FEATURE filter key. It is available only to contacts analyzed by Contact Lens conversational analytics. connect:Chat, connect:SMS, connect:Telephony, and connect:WebRTC are valid filterValue examples (not exhaustive) for the contact/segmentAttributes/connect:Subtype filter key. ROUTING_STEP_EXPRESSION is a valid filter key with a filter value up to 3000 length. /// This member is required. public var filters: [ConnectClientTypes.FilterV2]? - /// The grouping applied to the metrics that are returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values that are returned apply to the metrics for each queue. They are not aggregated for all queues. If no grouping is specified, a summary of all metrics is returned. Valid grouping keys: QUEUE | ROUTING_PROFILE | AGENT | CHANNEL | AGENT_HIERARCHY_LEVEL_ONE | AGENT_HIERARCHY_LEVEL_TWO | AGENT_HIERARCHY_LEVEL_THREE | AGENT_HIERARCHY_LEVEL_FOUR | AGENT_HIERARCHY_LEVEL_FIVE, contact/segmentAttributes/connect:Subtype + /// The grouping applied to the metrics that are returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values that are returned apply to the metrics for each queue. They are not aggregated for all queues. If no grouping is specified, a summary of all metrics is returned. Valid grouping keys: QUEUE | ROUTING_PROFILE | AGENT | CHANNEL | AGENT_HIERARCHY_LEVEL_ONE | AGENT_HIERARCHY_LEVEL_TWO | AGENT_HIERARCHY_LEVEL_THREE | AGENT_HIERARCHY_LEVEL_FOUR | AGENT_HIERARCHY_LEVEL_FIVE, contact/segmentAttributes/connect:Subtype | ROUTING_STEP_EXPRESSION public var groupings: [Swift.String]? /// The interval period and timezone to apply to returned metrics. /// @@ -19508,7 +20434,7 @@ public struct GetMetricDataV2Input: Swift.Equatable { public var interval: ConnectClientTypes.IntervalDetails? /// The maximum number of results to return per page. public var maxResults: Swift.Int? - /// The metrics to retrieve. Specify the name, groupings, and filters for each metric. The following historical metrics are available. For a description of each metric, see [Historical metrics definitions](https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html) in the Amazon Connect Administrator's Guide. ABANDONMENT_RATE Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype AGENT_ADHERENT_TIME This metric is available only in Amazon Web Services Regions where [Forecasting, capacity planning, and scheduling](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) is available. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_ANSWER_RATE Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_NON_ADHERENT_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_NON_RESPONSE Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_NON_RESPONSE_WITHOUT_CUSTOMER_ABANDONS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy Data for this metric is available starting from October 1, 2023 0:00:00 GMT. AGENT_OCCUPANCY Unit: Percentage Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy AGENT_SCHEDULE_ADHERENCE This metric is available only in Amazon Web Services Regions where [Forecasting, capacity planning, and scheduling](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) is available. Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_SCHEDULED_TIME This metric is available only in Amazon Web Services Regions where [Forecasting, capacity planning, and scheduling](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) is available. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AVG_ABANDON_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype AVG_ACTIVE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AVG_AFTER_CONTACT_WORK_TIME Unit: Seconds Valid metric filter key: INITIATION_METHOD Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_AGENT_CONNECTING_TIME Unit: Seconds Valid metric filter key: INITIATION_METHOD. For now, this metric only supports the following as INITIATION_METHOD: INBOUND | OUTBOUND | CALLBACK | API Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy The Negate key in Metric Level Filters is not applicable for this metric. AVG_AGENT_PAUSE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AVG_CONTACT_DURATION Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_CONVERSATION_DURATION Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype AVG_GREETING_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_HANDLE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_HOLD_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_HOLD_TIME_ALL_CONTACTS Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_HOLDS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_INTERACTION_AND_HOLD_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_INTERACTION_TIME Unit: Seconds Valid metric filter key: INITIATION_METHOD Valid groupings and filters: Queue, Channel, Routing Profile, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_INTERRUPTIONS_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_INTERRUPTION_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_NON_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_QUEUE_ANSWER_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_RESOLUTION_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype AVG_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_TALK_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_TALK_TIME_CUSTOMER This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_ABANDONED Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_CREATED Unit: Count Valid metric filter key: INITIATION_METHOD Valid groupings and filters: Queue, Channel, Routing Profile, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. CONTACTS_HANDLED Unit: Count Valid metric filter key: INITIATION_METHOD, DISCONNECT_REASON Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. CONTACTS_HOLD_ABANDONS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_ON_HOLD_AGENT_DISCONNECT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_ON_HOLD_CUSTOMER_DISCONNECT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_PUT_ON_HOLD Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_TRANSFERRED_OUT_EXTERNAL Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_TRANSFERRED_OUT_INTERNAL Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_QUEUED Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_RESOLVED_IN_X Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype Threshold: For ThresholdValue enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). CONTACTS_TRANSFERRED_OUT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. CONTACTS_TRANSFERRED_OUT_BY_AGENT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_TRANSFERRED_OUT_FROM_QUEUE Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype MAX_QUEUED_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_NON_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_TALK_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_TALK_TIME_CUSTOMER This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype SERVICE_LEVEL You can include up to 20 SERVICE_LEVEL metrics in a request. Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). SUM_AFTER_CONTACT_WORK_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_CONNECTING_TIME_AGENT Unit: Seconds Valid metric filter key: INITIATION_METHOD. This metric only supports the following filter keys as INITIATION_METHOD: INBOUND | OUTBOUND | CALLBACK | API Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy The Negate key in Metric Level Filters is not applicable for this metric. SUM_CONTACT_FLOW_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_CONTACT_TIME_AGENT Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_CONTACTS_ANSWERED_IN_X Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). SUM_CONTACTS_ABANDONED_IN_X Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). SUM_CONTACTS_DISCONNECTED Valid metric filter key: DISCONNECT_REASON Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype SUM_ERROR_STATUS_TIME_AGENT Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_HANDLE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_HOLD_TIME Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_IDLE_TIME_AGENT Unit: Seconds Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy SUM_INTERACTION_AND_HOLD_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_INTERACTION_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_NON_PRODUCTIVE_TIME_AGENT Unit: Seconds Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy SUM_ONLINE_TIME_AGENT Unit: Seconds Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy SUM_RETRY_CALLBACK_ATTEMPTS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype + /// The metrics to retrieve. Specify the name, groupings, and filters for each metric. The following historical metrics are available. For a description of each metric, see [Historical metrics definitions](https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html) in the Amazon Connect Administrator's Guide. ABANDONMENT_RATE Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype AGENT_ADHERENT_TIME This metric is available only in Amazon Web Services Regions where [Forecasting, capacity planning, and scheduling](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) is available. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_ANSWER_RATE Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_NON_ADHERENT_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_NON_RESPONSE Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_NON_RESPONSE_WITHOUT_CUSTOMER_ABANDONS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy Data for this metric is available starting from October 1, 2023 0:00:00 GMT. AGENT_OCCUPANCY Unit: Percentage Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy AGENT_SCHEDULE_ADHERENCE This metric is available only in Amazon Web Services Regions where [Forecasting, capacity planning, and scheduling](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) is available. Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AGENT_SCHEDULED_TIME This metric is available only in Amazon Web Services Regions where [Forecasting, capacity planning, and scheduling](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#optimization_region) is available. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AVG_ABANDON_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype AVG_ACTIVE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AVG_AFTER_CONTACT_WORK_TIME Unit: Seconds Valid metric filter key: INITIATION_METHOD Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_AGENT_CONNECTING_TIME Unit: Seconds Valid metric filter key: INITIATION_METHOD. For now, this metric only supports the following as INITIATION_METHOD: INBOUND | OUTBOUND | CALLBACK | API Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy The Negate key in Metric Level Filters is not applicable for this metric. AVG_AGENT_PAUSE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy AVG_CONTACT_DURATION Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_CONVERSATION_DURATION Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype AVG_GREETING_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_HANDLE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype, RoutingStepExpression Feature is a valid filter but not a valid grouping. AVG_HOLD_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_HOLD_TIME_ALL_CONTACTS Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_HOLDS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_INTERACTION_AND_HOLD_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_INTERACTION_TIME Unit: Seconds Valid metric filter key: INITIATION_METHOD Valid groupings and filters: Queue, Channel, Routing Profile, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_INTERRUPTIONS_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_INTERRUPTION_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_NON_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_QUEUE_ANSWER_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. AVG_RESOLUTION_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype AVG_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_TALK_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype AVG_TALK_TIME_CUSTOMER This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_ABANDONED Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype, RoutingStepExpression CONTACTS_CREATED Unit: Count Valid metric filter key: INITIATION_METHOD Valid groupings and filters: Queue, Channel, Routing Profile, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. CONTACTS_HANDLED Unit: Count Valid metric filter key: INITIATION_METHOD, DISCONNECT_REASON Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype, RoutingStepExpression Feature is a valid filter but not a valid grouping. CONTACTS_HOLD_ABANDONS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_ON_HOLD_AGENT_DISCONNECT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_ON_HOLD_CUSTOMER_DISCONNECT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_PUT_ON_HOLD Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_TRANSFERRED_OUT_EXTERNAL Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_TRANSFERRED_OUT_INTERNAL Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy CONTACTS_QUEUED Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_RESOLVED_IN_X Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype Threshold: For ThresholdValue enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). CONTACTS_TRANSFERRED_OUT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, Feature, contact/segmentAttributes/connect:Subtype Feature is a valid filter but not a valid grouping. CONTACTS_TRANSFERRED_OUT_BY_AGENT Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype CONTACTS_TRANSFERRED_OUT_FROM_QUEUE Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype MAX_QUEUED_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_CONTACTS_STEP_EXPIRED Unit: Percent Valid groupings and filters: Queue, RoutingStepExpression PERCENT_CONTACTS_STEP_JOINED Unit: Percent Valid groupings and filters: Queue, RoutingStepExpression PERCENT_NON_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_TALK_TIME This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_TALK_TIME_AGENT This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype PERCENT_TALK_TIME_CUSTOMER This metric is available only for contacts analyzed by Contact Lens conversational analytics. Unit: Percentage Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype SERVICE_LEVEL You can include up to 20 SERVICE_LEVEL metrics in a request. Unit: Percent Valid groupings and filters: Queue, Channel, Routing Profile Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). STEP_CONTACTS_QUEUED Unit: Count Valid groupings and filters: Queue, RoutingStepExpression SUM_AFTER_CONTACT_WORK_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_CONNECTING_TIME_AGENT Unit: Seconds Valid metric filter key: INITIATION_METHOD. This metric only supports the following filter keys as INITIATION_METHOD: INBOUND | OUTBOUND | CALLBACK | API Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy The Negate key in Metric Level Filters is not applicable for this metric. SUM_CONTACT_FLOW_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_CONTACT_TIME_AGENT Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_CONTACTS_ANSWERED_IN_X Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). SUM_CONTACTS_ABANDONED_IN_X Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype Threshold: For ThresholdValue, enter any whole number from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for "Less than"). SUM_CONTACTS_DISCONNECTED Valid metric filter key: DISCONNECT_REASON Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy, contact/segmentAttributes/connect:Subtype SUM_ERROR_STATUS_TIME_AGENT Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_HANDLE_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_HOLD_TIME Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_IDLE_TIME_AGENT Unit: Seconds Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy SUM_INTERACTION_AND_HOLD_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_INTERACTION_TIME Unit: Seconds Valid groupings and filters: Queue, Channel, Routing Profile, Agent, Agent Hierarchy SUM_NON_PRODUCTIVE_TIME_AGENT Unit: Seconds Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy SUM_ONLINE_TIME_AGENT Unit: Seconds Valid groupings and filters: Routing Profile, Agent, Agent Hierarchy SUM_RETRY_CALLBACK_ATTEMPTS Unit: Count Valid groupings and filters: Queue, Channel, Routing Profile, contact/segmentAttributes/connect:Subtype /// This member is required. public var metrics: [ConnectClientTypes.MetricV2]? /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. @@ -20190,6 +21116,7 @@ extension ConnectClientTypes { case channel case queue case routingProfile + case routingStepExpression case sdkUnknown(Swift.String) public static var allCases: [Grouping] { @@ -20197,6 +21124,7 @@ extension ConnectClientTypes { .channel, .queue, .routingProfile, + .routingStepExpression, .sdkUnknown("") ] } @@ -20209,6 +21137,7 @@ extension ConnectClientTypes { case .channel: return "CHANNEL" case .queue: return "QUEUE" case .routingProfile: return "ROUTING_PROFILE" + case .routingStepExpression: return "ROUTING_STEP_EXPRESSION" case let .sdkUnknown(s): return s } } @@ -22096,6 +23025,7 @@ extension ConnectClientTypes { case contactflowLogs case contactLens case earlyMedia + case enhancedChatMonitoring case enhancedContactMonitoring case highVolumeOutbound case inboundCalls @@ -22110,6 +23040,7 @@ extension ConnectClientTypes { .contactflowLogs, .contactLens, .earlyMedia, + .enhancedChatMonitoring, .enhancedContactMonitoring, .highVolumeOutbound, .inboundCalls, @@ -22129,6 +23060,7 @@ extension ConnectClientTypes { case .contactflowLogs: return "CONTACTFLOW_LOGS" case .contactLens: return "CONTACT_LENS" case .earlyMedia: return "EARLY_MEDIA" + case .enhancedChatMonitoring: return "ENHANCED_CHAT_MONITORING" case .enhancedContactMonitoring: return "ENHANCED_CONTACT_MONITORING" case .highVolumeOutbound: return "HIGH_VOLUME_OUTBOUND" case .inboundCalls: return "INBOUND_CALLS" @@ -26523,6 +27455,136 @@ enum ListPhoneNumbersV2OutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension ListPredefinedAttributesInput: ClientRuntime.QueryItemProvider { + public var queryItems: [ClientRuntime.URLQueryItem] { + get throws { + var items = [ClientRuntime.URLQueryItem]() + if let nextToken = nextToken { + let nextTokenQueryItem = ClientRuntime.URLQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = maxResults { + let maxResultsQueryItem = ClientRuntime.URLQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + return items + } + } +} + +extension ListPredefinedAttributesInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + return "/predefined-attributes/\(instanceId.urlPercentEncoding())" + } +} + +public struct ListPredefinedAttributesInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The maximum number of results to return per page. + public var maxResults: Swift.Int? + /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. + public var nextToken: Swift.String? + + public init( + instanceId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil + ) + { + self.instanceId = instanceId + self.maxResults = maxResults + self.nextToken = nextToken + } +} + +struct ListPredefinedAttributesInputBody: Swift.Equatable { +} + +extension ListPredefinedAttributesInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension ListPredefinedAttributesOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ListPredefinedAttributesOutputBody = try responseDecoder.decode(responseBody: data) + self.nextToken = output.nextToken + self.predefinedAttributeSummaryList = output.predefinedAttributeSummaryList + } else { + self.nextToken = nil + self.predefinedAttributeSummaryList = nil + } + } +} + +public struct ListPredefinedAttributesOutput: Swift.Equatable { + /// If there are additional results, this is the token for the next set of results. + public var nextToken: Swift.String? + /// Summary of the predefined attributes. + public var predefinedAttributeSummaryList: [ConnectClientTypes.PredefinedAttributeSummary]? + + public init( + nextToken: Swift.String? = nil, + predefinedAttributeSummaryList: [ConnectClientTypes.PredefinedAttributeSummary]? = nil + ) + { + self.nextToken = nextToken + self.predefinedAttributeSummaryList = predefinedAttributeSummaryList + } +} + +struct ListPredefinedAttributesOutputBody: Swift.Equatable { + let nextToken: Swift.String? + let predefinedAttributeSummaryList: [ConnectClientTypes.PredefinedAttributeSummary]? +} + +extension ListPredefinedAttributesOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case predefinedAttributeSummaryList = "PredefinedAttributeSummaryList" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + let predefinedAttributeSummaryListContainer = try containerValues.decodeIfPresent([ConnectClientTypes.PredefinedAttributeSummary?].self, forKey: .predefinedAttributeSummaryList) + var predefinedAttributeSummaryListDecoded0:[ConnectClientTypes.PredefinedAttributeSummary]? = nil + if let predefinedAttributeSummaryListContainer = predefinedAttributeSummaryListContainer { + predefinedAttributeSummaryListDecoded0 = [ConnectClientTypes.PredefinedAttributeSummary]() + for structure0 in predefinedAttributeSummaryListContainer { + if let structure0 = structure0 { + predefinedAttributeSummaryListDecoded0?.append(structure0) + } + } + } + predefinedAttributeSummaryList = predefinedAttributeSummaryListDecoded0 + } +} + +enum ListPredefinedAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension ListPromptsInput: ClientRuntime.QueryItemProvider { public var queryItems: [ClientRuntime.URLQueryItem] { get throws { @@ -29081,6 +30143,164 @@ enum ListUserHierarchyGroupsOutputError: ClientRuntime.HttpResponseErrorBinding } } +extension ListUserProficienciesInput: ClientRuntime.QueryItemProvider { + public var queryItems: [ClientRuntime.URLQueryItem] { + get throws { + var items = [ClientRuntime.URLQueryItem]() + if let nextToken = nextToken { + let nextTokenQueryItem = ClientRuntime.URLQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = maxResults { + let maxResultsQueryItem = ClientRuntime.URLQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + return items + } + } +} + +extension ListUserProficienciesInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let userId = userId else { + return nil + } + return "/users/\(instanceId.urlPercentEncoding())/\(userId.urlPercentEncoding())/proficiencies" + } +} + +public struct ListUserProficienciesInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The maximum number of results to return per page. + public var maxResults: Swift.Int? + /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. + public var nextToken: Swift.String? + /// The identifier of the user account. + /// This member is required. + public var userId: Swift.String? + + public init( + instanceId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + userId: Swift.String? = nil + ) + { + self.instanceId = instanceId + self.maxResults = maxResults + self.nextToken = nextToken + self.userId = userId + } +} + +struct ListUserProficienciesInputBody: Swift.Equatable { +} + +extension ListUserProficienciesInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension ListUserProficienciesOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ListUserProficienciesOutputBody = try responseDecoder.decode(responseBody: data) + self.lastModifiedRegion = output.lastModifiedRegion + self.lastModifiedTime = output.lastModifiedTime + self.nextToken = output.nextToken + self.userProficiencyList = output.userProficiencyList + } else { + self.lastModifiedRegion = nil + self.lastModifiedTime = nil + self.nextToken = nil + self.userProficiencyList = nil + } + } +} + +public struct ListUserProficienciesOutput: Swift.Equatable { + /// The region in which a user's proficiencies were last modified. + public var lastModifiedRegion: Swift.String? + /// The last time that the user's proficiencies are were modified. + public var lastModifiedTime: ClientRuntime.Date? + /// If there are additional results, this is the token for the next set of results. + public var nextToken: Swift.String? + /// Information about the user proficiencies. + public var userProficiencyList: [ConnectClientTypes.UserProficiency]? + + public init( + lastModifiedRegion: Swift.String? = nil, + lastModifiedTime: ClientRuntime.Date? = nil, + nextToken: Swift.String? = nil, + userProficiencyList: [ConnectClientTypes.UserProficiency]? = nil + ) + { + self.lastModifiedRegion = lastModifiedRegion + self.lastModifiedTime = lastModifiedTime + self.nextToken = nextToken + self.userProficiencyList = userProficiencyList + } +} + +struct ListUserProficienciesOutputBody: Swift.Equatable { + let nextToken: Swift.String? + let userProficiencyList: [ConnectClientTypes.UserProficiency]? + let lastModifiedTime: ClientRuntime.Date? + let lastModifiedRegion: Swift.String? +} + +extension ListUserProficienciesOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case lastModifiedRegion = "LastModifiedRegion" + case lastModifiedTime = "LastModifiedTime" + case nextToken = "NextToken" + case userProficiencyList = "UserProficiencyList" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + let userProficiencyListContainer = try containerValues.decodeIfPresent([ConnectClientTypes.UserProficiency?].self, forKey: .userProficiencyList) + var userProficiencyListDecoded0:[ConnectClientTypes.UserProficiency]? = nil + if let userProficiencyListContainer = userProficiencyListContainer { + userProficiencyListDecoded0 = [ConnectClientTypes.UserProficiency]() + for structure0 in userProficiencyListContainer { + if let structure0 = structure0 { + userProficiencyListDecoded0?.append(structure0) + } + } + } + userProficiencyList = userProficiencyListDecoded0 + let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastModifiedTime) + lastModifiedTime = lastModifiedTimeDecoded + let lastModifiedRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastModifiedRegion) + lastModifiedRegion = lastModifiedRegionDecoded + } +} + +enum ListUserProficienciesOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension ListUsersInput: ClientRuntime.QueryItemProvider { public var queryItems: [ClientRuntime.URLQueryItem] { get throws { @@ -30204,7 +31424,7 @@ extension MonitorContactInput: ClientRuntime.URLPathProvider { } public struct MonitorContactInput: Swift.Equatable { - /// Specify which monitoring actions the user is allowed to take. For example, whether the user is allowed to escalate from silent monitoring to barge. + /// Specify which monitoring actions the user is allowed to take. For example, whether the user is allowed to escalate from silent monitoring to barge. AllowedMonitorCapabilities is required if barge is enabled. public var allowedMonitorCapabilities: [ConnectClientTypes.MonitorCapability]? /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see [Making retries safe with idempotent APIs](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/). public var clientToken: Swift.String? @@ -30984,6 +32204,7 @@ extension ConnectClientTypes { case agent case customer case customBot + case supervisor case system case sdkUnknown(Swift.String) @@ -30992,6 +32213,7 @@ extension ConnectClientTypes { .agent, .customer, .customBot, + .supervisor, .system, .sdkUnknown("") ] @@ -31005,6 +32227,7 @@ extension ConnectClientTypes { case .agent: return "AGENT" case .customer: return "CUSTOMER" case .customBot: return "CUSTOM_BOT" + case .supervisor: return "SUPERVISOR" case .system: return "SYSTEM" case let .sdkUnknown(s): return s } @@ -32394,6 +33617,254 @@ extension ConnectClientTypes { } } +extension ConnectClientTypes.PredefinedAttribute: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case lastModifiedRegion = "LastModifiedRegion" + case lastModifiedTime = "LastModifiedTime" + case name = "Name" + case values = "Values" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let lastModifiedRegion = self.lastModifiedRegion { + try encodeContainer.encode(lastModifiedRegion, forKey: .lastModifiedRegion) + } + if let lastModifiedTime = self.lastModifiedTime { + try encodeContainer.encodeTimestamp(lastModifiedTime, format: .epochSeconds, forKey: .lastModifiedTime) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + if let values = self.values { + try encodeContainer.encode(values, forKey: .values) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let valuesDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.PredefinedAttributeValues.self, forKey: .values) + values = valuesDecoded + let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastModifiedTime) + lastModifiedTime = lastModifiedTimeDecoded + let lastModifiedRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastModifiedRegion) + lastModifiedRegion = lastModifiedRegionDecoded + } +} + +extension ConnectClientTypes { + /// Information about a predefined attribute. + public struct PredefinedAttribute: Swift.Equatable { + /// Last modified region. + public var lastModifiedRegion: Swift.String? + /// Last modified time. + public var lastModifiedTime: ClientRuntime.Date? + /// The name of the predefined attribute. + public var name: Swift.String? + /// The values of the predefined attribute. + public var values: ConnectClientTypes.PredefinedAttributeValues? + + public init( + lastModifiedRegion: Swift.String? = nil, + lastModifiedTime: ClientRuntime.Date? = nil, + name: Swift.String? = nil, + values: ConnectClientTypes.PredefinedAttributeValues? = nil + ) + { + self.lastModifiedRegion = lastModifiedRegion + self.lastModifiedTime = lastModifiedTime + self.name = name + self.values = values + } + } + +} + +extension ConnectClientTypes.PredefinedAttributeSearchCriteria: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case andConditions = "AndConditions" + case orConditions = "OrConditions" + case stringCondition = "StringCondition" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let andConditions = andConditions { + var andConditionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .andConditions) + for predefinedattributesearchcriteria0 in andConditions { + try andConditionsContainer.encode(predefinedattributesearchcriteria0) + } + } + if let orConditions = orConditions { + var orConditionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .orConditions) + for predefinedattributesearchcriteria0 in orConditions { + try orConditionsContainer.encode(predefinedattributesearchcriteria0) + } + } + if let stringCondition = self.stringCondition { + try encodeContainer.encode(stringCondition, forKey: .stringCondition) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let orConditionsContainer = try containerValues.decodeIfPresent([ConnectClientTypes.PredefinedAttributeSearchCriteria?].self, forKey: .orConditions) + var orConditionsDecoded0:[ConnectClientTypes.PredefinedAttributeSearchCriteria]? = nil + if let orConditionsContainer = orConditionsContainer { + orConditionsDecoded0 = [ConnectClientTypes.PredefinedAttributeSearchCriteria]() + for structure0 in orConditionsContainer { + if let structure0 = structure0 { + orConditionsDecoded0?.append(structure0) + } + } + } + orConditions = orConditionsDecoded0 + let andConditionsContainer = try containerValues.decodeIfPresent([ConnectClientTypes.PredefinedAttributeSearchCriteria?].self, forKey: .andConditions) + var andConditionsDecoded0:[ConnectClientTypes.PredefinedAttributeSearchCriteria]? = nil + if let andConditionsContainer = andConditionsContainer { + andConditionsDecoded0 = [ConnectClientTypes.PredefinedAttributeSearchCriteria]() + for structure0 in andConditionsContainer { + if let structure0 = structure0 { + andConditionsDecoded0?.append(structure0) + } + } + } + andConditions = andConditionsDecoded0 + let stringConditionDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.StringCondition.self, forKey: .stringCondition) + stringCondition = stringConditionDecoded + } +} + +extension ConnectClientTypes { + /// The search criteria to be used to return predefined attributes. + public struct PredefinedAttributeSearchCriteria: Swift.Equatable { + /// A list of conditions which would be applied together with an AND condition. + public var andConditions: [ConnectClientTypes.PredefinedAttributeSearchCriteria]? + /// A list of conditions which would be applied together with an OR condition. + public var orConditions: [ConnectClientTypes.PredefinedAttributeSearchCriteria]? + /// A leaf node condition which can be used to specify a string condition. The currently supported values for FieldName are name and description. + public var stringCondition: ConnectClientTypes.StringCondition? + + public init( + andConditions: [ConnectClientTypes.PredefinedAttributeSearchCriteria]? = nil, + orConditions: [ConnectClientTypes.PredefinedAttributeSearchCriteria]? = nil, + stringCondition: ConnectClientTypes.StringCondition? = nil + ) + { + self.andConditions = andConditions + self.orConditions = orConditions + self.stringCondition = stringCondition + } + } + +} + +extension ConnectClientTypes.PredefinedAttributeSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case lastModifiedRegion = "LastModifiedRegion" + case lastModifiedTime = "LastModifiedTime" + case name = "Name" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let lastModifiedRegion = self.lastModifiedRegion { + try encodeContainer.encode(lastModifiedRegion, forKey: .lastModifiedRegion) + } + if let lastModifiedTime = self.lastModifiedTime { + try encodeContainer.encodeTimestamp(lastModifiedTime, format: .epochSeconds, forKey: .lastModifiedTime) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastModifiedTime) + lastModifiedTime = lastModifiedTimeDecoded + let lastModifiedRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastModifiedRegion) + lastModifiedRegion = lastModifiedRegionDecoded + } +} + +extension ConnectClientTypes { + /// Summary of a predefined attribute. + public struct PredefinedAttributeSummary: Swift.Equatable { + /// Last modified region. + public var lastModifiedRegion: Swift.String? + /// Last modified time. + public var lastModifiedTime: ClientRuntime.Date? + /// The name of the predefined attribute. + public var name: Swift.String? + + public init( + lastModifiedRegion: Swift.String? = nil, + lastModifiedTime: ClientRuntime.Date? = nil, + name: Swift.String? = nil + ) + { + self.lastModifiedRegion = lastModifiedRegion + self.lastModifiedTime = lastModifiedTime + self.name = name + } + } + +} + +extension ConnectClientTypes.PredefinedAttributeValues: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case stringlist = "StringList" + case sdkUnknown + } + + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + switch self { + case let .stringlist(stringlist): + var stringlistContainer = container.nestedUnkeyedContainer(forKey: .stringlist) + for predefinedattributestringvalue0 in stringlist { + try stringlistContainer.encode(predefinedattributestringvalue0) + } + case let .sdkUnknown(sdkUnknown): + try container.encode(sdkUnknown, forKey: .sdkUnknown) + } + } + + public init(from decoder: Swift.Decoder) throws { + let values = try decoder.container(keyedBy: CodingKeys.self) + let stringlistContainer = try values.decodeIfPresent([Swift.String?].self, forKey: .stringlist) + var stringlistDecoded0:[Swift.String]? = nil + if let stringlistContainer = stringlistContainer { + stringlistDecoded0 = [Swift.String]() + for string0 in stringlistContainer { + if let string0 = string0 { + stringlistDecoded0?.append(string0) + } + } + } + if let stringlist = stringlistDecoded0 { + self = .stringlist(stringlist) + return + } + self = .sdkUnknown("") + } +} + +extension ConnectClientTypes { + /// Information about values of a predefined attribute. + public enum PredefinedAttributeValues: Swift.Equatable { + /// Predefined attribute values of type string list. + case stringlist([Swift.String]) + case sdkUnknown(Swift.String) + } + +} + extension ConnectClientTypes.ProblemDetail: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case message @@ -37494,6 +38965,471 @@ enum SearchAvailablePhoneNumbersOutputError: ClientRuntime.HttpResponseErrorBind } } +extension SearchContactsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceId = "InstanceId" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case searchCriteria = "SearchCriteria" + case sort = "Sort" + case timeRange = "TimeRange" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let instanceId = self.instanceId { + try encodeContainer.encode(instanceId, forKey: .instanceId) + } + if let maxResults = self.maxResults { + try encodeContainer.encode(maxResults, forKey: .maxResults) + } + if let nextToken = self.nextToken { + try encodeContainer.encode(nextToken, forKey: .nextToken) + } + if let searchCriteria = self.searchCriteria { + try encodeContainer.encode(searchCriteria, forKey: .searchCriteria) + } + if let sort = self.sort { + try encodeContainer.encode(sort, forKey: .sort) + } + if let timeRange = self.timeRange { + try encodeContainer.encode(timeRange, forKey: .timeRange) + } + } +} + +extension SearchContactsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/search-contacts" + } +} + +public struct SearchContactsInput: Swift.Equatable { + /// The identifier of Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The maximum number of results to return per page. + public var maxResults: Swift.Int? + /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. + public var nextToken: Swift.String? + /// The search criteria to be used to return contacts. + public var searchCriteria: ConnectClientTypes.SearchCriteria? + /// Specifies a field to sort by and a sort order. + public var sort: ConnectClientTypes.Sort? + /// Time range that you want to search results. + /// This member is required. + public var timeRange: ConnectClientTypes.SearchContactsTimeRange? + + public init( + instanceId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + searchCriteria: ConnectClientTypes.SearchCriteria? = nil, + sort: ConnectClientTypes.Sort? = nil, + timeRange: ConnectClientTypes.SearchContactsTimeRange? = nil + ) + { + self.instanceId = instanceId + self.maxResults = maxResults + self.nextToken = nextToken + self.searchCriteria = searchCriteria + self.sort = sort + self.timeRange = timeRange + } +} + +struct SearchContactsInputBody: Swift.Equatable { + let instanceId: Swift.String? + let timeRange: ConnectClientTypes.SearchContactsTimeRange? + let searchCriteria: ConnectClientTypes.SearchCriteria? + let maxResults: Swift.Int? + let nextToken: Swift.String? + let sort: ConnectClientTypes.Sort? +} + +extension SearchContactsInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceId = "InstanceId" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case searchCriteria = "SearchCriteria" + case sort = "Sort" + case timeRange = "TimeRange" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) + instanceId = instanceIdDecoded + let timeRangeDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchContactsTimeRange.self, forKey: .timeRange) + timeRange = timeRangeDecoded + let searchCriteriaDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchCriteria.self, forKey: .searchCriteria) + searchCriteria = searchCriteriaDecoded + let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) + maxResults = maxResultsDecoded + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + let sortDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.Sort.self, forKey: .sort) + sort = sortDecoded + } +} + +extension ConnectClientTypes { + public enum SearchContactsMatchType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case matchAll + case matchAny + case sdkUnknown(Swift.String) + + public static var allCases: [SearchContactsMatchType] { + return [ + .matchAll, + .matchAny, + .sdkUnknown("") + ] + } + 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 .matchAll: return "MATCH_ALL" + case .matchAny: return "MATCH_ANY" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = SearchContactsMatchType(rawValue: rawValue) ?? SearchContactsMatchType.sdkUnknown(rawValue) + } + } +} + +extension SearchContactsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: SearchContactsOutputBody = try responseDecoder.decode(responseBody: data) + self.contacts = output.contacts + self.nextToken = output.nextToken + self.totalCount = output.totalCount + } else { + self.contacts = nil + self.nextToken = nil + self.totalCount = nil + } + } +} + +public struct SearchContactsOutput: Swift.Equatable { + /// Information about the contacts. + /// This member is required. + public var contacts: [ConnectClientTypes.ContactSearchSummary]? + /// If there are additional results, this is the token for the next set of results. + public var nextToken: Swift.String? + /// The total number of contacts which matched your search query. + public var totalCount: Swift.Int? + + public init( + contacts: [ConnectClientTypes.ContactSearchSummary]? = nil, + nextToken: Swift.String? = nil, + totalCount: Swift.Int? = nil + ) + { + self.contacts = contacts + self.nextToken = nextToken + self.totalCount = totalCount + } +} + +struct SearchContactsOutputBody: Swift.Equatable { + let contacts: [ConnectClientTypes.ContactSearchSummary]? + let nextToken: Swift.String? + let totalCount: Swift.Int? +} + +extension SearchContactsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case contacts = "Contacts" + case nextToken = "NextToken" + case totalCount = "TotalCount" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let contactsContainer = try containerValues.decodeIfPresent([ConnectClientTypes.ContactSearchSummary?].self, forKey: .contacts) + var contactsDecoded0:[ConnectClientTypes.ContactSearchSummary]? = nil + if let contactsContainer = contactsContainer { + contactsDecoded0 = [ConnectClientTypes.ContactSearchSummary]() + for structure0 in contactsContainer { + if let structure0 = structure0 { + contactsDecoded0?.append(structure0) + } + } + } + contacts = contactsDecoded0 + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + let totalCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalCount) + totalCount = totalCountDecoded + } +} + +enum SearchContactsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension ConnectClientTypes.SearchContactsTimeRange: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endTime = "EndTime" + case startTime = "StartTime" + case type = "Type" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let endTime = self.endTime { + try encodeContainer.encodeTimestamp(endTime, format: .epochSeconds, forKey: .endTime) + } + if let startTime = self.startTime { + try encodeContainer.encodeTimestamp(startTime, format: .epochSeconds, forKey: .startTime) + } + if let type = self.type { + try encodeContainer.encode(type.rawValue, forKey: .type) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let typeDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchContactsTimeRangeType.self, forKey: .type) + type = typeDecoded + let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .startTime) + startTime = startTimeDecoded + let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .endTime) + endTime = endTimeDecoded + } +} + +extension ConnectClientTypes { + /// A structure of time range that you want to search results. + public struct SearchContactsTimeRange: Swift.Equatable { + /// The end time of the time range. + /// This member is required. + public var endTime: ClientRuntime.Date? + /// The start time of the time range. + /// This member is required. + public var startTime: ClientRuntime.Date? + /// The type of timestamp to search. + /// This member is required. + public var type: ConnectClientTypes.SearchContactsTimeRangeType? + + public init( + endTime: ClientRuntime.Date? = nil, + startTime: ClientRuntime.Date? = nil, + type: ConnectClientTypes.SearchContactsTimeRangeType? = nil + ) + { + self.endTime = endTime + self.startTime = startTime + self.type = type + } + } + +} + +extension ConnectClientTypes { + public enum SearchContactsTimeRangeType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case connectedToAgentTimestamp + case disconnectTimestamp + case initiationTimestamp + case scheduledTimestamp + case sdkUnknown(Swift.String) + + public static var allCases: [SearchContactsTimeRangeType] { + return [ + .connectedToAgentTimestamp, + .disconnectTimestamp, + .initiationTimestamp, + .scheduledTimestamp, + .sdkUnknown("") + ] + } + 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 .connectedToAgentTimestamp: return "CONNECTED_TO_AGENT_TIMESTAMP" + case .disconnectTimestamp: return "DISCONNECT_TIMESTAMP" + case .initiationTimestamp: return "INITIATION_TIMESTAMP" + case .scheduledTimestamp: return "SCHEDULED_TIMESTAMP" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = SearchContactsTimeRangeType(rawValue: rawValue) ?? SearchContactsTimeRangeType.sdkUnknown(rawValue) + } + } +} + +extension ConnectClientTypes.SearchCriteria: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case agentHierarchyGroups = "AgentHierarchyGroups" + case agentIds = "AgentIds" + case channels = "Channels" + case contactAnalysis = "ContactAnalysis" + case initiationMethods = "InitiationMethods" + case queueIds = "QueueIds" + case searchableContactAttributes = "SearchableContactAttributes" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let agentHierarchyGroups = self.agentHierarchyGroups { + try encodeContainer.encode(agentHierarchyGroups, forKey: .agentHierarchyGroups) + } + if let agentIds = agentIds { + var agentIdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .agentIds) + for agentresourceid0 in agentIds { + try agentIdsContainer.encode(agentresourceid0) + } + } + if let channels = channels { + var channelsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .channels) + for channel0 in channels { + try channelsContainer.encode(channel0.rawValue) + } + } + if let contactAnalysis = self.contactAnalysis { + try encodeContainer.encode(contactAnalysis, forKey: .contactAnalysis) + } + if let initiationMethods = initiationMethods { + var initiationMethodsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .initiationMethods) + for contactinitiationmethod0 in initiationMethods { + try initiationMethodsContainer.encode(contactinitiationmethod0.rawValue) + } + } + if let queueIds = queueIds { + var queueIdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .queueIds) + for queueid0 in queueIds { + try queueIdsContainer.encode(queueid0) + } + } + if let searchableContactAttributes = self.searchableContactAttributes { + try encodeContainer.encode(searchableContactAttributes, forKey: .searchableContactAttributes) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let agentIdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .agentIds) + var agentIdsDecoded0:[Swift.String]? = nil + if let agentIdsContainer = agentIdsContainer { + agentIdsDecoded0 = [Swift.String]() + for string0 in agentIdsContainer { + if let string0 = string0 { + agentIdsDecoded0?.append(string0) + } + } + } + agentIds = agentIdsDecoded0 + let agentHierarchyGroupsDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.AgentHierarchyGroups.self, forKey: .agentHierarchyGroups) + agentHierarchyGroups = agentHierarchyGroupsDecoded + let channelsContainer = try containerValues.decodeIfPresent([ConnectClientTypes.Channel?].self, forKey: .channels) + var channelsDecoded0:[ConnectClientTypes.Channel]? = nil + if let channelsContainer = channelsContainer { + channelsDecoded0 = [ConnectClientTypes.Channel]() + for enum0 in channelsContainer { + if let enum0 = enum0 { + channelsDecoded0?.append(enum0) + } + } + } + channels = channelsDecoded0 + let contactAnalysisDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.ContactAnalysis.self, forKey: .contactAnalysis) + contactAnalysis = contactAnalysisDecoded + let initiationMethodsContainer = try containerValues.decodeIfPresent([ConnectClientTypes.ContactInitiationMethod?].self, forKey: .initiationMethods) + var initiationMethodsDecoded0:[ConnectClientTypes.ContactInitiationMethod]? = nil + if let initiationMethodsContainer = initiationMethodsContainer { + initiationMethodsDecoded0 = [ConnectClientTypes.ContactInitiationMethod]() + for enum0 in initiationMethodsContainer { + if let enum0 = enum0 { + initiationMethodsDecoded0?.append(enum0) + } + } + } + initiationMethods = initiationMethodsDecoded0 + let queueIdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .queueIds) + var queueIdsDecoded0:[Swift.String]? = nil + if let queueIdsContainer = queueIdsContainer { + queueIdsDecoded0 = [Swift.String]() + for string0 in queueIdsContainer { + if let string0 = string0 { + queueIdsDecoded0?.append(string0) + } + } + } + queueIds = queueIdsDecoded0 + let searchableContactAttributesDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchableContactAttributes.self, forKey: .searchableContactAttributes) + searchableContactAttributes = searchableContactAttributesDecoded + } +} + +extension ConnectClientTypes { + /// A structure of search criteria to be used to return contacts. + public struct SearchCriteria: Swift.Equatable { + /// The agent hierarchy groups of the agent at the time of handling the contact. + public var agentHierarchyGroups: ConnectClientTypes.AgentHierarchyGroups? + /// The identifiers of agents who handled the contacts. + public var agentIds: [Swift.String]? + /// The list of channels associated with contacts. + public var channels: [ConnectClientTypes.Channel]? + /// Search criteria based on analysis outputs from Amazon Connect Contact Lens. + public var contactAnalysis: ConnectClientTypes.ContactAnalysis? + /// The list of initiation methods associated with contacts. + public var initiationMethods: [ConnectClientTypes.ContactInitiationMethod]? + /// The list of queue IDs associated with contacts. + public var queueIds: [Swift.String]? + /// The search criteria based on user-defined contact attributes that have been configured for contact search. For more information, see [Search by customer contact attributes](https://docs.aws.amazon.com/connect/latest/adminguide/search-custom-attributes.html) in the Amazon Connect Administrator Guide. To use SearchableContactAttributes in a search request, the GetContactAttributes action is required to perform an API request. For more information, see [https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnect.html#amazonconnect-actions-as-permissions](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnect.html#amazonconnect-actions-as-permissions)Actions defined by Amazon Connect. + public var searchableContactAttributes: ConnectClientTypes.SearchableContactAttributes? + + public init( + agentHierarchyGroups: ConnectClientTypes.AgentHierarchyGroups? = nil, + agentIds: [Swift.String]? = nil, + channels: [ConnectClientTypes.Channel]? = nil, + contactAnalysis: ConnectClientTypes.ContactAnalysis? = nil, + initiationMethods: [ConnectClientTypes.ContactInitiationMethod]? = nil, + queueIds: [Swift.String]? = nil, + searchableContactAttributes: ConnectClientTypes.SearchableContactAttributes? = nil + ) + { + self.agentHierarchyGroups = agentHierarchyGroups + self.agentIds = agentIds + self.channels = channels + self.contactAnalysis = contactAnalysis + self.initiationMethods = initiationMethods + self.queueIds = queueIds + self.searchableContactAttributes = searchableContactAttributes + } + } + +} + extension SearchHoursOfOperationsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instanceId = "InstanceId" @@ -37674,6 +39610,174 @@ enum SearchHoursOfOperationsOutputError: ClientRuntime.HttpResponseErrorBinding } } +extension SearchPredefinedAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceId = "InstanceId" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case searchCriteria = "SearchCriteria" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let instanceId = self.instanceId { + try encodeContainer.encode(instanceId, forKey: .instanceId) + } + if let maxResults = self.maxResults { + try encodeContainer.encode(maxResults, forKey: .maxResults) + } + if let nextToken = self.nextToken { + try encodeContainer.encode(nextToken, forKey: .nextToken) + } + if let searchCriteria = self.searchCriteria { + try encodeContainer.encode(searchCriteria, forKey: .searchCriteria) + } + } +} + +extension SearchPredefinedAttributesInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/search-predefined-attributes" + } +} + +public struct SearchPredefinedAttributesInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The maximum number of results to return per page. + public var maxResults: Swift.Int? + /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. + public var nextToken: Swift.String? + /// The search criteria to be used to return predefined attributes. + public var searchCriteria: ConnectClientTypes.PredefinedAttributeSearchCriteria? + + public init( + instanceId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + searchCriteria: ConnectClientTypes.PredefinedAttributeSearchCriteria? = nil + ) + { + self.instanceId = instanceId + self.maxResults = maxResults + self.nextToken = nextToken + self.searchCriteria = searchCriteria + } +} + +struct SearchPredefinedAttributesInputBody: Swift.Equatable { + let instanceId: Swift.String? + let nextToken: Swift.String? + let maxResults: Swift.Int? + let searchCriteria: ConnectClientTypes.PredefinedAttributeSearchCriteria? +} + +extension SearchPredefinedAttributesInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceId = "InstanceId" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case searchCriteria = "SearchCriteria" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) + instanceId = instanceIdDecoded + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) + maxResults = maxResultsDecoded + let searchCriteriaDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.PredefinedAttributeSearchCriteria.self, forKey: .searchCriteria) + searchCriteria = searchCriteriaDecoded + } +} + +extension SearchPredefinedAttributesOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: SearchPredefinedAttributesOutputBody = try responseDecoder.decode(responseBody: data) + self.approximateTotalCount = output.approximateTotalCount + self.nextToken = output.nextToken + self.predefinedAttributes = output.predefinedAttributes + } else { + self.approximateTotalCount = nil + self.nextToken = nil + self.predefinedAttributes = nil + } + } +} + +public struct SearchPredefinedAttributesOutput: Swift.Equatable { + /// The approximate number of predefined attributes which matched your search query. + public var approximateTotalCount: Swift.Int? + /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. + public var nextToken: Swift.String? + /// Predefined attributes matched by the search criteria. + public var predefinedAttributes: [ConnectClientTypes.PredefinedAttribute]? + + public init( + approximateTotalCount: Swift.Int? = nil, + nextToken: Swift.String? = nil, + predefinedAttributes: [ConnectClientTypes.PredefinedAttribute]? = nil + ) + { + self.approximateTotalCount = approximateTotalCount + self.nextToken = nextToken + self.predefinedAttributes = predefinedAttributes + } +} + +struct SearchPredefinedAttributesOutputBody: Swift.Equatable { + let predefinedAttributes: [ConnectClientTypes.PredefinedAttribute]? + let nextToken: Swift.String? + let approximateTotalCount: Swift.Int? +} + +extension SearchPredefinedAttributesOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case approximateTotalCount = "ApproximateTotalCount" + case nextToken = "NextToken" + case predefinedAttributes = "PredefinedAttributes" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let predefinedAttributesContainer = try containerValues.decodeIfPresent([ConnectClientTypes.PredefinedAttribute?].self, forKey: .predefinedAttributes) + var predefinedAttributesDecoded0:[ConnectClientTypes.PredefinedAttribute]? = nil + if let predefinedAttributesContainer = predefinedAttributesContainer { + predefinedAttributesDecoded0 = [ConnectClientTypes.PredefinedAttribute]() + for structure0 in predefinedAttributesContainer { + if let structure0 = structure0 { + predefinedAttributesDecoded0?.append(structure0) + } + } + } + predefinedAttributes = predefinedAttributesDecoded0 + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + let approximateTotalCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .approximateTotalCount) + approximateTotalCount = approximateTotalCountDecoded + } +} + +enum SearchPredefinedAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension SearchPromptsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instanceId = "InstanceId" @@ -39113,6 +41217,128 @@ enum SearchVocabulariesOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension ConnectClientTypes.SearchableContactAttributes: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case criteria = "Criteria" + case matchType = "MatchType" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let criteria = criteria { + var criteriaContainer = encodeContainer.nestedUnkeyedContainer(forKey: .criteria) + for searchablecontactattributescriteria0 in criteria { + try criteriaContainer.encode(searchablecontactattributescriteria0) + } + } + if let matchType = self.matchType { + try encodeContainer.encode(matchType.rawValue, forKey: .matchType) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let criteriaContainer = try containerValues.decodeIfPresent([ConnectClientTypes.SearchableContactAttributesCriteria?].self, forKey: .criteria) + var criteriaDecoded0:[ConnectClientTypes.SearchableContactAttributesCriteria]? = nil + if let criteriaContainer = criteriaContainer { + criteriaDecoded0 = [ConnectClientTypes.SearchableContactAttributesCriteria]() + for structure0 in criteriaContainer { + if let structure0 = structure0 { + criteriaDecoded0?.append(structure0) + } + } + } + criteria = criteriaDecoded0 + let matchTypeDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchContactsMatchType.self, forKey: .matchType) + matchType = matchTypeDecoded + } +} + +extension ConnectClientTypes { + /// A structure that defines search criteria based on user-defined contact attributes that are configured for contact search. + public struct SearchableContactAttributes: Swift.Equatable { + /// The list of criteria based on user-defined contact attributes that are configured for contact search. + /// This member is required. + public var criteria: [ConnectClientTypes.SearchableContactAttributesCriteria]? + /// The match type combining search criteria using multiple searchable contact attributes. + public var matchType: ConnectClientTypes.SearchContactsMatchType? + + public init( + criteria: [ConnectClientTypes.SearchableContactAttributesCriteria]? = nil, + matchType: ConnectClientTypes.SearchContactsMatchType? = nil + ) + { + self.criteria = criteria + self.matchType = matchType + } + } + +} + +extension ConnectClientTypes.SearchableContactAttributesCriteria: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case key = "Key" + case values = "Values" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let key = self.key { + try encodeContainer.encode(key, forKey: .key) + } + if let values = values { + var valuesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .values) + for searchablecontactattributevalue0 in values { + try valuesContainer.encode(searchablecontactattributevalue0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) + key = keyDecoded + let valuesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .values) + var valuesDecoded0:[Swift.String]? = nil + if let valuesContainer = valuesContainer { + valuesDecoded0 = [Swift.String]() + for string0 in valuesContainer { + if let string0 = string0 { + valuesDecoded0?.append(string0) + } + } + } + values = valuesDecoded0 + } +} + +extension ConnectClientTypes.SearchableContactAttributesCriteria: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "SearchableContactAttributesCriteria(values: \(Swift.String(describing: values)), key: \"CONTENT_REDACTED\")"} +} + +extension ConnectClientTypes { + /// The search criteria based on user-defned contact attribute key and values to search on. + public struct SearchableContactAttributesCriteria: Swift.Equatable { + /// The key containing a searchable user-defined contact attribute. + /// This member is required. + public var key: Swift.String? + /// The list of values to search for within a user-defined contact attribute. + /// This member is required. + public var values: [Swift.String]? + + public init( + key: Swift.String? = nil, + values: [Swift.String]? = nil + ) + { + self.key = key + self.values = values + } + } + +} + extension ConnectClientTypes { public enum SearchableQueueType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case standard @@ -39420,7 +41646,7 @@ extension ConnectClientTypes { public var andConditions: [ConnectClientTypes.SecurityProfileSearchCriteria]? /// A list of conditions which would be applied together with an OR condition. public var orConditions: [ConnectClientTypes.SecurityProfileSearchCriteria]? - /// A leaf node condition which can be used to specify a string condition. + /// A leaf node condition which can be used to specify a string condition. The currently supported values for FieldName are name and description. public var stringCondition: ConnectClientTypes.StringCondition? public init( @@ -40165,6 +42391,53 @@ extension ConnectClientTypes { } } +extension ConnectClientTypes.Sort: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case fieldName = "FieldName" + case order = "Order" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let fieldName = self.fieldName { + try encodeContainer.encode(fieldName.rawValue, forKey: .fieldName) + } + if let order = self.order { + try encodeContainer.encode(order.rawValue, forKey: .order) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let fieldNameDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SortableFieldName.self, forKey: .fieldName) + fieldName = fieldNameDecoded + let orderDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SortOrder.self, forKey: .order) + order = orderDecoded + } +} + +extension ConnectClientTypes { + /// A structure that defineds the field name to sort by and a sort order. + public struct Sort: Swift.Equatable { + /// The name of the field on which to sort. + /// This member is required. + public var fieldName: ConnectClientTypes.SortableFieldName? + /// An ascending or descending sort. + /// This member is required. + public var order: ConnectClientTypes.SortOrder? + + public init( + fieldName: ConnectClientTypes.SortableFieldName? = nil, + order: ConnectClientTypes.SortOrder? = nil + ) + { + self.fieldName = fieldName + self.order = order + } + } + +} + extension ConnectClientTypes { public enum SortOrder: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case ascending @@ -40197,6 +42470,50 @@ extension ConnectClientTypes { } } +extension ConnectClientTypes { + public enum SortableFieldName: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case channel + case connectedToAgentTimestamp + case disconnectTimestamp + case initiationMethod + case initiationTimestamp + case scheduledTimestamp + case sdkUnknown(Swift.String) + + public static var allCases: [SortableFieldName] { + return [ + .channel, + .connectedToAgentTimestamp, + .disconnectTimestamp, + .initiationMethod, + .initiationTimestamp, + .scheduledTimestamp, + .sdkUnknown("") + ] + } + 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 .channel: return "CHANNEL" + case .connectedToAgentTimestamp: return "CONNECTED_TO_AGENT_TIMESTAMP" + case .disconnectTimestamp: return "DISCONNECT_TIMESTAMP" + case .initiationMethod: return "INITIATION_METHOD" + case .initiationTimestamp: return "INITIATION_TIMESTAMP" + case .scheduledTimestamp: return "SCHEDULED_TIMESTAMP" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = SortableFieldName(rawValue: rawValue) ?? SortableFieldName.sdkUnknown(rawValue) + } + } +} + extension ConnectClientTypes { public enum SourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cases @@ -40926,6 +43243,11 @@ enum StartContactStreamingOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension StartOutboundVoiceContactInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "StartOutboundVoiceContactInput(answerMachineDetectionConfig: \(Swift.String(describing: answerMachineDetectionConfig)), attributes: \(Swift.String(describing: attributes)), campaignId: \(Swift.String(describing: campaignId)), clientToken: \(Swift.String(describing: clientToken)), contactFlowId: \(Swift.String(describing: contactFlowId)), destinationPhoneNumber: \(Swift.String(describing: destinationPhoneNumber)), instanceId: \(Swift.String(describing: instanceId)), queueId: \(Swift.String(describing: queueId)), references: \(Swift.String(describing: references)), relatedContactId: \(Swift.String(describing: relatedContactId)), sourcePhoneNumber: \(Swift.String(describing: sourcePhoneNumber)), trafficType: \(Swift.String(describing: trafficType)), description: \"CONTENT_REDACTED\", name: \"CONTENT_REDACTED\")"} +} + extension StartOutboundVoiceContactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case answerMachineDetectionConfig = "AnswerMachineDetectionConfig" @@ -41213,6 +43535,11 @@ enum StartOutboundVoiceContactOutputError: ClientRuntime.HttpResponseErrorBindin } } +extension StartTaskContactInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "StartTaskContactInput(attributes: \(Swift.String(describing: attributes)), clientToken: \(Swift.String(describing: clientToken)), contactFlowId: \(Swift.String(describing: contactFlowId)), instanceId: \(Swift.String(describing: instanceId)), previousContactId: \(Swift.String(describing: previousContactId)), quickConnectId: \(Swift.String(describing: quickConnectId)), references: \(Swift.String(describing: references)), relatedContactId: \(Swift.String(describing: relatedContactId)), scheduledTime: \(Swift.String(describing: scheduledTime)), taskTemplateId: \(Swift.String(describing: taskTemplateId)), description: \"CONTENT_REDACTED\", name: \"CONTENT_REDACTED\")"} +} + extension StartTaskContactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributes = "Attributes" @@ -41474,6 +43801,11 @@ enum StartTaskContactOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension StartWebRTCContactInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "StartWebRTCContactInput(allowedCapabilities: \(Swift.String(describing: allowedCapabilities)), attributes: \(Swift.String(describing: attributes)), clientToken: \(Swift.String(describing: clientToken)), contactFlowId: \(Swift.String(describing: contactFlowId)), instanceId: \(Swift.String(describing: instanceId)), participantDetails: \(Swift.String(describing: participantDetails)), references: \(Swift.String(describing: references)), relatedContactId: \(Swift.String(describing: relatedContactId)), description: \"CONTENT_REDACTED\")"} +} + extension StartWebRTCContactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedCapabilities = "AllowedCapabilities" @@ -42162,7 +44494,7 @@ extension ConnectClientTypes.StringCondition: Swift.Codable { } extension ConnectClientTypes { - /// A leaf node condition which can be used to specify a string condition. + /// A leaf node condition which can be used to specify a string condition. The currently supported values for FieldName are name and description. public struct StringCondition: Swift.Equatable { /// The type of comparison to be made when evaluating the string condition. public var comparisonType: ConnectClientTypes.StringComparisonType? @@ -44078,6 +46410,134 @@ extension ConnectClientTypes { } } +extension ConnectClientTypes.Transcript: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case criteria = "Criteria" + case matchType = "MatchType" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let criteria = criteria { + var criteriaContainer = encodeContainer.nestedUnkeyedContainer(forKey: .criteria) + for transcriptcriteria0 in criteria { + try criteriaContainer.encode(transcriptcriteria0) + } + } + if let matchType = self.matchType { + try encodeContainer.encode(matchType.rawValue, forKey: .matchType) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let criteriaContainer = try containerValues.decodeIfPresent([ConnectClientTypes.TranscriptCriteria?].self, forKey: .criteria) + var criteriaDecoded0:[ConnectClientTypes.TranscriptCriteria]? = nil + if let criteriaContainer = criteriaContainer { + criteriaDecoded0 = [ConnectClientTypes.TranscriptCriteria]() + for structure0 in criteriaContainer { + if let structure0 = structure0 { + criteriaDecoded0?.append(structure0) + } + } + } + criteria = criteriaDecoded0 + let matchTypeDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchContactsMatchType.self, forKey: .matchType) + matchType = matchTypeDecoded + } +} + +extension ConnectClientTypes { + /// A structure that defines search criteria and matching logic to search for contacts by matching text with transcripts analyzed by Amazon Connect Contact Lens. + public struct Transcript: Swift.Equatable { + /// The list of search criteria based on Contact Lens conversational analytics transcript. + /// This member is required. + public var criteria: [ConnectClientTypes.TranscriptCriteria]? + /// The match type combining search criteria using multiple transcript criteria. + public var matchType: ConnectClientTypes.SearchContactsMatchType? + + public init( + criteria: [ConnectClientTypes.TranscriptCriteria]? = nil, + matchType: ConnectClientTypes.SearchContactsMatchType? = nil + ) + { + self.criteria = criteria + self.matchType = matchType + } + } + +} + +extension ConnectClientTypes.TranscriptCriteria: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case matchType = "MatchType" + case participantRole = "ParticipantRole" + case searchText = "SearchText" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let matchType = self.matchType { + try encodeContainer.encode(matchType.rawValue, forKey: .matchType) + } + if let participantRole = self.participantRole { + try encodeContainer.encode(participantRole.rawValue, forKey: .participantRole) + } + if let searchText = searchText { + var searchTextContainer = encodeContainer.nestedUnkeyedContainer(forKey: .searchText) + for searchtext0 in searchText { + try searchTextContainer.encode(searchtext0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let participantRoleDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.ParticipantRole.self, forKey: .participantRole) + participantRole = participantRoleDecoded + let searchTextContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .searchText) + var searchTextDecoded0:[Swift.String]? = nil + if let searchTextContainer = searchTextContainer { + searchTextDecoded0 = [Swift.String]() + for string0 in searchTextContainer { + if let string0 = string0 { + searchTextDecoded0?.append(string0) + } + } + } + searchText = searchTextDecoded0 + let matchTypeDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.SearchContactsMatchType.self, forKey: .matchType) + matchType = matchTypeDecoded + } +} + +extension ConnectClientTypes { + /// A structure that defines search criteria base on words or phrases, participants in the Contact Lens conversational analytics transcript. + public struct TranscriptCriteria: Swift.Equatable { + /// The match type combining search criteria using multiple search texts in a transcript criteria. + /// This member is required. + public var matchType: ConnectClientTypes.SearchContactsMatchType? + /// The participant role in a transcript + /// This member is required. + public var participantRole: ConnectClientTypes.ParticipantRole? + /// The words or phrases used to search within a transcript. + /// This member is required. + public var searchText: [Swift.String]? + + public init( + matchType: ConnectClientTypes.SearchContactsMatchType? = nil, + participantRole: ConnectClientTypes.ParticipantRole? = nil, + searchText: [Swift.String]? = nil + ) + { + self.matchType = matchType + self.participantRole = participantRole + self.searchText = searchText + } + } + +} + extension TransferContactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clientToken = "ClientToken" @@ -45424,6 +47884,11 @@ enum UpdateContactFlowNameOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension UpdateContactInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "UpdateContactInput(contactId: \(Swift.String(describing: contactId)), instanceId: \(Swift.String(describing: instanceId)), references: \(Swift.String(describing: references)), description: \"CONTENT_REDACTED\", name: \"CONTENT_REDACTED\")"} +} + extension UpdateContactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" @@ -45548,6 +48013,107 @@ enum UpdateContactOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension UpdateContactRoutingDataInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queuePriority = "QueuePriority" + case queueTimeAdjustmentSeconds = "QueueTimeAdjustmentSeconds" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queuePriority = self.queuePriority { + try encodeContainer.encode(queuePriority, forKey: .queuePriority) + } + if let queueTimeAdjustmentSeconds = self.queueTimeAdjustmentSeconds { + try encodeContainer.encode(queueTimeAdjustmentSeconds, forKey: .queueTimeAdjustmentSeconds) + } + } +} + +extension UpdateContactRoutingDataInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let contactId = contactId else { + return nil + } + return "/contacts/\(instanceId.urlPercentEncoding())/\(contactId.urlPercentEncoding())/routing-data" + } +} + +public struct UpdateContactRoutingDataInput: Swift.Equatable { + /// The identifier of the contact in this instance of Amazon Connect. + /// This member is required. + public var contactId: Swift.String? + /// The identifier of the Amazon Connect instance. You can [find the instance ID](https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// Priority of the contact in the queue. The default priority for new contacts is 5. You can raise the priority of a contact compared to other contacts in the queue by assigning them a higher priority, such as 1 or 2. + public var queuePriority: Swift.Int? + /// The number of seconds to add or subtract from the contact's routing age. Contacts are routed to agents on a first-come, first-serve basis. This means that changing their amount of time in queue compared to others also changes their position in queue. + public var queueTimeAdjustmentSeconds: Swift.Int? + + public init( + contactId: Swift.String? = nil, + instanceId: Swift.String? = nil, + queuePriority: Swift.Int? = nil, + queueTimeAdjustmentSeconds: Swift.Int? = nil + ) + { + self.contactId = contactId + self.instanceId = instanceId + self.queuePriority = queuePriority + self.queueTimeAdjustmentSeconds = queueTimeAdjustmentSeconds + } +} + +struct UpdateContactRoutingDataInputBody: Swift.Equatable { + let queueTimeAdjustmentSeconds: Swift.Int? + let queuePriority: Swift.Int? +} + +extension UpdateContactRoutingDataInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queuePriority = "QueuePriority" + case queueTimeAdjustmentSeconds = "QueueTimeAdjustmentSeconds" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let queueTimeAdjustmentSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .queueTimeAdjustmentSeconds) + queueTimeAdjustmentSeconds = queueTimeAdjustmentSecondsDecoded + let queuePriorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .queuePriority) + queuePriority = queuePriorityDecoded + } +} + +extension UpdateContactRoutingDataOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct UpdateContactRoutingDataOutput: Swift.Equatable { + + public init() { } +} + +enum UpdateContactRoutingDataOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceConflictException": return try await ResourceConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension UpdateContactScheduleInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case contactId = "ContactId" @@ -46580,6 +49146,94 @@ enum UpdatePhoneNumberOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension UpdatePredefinedAttributeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case values = "Values" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let values = self.values { + try encodeContainer.encode(values, forKey: .values) + } + } +} + +extension UpdatePredefinedAttributeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let name = name else { + return nil + } + return "/predefined-attributes/\(instanceId.urlPercentEncoding())/\(name.urlPercentEncoding())" + } +} + +public struct UpdatePredefinedAttributeInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The name of the predefined attribute. + /// This member is required. + public var name: Swift.String? + /// The values of the predefined attribute. + public var values: ConnectClientTypes.PredefinedAttributeValues? + + public init( + instanceId: Swift.String? = nil, + name: Swift.String? = nil, + values: ConnectClientTypes.PredefinedAttributeValues? = nil + ) + { + self.instanceId = instanceId + self.name = name + self.values = values + } +} + +struct UpdatePredefinedAttributeInputBody: Swift.Equatable { + let values: ConnectClientTypes.PredefinedAttributeValues? +} + +extension UpdatePredefinedAttributeInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case values = "Values" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let valuesDecoded = try containerValues.decodeIfPresent(ConnectClientTypes.PredefinedAttributeValues.self, forKey: .values) + values = valuesDecoded + } +} + +extension UpdatePredefinedAttributeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct UpdatePredefinedAttributeOutput: Swift.Equatable { + + public init() { } +} + +enum UpdatePredefinedAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension UpdatePromptInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" @@ -49048,6 +51702,107 @@ enum UpdateUserPhoneConfigOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension UpdateUserProficienciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userProficiencies = "UserProficiencies" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let userProficiencies = userProficiencies { + var userProficienciesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .userProficiencies) + for userproficiency0 in userProficiencies { + try userProficienciesContainer.encode(userproficiency0) + } + } + } +} + +extension UpdateUserProficienciesInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let userId = userId else { + return nil + } + return "/users/\(instanceId.urlPercentEncoding())/\(userId.urlPercentEncoding())/proficiencies" + } +} + +public struct UpdateUserProficienciesInput: Swift.Equatable { + /// The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. + /// This member is required. + public var instanceId: Swift.String? + /// The identifier of the user account. + /// This member is required. + public var userId: Swift.String? + /// The proficiencies to be updated for the user. Proficiencies must first be associated to the user. You can do this using AssociateUserProficiencies API. + /// This member is required. + public var userProficiencies: [ConnectClientTypes.UserProficiency]? + + public init( + instanceId: Swift.String? = nil, + userId: Swift.String? = nil, + userProficiencies: [ConnectClientTypes.UserProficiency]? = nil + ) + { + self.instanceId = instanceId + self.userId = userId + self.userProficiencies = userProficiencies + } +} + +struct UpdateUserProficienciesInputBody: Swift.Equatable { + let userProficiencies: [ConnectClientTypes.UserProficiency]? +} + +extension UpdateUserProficienciesInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userProficiencies = "UserProficiencies" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let userProficienciesContainer = try containerValues.decodeIfPresent([ConnectClientTypes.UserProficiency?].self, forKey: .userProficiencies) + var userProficienciesDecoded0:[ConnectClientTypes.UserProficiency]? = nil + if let userProficienciesContainer = userProficienciesContainer { + userProficienciesDecoded0 = [ConnectClientTypes.UserProficiency]() + for structure0 in userProficienciesContainer { + if let structure0 = structure0 { + userProficienciesDecoded0?.append(structure0) + } + } + } + userProficiencies = userProficienciesDecoded0 + } +} + +extension UpdateUserProficienciesOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct UpdateUserProficienciesOutput: Swift.Equatable { + + public init() { } +} + +enum UpdateUserProficienciesOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension UpdateUserRoutingProfileInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case routingProfileId = "RoutingProfileId" @@ -50110,6 +52865,11 @@ extension ConnectClientTypes.UserIdentityInfo: Swift.Codable { } } +extension ConnectClientTypes.UserIdentityInfo: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "UserIdentityInfo(mobile: \(Swift.String(describing: mobile)), email: \"CONTENT_REDACTED\", firstName: \"CONTENT_REDACTED\", lastName: \"CONTENT_REDACTED\", secondaryEmail: \"CONTENT_REDACTED\")"} +} + extension ConnectClientTypes { /// Contains information about the identity of a user. public struct UserIdentityInfo: Swift.Equatable { @@ -50167,6 +52927,11 @@ extension ConnectClientTypes.UserIdentityInfoLite: Swift.Codable { } } +extension ConnectClientTypes.UserIdentityInfoLite: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "UserIdentityInfoLite(firstName: \"CONTENT_REDACTED\", lastName: \"CONTENT_REDACTED\")"} +} + extension ConnectClientTypes { /// The user's first name and last name. public struct UserIdentityInfoLite: Swift.Equatable { @@ -50308,6 +53073,111 @@ extension ConnectClientTypes { } +extension ConnectClientTypes.UserProficiency: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case attributeValue = "AttributeValue" + case level = "Level" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let attributeName = self.attributeName { + try encodeContainer.encode(attributeName, forKey: .attributeName) + } + if let attributeValue = self.attributeValue { + try encodeContainer.encode(attributeValue, forKey: .attributeValue) + } + if let level = self.level { + try encodeContainer.encode(level, forKey: .level) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) + attributeName = attributeNameDecoded + let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) + attributeValue = attributeValueDecoded + let levelDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .level) + level = levelDecoded + } +} + +extension ConnectClientTypes { + /// Information about proficiency of a user. + public struct UserProficiency: Swift.Equatable { + /// The name of user's proficiency. You must use name of predefined attribute present in the Amazon Connect instance. + /// This member is required. + public var attributeName: Swift.String? + /// The value of user's proficiency. You must use value of predefined attribute present in the Amazon Connect instance. + /// This member is required. + public var attributeValue: Swift.String? + /// The level of the proficiency. The valid values are 1, 2, 3, 4 and 5. + /// This member is required. + public var level: Swift.Float? + + public init( + attributeName: Swift.String? = nil, + attributeValue: Swift.String? = nil, + level: Swift.Float? = nil + ) + { + self.attributeName = attributeName + self.attributeValue = attributeValue + self.level = level + } + } + +} + +extension ConnectClientTypes.UserProficiencyDisassociate: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case attributeValue = "AttributeValue" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let attributeName = self.attributeName { + try encodeContainer.encode(attributeName, forKey: .attributeName) + } + if let attributeValue = self.attributeValue { + try encodeContainer.encode(attributeValue, forKey: .attributeValue) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) + attributeName = attributeNameDecoded + let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) + attributeValue = attributeValueDecoded + } +} + +extension ConnectClientTypes { + /// Information about proficiency to be disassociated from the user. + public struct UserProficiencyDisassociate: Swift.Equatable { + /// The name of user's proficiency. + /// This member is required. + public var attributeName: Swift.String? + /// The value of user's proficiency. + /// This member is required. + public var attributeValue: Swift.String? + + public init( + attributeName: Swift.String? = nil, + attributeValue: Swift.String? = nil + ) + { + self.attributeName = attributeName + self.attributeValue = attributeValue + } + } + +} + extension ConnectClientTypes.UserQuickConnectConfig: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case contactFlowId = "ContactFlowId" @@ -50470,7 +53340,7 @@ extension ConnectClientTypes { public var hierarchyGroupCondition: ConnectClientTypes.HierarchyGroupCondition? /// A list of conditions which would be applied together with an OR condition. public var orConditions: [ConnectClientTypes.UserSearchCriteria]? - /// A leaf node condition which can be used to specify a string condition. The currently supported values for FieldName are name, description, and resourceID. + /// A leaf node condition which can be used to specify a string condition. The currently supported values for FieldName are username, firstname, lastname, resourceId, routingProfileId, securityProfileId, agentGroupId, and agentGroupPathIds. public var stringCondition: ConnectClientTypes.StringCondition? public init( diff --git a/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift b/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift index 3064a17bb3b..2333650b14d 100644 --- a/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift +++ b/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift @@ -381,6 +381,7 @@ extension ConnectParticipantClient: ConnectParticipantClientProtocol { /// /// __Possible Exceptions:__ /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : An attachment with that identifier is already being uploaded. /// - `InternalServerException` : This exception occurs when there is an internal failure in the Amazon Connect service. /// - `ThrottlingException` : The request was denied due to request throttling. /// - `ValidationException` : The input fails to satisfy the constraints specified by Amazon Connect. diff --git a/Sources/Services/AWSConnectParticipant/ConnectParticipantClientProtocol.swift b/Sources/Services/AWSConnectParticipant/ConnectParticipantClientProtocol.swift index d327211c97e..81d4f2ed9c0 100644 --- a/Sources/Services/AWSConnectParticipant/ConnectParticipantClientProtocol.swift +++ b/Sources/Services/AWSConnectParticipant/ConnectParticipantClientProtocol.swift @@ -115,6 +115,7 @@ public protocol ConnectParticipantClientProtocol { /// /// __Possible Exceptions:__ /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : An attachment with that identifier is already being uploaded. /// - `InternalServerException` : This exception occurs when there is an internal failure in the Amazon Connect service. /// - `ThrottlingException` : The request was denied due to request throttling. /// - `ValidationException` : The input fails to satisfy the constraints specified by Amazon Connect. diff --git a/Sources/Services/AWSConnectParticipant/models/Models.swift b/Sources/Services/AWSConnectParticipant/models/Models.swift index 77a21ab2497..9158679c497 100644 --- a/Sources/Services/AWSConnectParticipant/models/Models.swift +++ b/Sources/Services/AWSConnectParticipant/models/Models.swift @@ -1411,6 +1411,7 @@ extension ConnectParticipantClientTypes { case agent case customer case customBot + case supervisor case system case sdkUnknown(Swift.String) @@ -1419,6 +1420,7 @@ extension ConnectParticipantClientTypes { .agent, .customer, .customBot, + .supervisor, .system, .sdkUnknown("") ] @@ -1432,6 +1434,7 @@ extension ConnectParticipantClientTypes { case .agent: return "AGENT" case .customer: return "CUSTOMER" case .customBot: return "CUSTOM_BOT" + case .supervisor: return "SUPERVISOR" case .system: return "SYSTEM" case let .sdkUnknown(s): return s } @@ -1582,6 +1585,7 @@ extension ConnectParticipantClientTypes { case hierarchyLevel case instance case participant + case phoneNumber case user case sdkUnknown(Swift.String) @@ -1593,6 +1597,7 @@ extension ConnectParticipantClientTypes { .hierarchyLevel, .instance, .participant, + .phoneNumber, .user, .sdkUnknown("") ] @@ -1609,6 +1614,7 @@ extension ConnectParticipantClientTypes { case .hierarchyLevel: return "HIERARCHY_LEVEL" case .instance: return "INSTANCE" case .participant: return "PARTICIPANT" + case .phoneNumber: return "PHONE_NUMBER" case .user: return "USER" case let .sdkUnknown(s): return s } @@ -1804,6 +1810,7 @@ enum SendEventOutputError: ClientRuntime.HttpResponseErrorBinding { let requestID = httpResponse.requestId switch restJSONError.errorType { case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) diff --git a/Sources/Services/AWSDocDB/models/Models.swift b/Sources/Services/AWSDocDB/models/Models.swift index 2b800f9fb08..554258043bb 100644 --- a/Sources/Services/AWSDocDB/models/Models.swift +++ b/Sources/Services/AWSDocDB/models/Models.swift @@ -4458,6 +4458,8 @@ extension DocDBClientTypes.DBInstance: Swift.Codable { case kmsKeyId = "KmsKeyId" case latestRestorableTime = "LatestRestorableTime" case pendingModifiedValues = "PendingModifiedValues" + case performanceInsightsEnabled = "PerformanceInsightsEnabled" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" case preferredBackupWindow = "PreferredBackupWindow" case preferredMaintenanceWindow = "PreferredMaintenanceWindow" case promotionTier = "PromotionTier" @@ -4541,6 +4543,12 @@ extension DocDBClientTypes.DBInstance: Swift.Codable { if let pendingModifiedValues = pendingModifiedValues { try container.encode(pendingModifiedValues, forKey: ClientRuntime.Key("PendingModifiedValues")) } + if let performanceInsightsEnabled = performanceInsightsEnabled { + try container.encode(performanceInsightsEnabled, forKey: ClientRuntime.Key("PerformanceInsightsEnabled")) + } + if let performanceInsightsKMSKeyId = performanceInsightsKMSKeyId { + try container.encode(performanceInsightsKMSKeyId, forKey: ClientRuntime.Key("PerformanceInsightsKMSKeyId")) + } if let preferredBackupWindow = preferredBackupWindow { try container.encode(preferredBackupWindow, forKey: ClientRuntime.Key("PreferredBackupWindow")) } @@ -4691,6 +4699,10 @@ extension DocDBClientTypes.DBInstance: Swift.Codable { } let certificateDetailsDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.CertificateDetails.self, forKey: .certificateDetails) certificateDetails = certificateDetailsDecoded + let performanceInsightsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .performanceInsightsEnabled) + performanceInsightsEnabled = performanceInsightsEnabledDecoded + let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) + performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded } } @@ -4739,6 +4751,10 @@ extension DocDBClientTypes { public var latestRestorableTime: ClientRuntime.Date? /// Specifies that changes to the instance are pending. This element is included only when changes are pending. Specific changes are identified by subelements. public var pendingModifiedValues: DocDBClientTypes.PendingModifiedValues? + /// Set to true if Amazon RDS Performance Insights is enabled for the DB instance, and otherwise false. + public var performanceInsightsEnabled: Swift.Bool? + /// The KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key. + public var performanceInsightsKMSKeyId: Swift.String? /// Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod. public var preferredBackupWindow: Swift.String? /// Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). @@ -4776,6 +4792,8 @@ extension DocDBClientTypes { kmsKeyId: Swift.String? = nil, latestRestorableTime: ClientRuntime.Date? = nil, pendingModifiedValues: DocDBClientTypes.PendingModifiedValues? = nil, + performanceInsightsEnabled: Swift.Bool? = nil, + performanceInsightsKMSKeyId: Swift.String? = nil, preferredBackupWindow: Swift.String? = nil, preferredMaintenanceWindow: Swift.String? = nil, promotionTier: Swift.Int? = nil, @@ -4806,6 +4824,8 @@ extension DocDBClientTypes { self.kmsKeyId = kmsKeyId self.latestRestorableTime = latestRestorableTime self.pendingModifiedValues = pendingModifiedValues + self.performanceInsightsEnabled = performanceInsightsEnabled + self.performanceInsightsKMSKeyId = performanceInsightsKMSKeyId self.preferredBackupWindow = preferredBackupWindow self.preferredMaintenanceWindow = preferredMaintenanceWindow self.promotionTier = promotionTier diff --git a/Sources/Services/AWSDynamoDB/models/Models.swift b/Sources/Services/AWSDynamoDB/models/Models.swift index 321c6e0ce2d..a5a43d23a45 100644 --- a/Sources/Services/AWSDynamoDB/models/Models.swift +++ b/Sources/Services/AWSDynamoDB/models/Models.swift @@ -20436,7 +20436,7 @@ public struct UpdateTableInput: Swift.Equatable { public var replicaUpdates: [DynamoDBClientTypes.ReplicationGroupUpdate]? /// The new server-side encryption settings for the specified table. public var sseSpecification: DynamoDBClientTypes.SSESpecification? - /// Represents the DynamoDB Streams configuration for the table. You receive a ResourceInUseException if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream. + /// Represents the DynamoDB Streams configuration for the table. You receive a ValidationException if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream. public var streamSpecification: DynamoDBClientTypes.StreamSpecification? /// The table class of the table to be updated. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS. public var tableClass: DynamoDBClientTypes.TableClass? diff --git a/Sources/Services/AWSEC2/EC2Client.swift b/Sources/Services/AWSEC2/EC2Client.swift index a070d0a86f1..454a0f274e3 100644 --- a/Sources/Services/AWSEC2/EC2Client.swift +++ b/Sources/Services/AWSEC2/EC2Client.swift @@ -15464,7 +15464,7 @@ extension EC2Client: EC2ClientProtocol { /// Performs the `DetachVolume` operation on the `AmazonEC2` service. /// - /// Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first. When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance. For more information, see [Detach an Amazon EBS volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) in the Amazon Elastic Compute Cloud User Guide. + /// Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first. When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance. You can't detach or force detach volumes that are attached to Amazon ECS or Fargate tasks. Attempting to do this results in the UnsupportedOperationException exception with the Unable to detach volume attached to ECS tasks error message. For more information, see [Detach an Amazon EBS volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) in the Amazon Elastic Compute Cloud User Guide. /// /// - Parameter DetachVolumeInput : [no documentation found] /// diff --git a/Sources/Services/AWSEC2/EC2ClientProtocol.swift b/Sources/Services/AWSEC2/EC2ClientProtocol.swift index 170c4eb17b8..4b393e9fd20 100644 --- a/Sources/Services/AWSEC2/EC2ClientProtocol.swift +++ b/Sources/Services/AWSEC2/EC2ClientProtocol.swift @@ -3105,7 +3105,7 @@ public protocol EC2ClientProtocol { func detachVerifiedAccessTrustProvider(input: DetachVerifiedAccessTrustProviderInput) async throws -> DetachVerifiedAccessTrustProviderOutput /// Performs the `DetachVolume` operation on the `AmazonEC2` service. /// - /// Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first. When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance. For more information, see [Detach an Amazon EBS volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) in the Amazon Elastic Compute Cloud User Guide. + /// Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first. When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance. You can't detach or force detach volumes that are attached to Amazon ECS or Fargate tasks. Attempting to do this results in the UnsupportedOperationException exception with the Unable to detach volume attached to ECS tasks error message. For more information, see [Detach an Amazon EBS volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) in the Amazon Elastic Compute Cloud User Guide. /// /// - Parameter DetachVolumeInput : [no documentation found] /// diff --git a/Sources/Services/AWSEC2/models/Models.swift b/Sources/Services/AWSEC2/models/Models.swift index 56879e97717..dd550d1b5a1 100644 --- a/Sources/Services/AWSEC2/models/Models.swift +++ b/Sources/Services/AWSEC2/models/Models.swift @@ -8972,17 +8972,21 @@ extension AttachVolumeOutput: ClientRuntime.HttpResponseBinding { if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { let output: AttachVolumeOutputBody = try responseDecoder.decode(responseBody: data) + self.associatedResource = output.associatedResource self.attachTime = output.attachTime self.deleteOnTermination = output.deleteOnTermination self.device = output.device self.instanceId = output.instanceId + self.instanceOwningService = output.instanceOwningService self.state = output.state self.volumeId = output.volumeId } else { + self.associatedResource = nil self.attachTime = nil self.deleteOnTermination = nil self.device = nil self.instanceId = nil + self.instanceOwningService = nil self.state = nil self.volumeId = nil } @@ -8991,32 +8995,40 @@ extension AttachVolumeOutput: ClientRuntime.HttpResponseBinding { /// Describes volume attachment details. public struct AttachVolumeOutput: Swift.Equatable { + /// The ARN of the Amazon ECS or Fargate task to which the volume is attached. + public var associatedResource: Swift.String? /// The time stamp when the attachment initiated. public var attachTime: ClientRuntime.Date? /// Indicates whether the EBS volume is deleted on instance termination. public var deleteOnTermination: Swift.Bool? - /// The device name. + /// The device name. If the volume is attached to a Fargate task, this parameter returns null. public var device: Swift.String? - /// The ID of the instance. + /// The ID of the instance. If the volume is attached to a Fargate task, this parameter returns null. public var instanceId: Swift.String? + /// The service principal of Amazon Web Services service that owns the underlying instance to which the volume is attached. This parameter is returned only for volumes that are attached to Fargate tasks. + public var instanceOwningService: Swift.String? /// The attachment state of the volume. public var state: EC2ClientTypes.VolumeAttachmentState? /// The ID of the volume. public var volumeId: Swift.String? public init( + associatedResource: Swift.String? = nil, attachTime: ClientRuntime.Date? = nil, deleteOnTermination: Swift.Bool? = nil, device: Swift.String? = nil, instanceId: Swift.String? = nil, + instanceOwningService: Swift.String? = nil, state: EC2ClientTypes.VolumeAttachmentState? = nil, volumeId: Swift.String? = nil ) { + self.associatedResource = associatedResource self.attachTime = attachTime self.deleteOnTermination = deleteOnTermination self.device = device self.instanceId = instanceId + self.instanceOwningService = instanceOwningService self.state = state self.volumeId = volumeId } @@ -9029,14 +9041,18 @@ struct AttachVolumeOutputBody: Swift.Equatable { let state: EC2ClientTypes.VolumeAttachmentState? let volumeId: Swift.String? let deleteOnTermination: Swift.Bool? + let associatedResource: Swift.String? + let instanceOwningService: Swift.String? } extension AttachVolumeOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case associatedResource = "associatedResource" case attachTime = "attachTime" case deleteOnTermination = "deleteOnTermination" case device = "device" case instanceId = "instanceId" + case instanceOwningService = "instanceOwningService" case state = "status" case volumeId = "volumeId" } @@ -9055,6 +9071,10 @@ extension AttachVolumeOutputBody: Swift.Decodable { volumeId = volumeIdDecoded let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) deleteOnTermination = deleteOnTerminationDecoded + let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) + associatedResource = associatedResourceDecoded + let instanceOwningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwningService) + instanceOwningService = instanceOwningServiceDecoded } } @@ -47954,7 +47974,7 @@ public struct DescribeCapacityBlockOfferingsInput: Swift.Equatable { /// The type of instance for which the Capacity Block offering reserves capacity. /// This member is required. public var instanceType: Swift.String? - /// The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error. + /// The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see [Pagination](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination). public var maxResults: Swift.Int? /// The token to use to retrieve the next page of results. public var nextToken: Swift.String? @@ -48165,7 +48185,7 @@ public struct DescribeCapacityReservationFleetsInput: Swift.Equatable { /// /// * allocation-strategy - The allocation strategy used by the Fleet. Only prioritized is supported. public var filters: [EC2ClientTypes.Filter]? - /// The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error. + /// The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see [Pagination](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination). public var maxResults: Swift.Int? /// The token to use to retrieve the next page of results. public var nextToken: Swift.String? @@ -48440,7 +48460,7 @@ public struct DescribeCapacityReservationsInput: Swift.Equatable { /// /// * placement-group-arn - The ARN of the cluster placement group in which the Capacity Reservation was created. public var filters: [EC2ClientTypes.Filter]? - /// The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error. + /// The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see [Pagination](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination). public var maxResults: Swift.Int? /// The token to use to retrieve the next page of results. public var nextToken: Swift.String? @@ -80278,17 +80298,21 @@ extension DetachVolumeOutput: ClientRuntime.HttpResponseBinding { if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { let output: DetachVolumeOutputBody = try responseDecoder.decode(responseBody: data) + self.associatedResource = output.associatedResource self.attachTime = output.attachTime self.deleteOnTermination = output.deleteOnTermination self.device = output.device self.instanceId = output.instanceId + self.instanceOwningService = output.instanceOwningService self.state = output.state self.volumeId = output.volumeId } else { + self.associatedResource = nil self.attachTime = nil self.deleteOnTermination = nil self.device = nil self.instanceId = nil + self.instanceOwningService = nil self.state = nil self.volumeId = nil } @@ -80297,32 +80321,40 @@ extension DetachVolumeOutput: ClientRuntime.HttpResponseBinding { /// Describes volume attachment details. public struct DetachVolumeOutput: Swift.Equatable { + /// The ARN of the Amazon ECS or Fargate task to which the volume is attached. + public var associatedResource: Swift.String? /// The time stamp when the attachment initiated. public var attachTime: ClientRuntime.Date? /// Indicates whether the EBS volume is deleted on instance termination. public var deleteOnTermination: Swift.Bool? - /// The device name. + /// The device name. If the volume is attached to a Fargate task, this parameter returns null. public var device: Swift.String? - /// The ID of the instance. + /// The ID of the instance. If the volume is attached to a Fargate task, this parameter returns null. public var instanceId: Swift.String? + /// The service principal of Amazon Web Services service that owns the underlying instance to which the volume is attached. This parameter is returned only for volumes that are attached to Fargate tasks. + public var instanceOwningService: Swift.String? /// The attachment state of the volume. public var state: EC2ClientTypes.VolumeAttachmentState? /// The ID of the volume. public var volumeId: Swift.String? public init( + associatedResource: Swift.String? = nil, attachTime: ClientRuntime.Date? = nil, deleteOnTermination: Swift.Bool? = nil, device: Swift.String? = nil, instanceId: Swift.String? = nil, + instanceOwningService: Swift.String? = nil, state: EC2ClientTypes.VolumeAttachmentState? = nil, volumeId: Swift.String? = nil ) { + self.associatedResource = associatedResource self.attachTime = attachTime self.deleteOnTermination = deleteOnTermination self.device = device self.instanceId = instanceId + self.instanceOwningService = instanceOwningService self.state = state self.volumeId = volumeId } @@ -80335,14 +80367,18 @@ struct DetachVolumeOutputBody: Swift.Equatable { let state: EC2ClientTypes.VolumeAttachmentState? let volumeId: Swift.String? let deleteOnTermination: Swift.Bool? + let associatedResource: Swift.String? + let instanceOwningService: Swift.String? } extension DetachVolumeOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case associatedResource = "associatedResource" case attachTime = "attachTime" case deleteOnTermination = "deleteOnTermination" case device = "device" case instanceId = "instanceId" + case instanceOwningService = "instanceOwningService" case state = "status" case volumeId = "volumeId" } @@ -80361,6 +80397,10 @@ extension DetachVolumeOutputBody: Swift.Decodable { volumeId = volumeIdDecoded let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) deleteOnTermination = deleteOnTerminationDecoded + let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) + associatedResource = associatedResourceDecoded + let instanceOwningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwningService) + instanceOwningService = instanceOwningServiceDecoded } } @@ -85635,14 +85675,19 @@ extension EC2ClientTypes { extension EC2ClientTypes.EbsInstanceBlockDevice: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case associatedResource = "associatedResource" case attachTime = "attachTime" case deleteOnTermination = "deleteOnTermination" case status = "status" case volumeId = "volumeId" + case volumeOwnerId = "volumeOwnerId" } public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let associatedResource = associatedResource { + try container.encode(associatedResource, forKey: ClientRuntime.Key("AssociatedResource")) + } if let attachTime = attachTime { try container.encodeTimestamp(attachTime, format: .dateTime, forKey: ClientRuntime.Key("AttachTime")) } @@ -85655,6 +85700,9 @@ extension EC2ClientTypes.EbsInstanceBlockDevice: Swift.Codable { if let volumeId = volumeId { try container.encode(volumeId, forKey: ClientRuntime.Key("VolumeId")) } + if let volumeOwnerId = volumeOwnerId { + try container.encode(volumeOwnerId, forKey: ClientRuntime.Key("VolumeOwnerId")) + } } public init(from decoder: Swift.Decoder) throws { @@ -85667,12 +85715,18 @@ extension EC2ClientTypes.EbsInstanceBlockDevice: Swift.Codable { status = statusDecoded let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) volumeId = volumeIdDecoded + let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) + associatedResource = associatedResourceDecoded + let volumeOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeOwnerId) + volumeOwnerId = volumeOwnerIdDecoded } } extension EC2ClientTypes { /// Describes a parameter used to set up an EBS volume in a block device mapping. public struct EbsInstanceBlockDevice: Swift.Equatable { + /// The ARN of the Amazon ECS or Fargate task to which the volume is attached. + public var associatedResource: Swift.String? /// The time stamp when the attachment initiated. public var attachTime: ClientRuntime.Date? /// Indicates whether the volume is deleted on instance termination. @@ -85681,18 +85735,24 @@ extension EC2ClientTypes { public var status: EC2ClientTypes.AttachmentStatus? /// The ID of the EBS volume. public var volumeId: Swift.String? + /// The ID of the Amazon Web Services account that owns the volume. This parameter is returned only for volumes that are attached to Fargate tasks. + public var volumeOwnerId: Swift.String? public init( + associatedResource: Swift.String? = nil, attachTime: ClientRuntime.Date? = nil, deleteOnTermination: Swift.Bool? = nil, status: EC2ClientTypes.AttachmentStatus? = nil, - volumeId: Swift.String? = nil + volumeId: Swift.String? = nil, + volumeOwnerId: Swift.String? = nil ) { + self.associatedResource = associatedResource self.attachTime = attachTime self.deleteOnTermination = deleteOnTermination self.status = status self.volumeId = volumeId + self.volumeOwnerId = volumeOwnerId } } @@ -88749,6 +88809,9 @@ public struct EnableSnapshotBlockPublicAccessInput: Swift.Equatable { /// * block-all-sharing - Prevents all public sharing of snapshots in the Region. Users in the account will no longer be able to request new public sharing. Additionally, snapshots that are already publicly shared are treated as private and they are no longer publicly available. If you enable block public access for snapshots in block-all-sharing mode, it does not change the permissions for snapshots that are already publicly shared. Instead, it prevents these snapshots from be publicly visible and publicly accessible. Therefore, the attributes for these snapshots still indicate that they are publicly shared, even though they are not publicly available. /// /// * block-new-sharing - Prevents only new public sharing of snapshots in the Region. Users in the account will no longer be able to request new public sharing. However, snapshots that are already publicly shared, remain publicly available. + /// + /// + /// unblocked is not a valid value for EnableSnapshotBlockPublicAccess. /// This member is required. public var state: EC2ClientTypes.SnapshotBlockPublicAccessState? @@ -95710,7 +95773,7 @@ public struct GetCapacityReservationUsageInput: Swift.Equatable { public var capacityReservationId: Swift.String? /// Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. public var dryRun: Swift.Bool? - /// The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error. Valid range: Minimum value of 1. Maximum value of 1000. + /// The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see [Pagination](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination). public var maxResults: Swift.Int? /// The token to use to retrieve the next page of results. public var nextToken: Swift.String? @@ -96843,7 +96906,7 @@ public struct GetGroupsForCapacityReservationInput: Swift.Equatable { public var capacityReservationId: Swift.String? /// Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. public var dryRun: Swift.Bool? - /// The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error. + /// The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see [Pagination](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination). public var maxResults: Swift.Int? /// The token to use to retrieve the next page of results. public var nextToken: Swift.String? @@ -100652,7 +100715,7 @@ public struct GetSpotPlacementScoresInput: Swift.Equatable { /// The target capacity. /// This member is required. public var targetCapacity: Swift.Int? - /// The unit for the target capacity. Default: units (translates to number of instances) + /// The unit for the target capacity. public var targetCapacityUnitType: EC2ClientTypes.TargetCapacityUnitType? public init( @@ -110879,14 +110942,14 @@ extension EC2ClientTypes { public var httpProtocolIpv6: EC2ClientTypes.InstanceMetadataProtocolState? /// The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Default: 1 Possible values: Integers from 1 to 64 public var httpPutResponseHopLimit: Swift.Int? - /// IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to optional (in other words, set the use of IMDSv2 to optional) or required (in other words, set the use of IMDSv2 to required). + /// Indicates whether IMDSv2 is required. /// - /// * optional - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned. + /// * optional - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials. /// - /// * required - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available. + /// * required - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available. /// /// - /// Default: optional + /// Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) for your instance is v2.0, the default is required. public var httpTokens: EC2ClientTypes.HttpTokensState? /// Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see [Work with instance tags using the instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS). Default: disabled public var instanceMetadataTags: EC2ClientTypes.InstanceMetadataTagsState? @@ -110967,14 +111030,11 @@ extension EC2ClientTypes { public var httpProtocolIpv6: EC2ClientTypes.InstanceMetadataProtocolState? /// The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Default: 1 Possible values: Integers from 1 to 64 public var httpPutResponseHopLimit: Swift.Int? - /// IMDSv2 uses token-backed sessions. Indicates whether the use of HTTP tokens is optional (in other words, indicates whether the use of IMDSv2 is optional) or required (in other words, indicates whether the use of IMDSv2 is required). - /// - /// * optional - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned. - /// - /// * required - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available. + /// Indicates whether IMDSv2 is required. /// + /// * optional - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials. /// - /// Default: optional + /// * required - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available. public var httpTokens: EC2ClientTypes.HttpTokensState? /// Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see [Work with instance tags using the instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS). public var instanceMetadataTags: EC2ClientTypes.InstanceMetadataTagsState? @@ -114901,6 +114961,8 @@ extension EC2ClientTypes { case r7iz4xlarge case r7iz8xlarge case r7izLarge + case r7izMetal16xl + case r7izMetal32xl case r7izXlarge case t1Micro case t22xlarge @@ -115686,6 +115748,8 @@ extension EC2ClientTypes { .r7iz4xlarge, .r7iz8xlarge, .r7izLarge, + .r7izMetal16xl, + .r7izMetal32xl, .r7izXlarge, .t1Micro, .t22xlarge, @@ -116476,6 +116540,8 @@ extension EC2ClientTypes { case .r7iz4xlarge: return "r7iz.4xlarge" case .r7iz8xlarge: return "r7iz.8xlarge" case .r7izLarge: return "r7iz.large" + case .r7izMetal16xl: return "r7iz.metal-16xl" + case .r7izMetal32xl: return "r7iz.metal-32xl" case .r7izXlarge: return "r7iz.xlarge" case .t1Micro: return "t1.micro" case .t22xlarge: return "t2.2xlarge" @@ -131187,7 +131253,7 @@ extension ModifyInstanceAttributeInput: ClientRuntime.URLPathProvider { public struct ModifyInstanceAttributeInput: Swift.Equatable { /// The name of the attribute to modify. You can modify the following attributes only: disableApiTermination | instanceType | kernel | ramdisk | instanceInitiatedShutdownBehavior | blockDeviceMapping | userData | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | nvmeSupport | disableApiStop | enclaveOptions public var attribute: EC2ClientTypes.InstanceAttributeName? - /// Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated. To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see [Update the block device mapping when launching an instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) in the Amazon EC2 User Guide. + /// Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated. You can't modify the DeleteOnTermination attribute for volumes that are attached to Fargate tasks. To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see [Update the block device mapping when launching an instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) in the Amazon EC2 User Guide. public var blockDeviceMappings: [EC2ClientTypes.InstanceBlockDeviceMappingSpecification]? /// Indicates whether an instance is enabled for stop protection. For more information, see [Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection). public var disableApiStop: EC2ClientTypes.AttributeBooleanValue? @@ -132180,14 +132246,14 @@ public struct ModifyInstanceMetadataOptionsInput: Swift.Equatable { public var httpProtocolIpv6: EC2ClientTypes.InstanceMetadataProtocolState? /// The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained. Possible values: Integers from 1 to 64 public var httpPutResponseHopLimit: Swift.Int? - /// IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to optional (in other words, set the use of IMDSv2 to optional) or required (in other words, set the use of IMDSv2 to required). + /// Indicates whether IMDSv2 is required. /// - /// * optional - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned. + /// * optional - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials. /// - /// * required - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available. + /// * required - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available. /// /// - /// Default: optional + /// Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) for your instance is v2.0, the default is required. public var httpTokens: EC2ClientTypes.HttpTokensState? /// The ID of the instance. /// This member is required. @@ -163883,7 +163949,7 @@ extension EC2ClientTypes.ScheduledInstancesNetworkInterface: Swift.Codable { extension EC2ClientTypes { /// Describes a network interface for a Scheduled Instance. public struct ScheduledInstancesNetworkInterface: Swift.Equatable { - /// Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true. + /// Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true. Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the [Amazon VPC pricing page](http://aws.amazon.com/vpc/pricing/). public var associatePublicIpAddress: Swift.Bool? /// Indicates whether to delete the interface when the instance is terminated. public var deleteOnTermination: Swift.Bool? @@ -168588,7 +168654,7 @@ extension EC2ClientTypes { /// The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later. /// This member is required. public var targetCapacity: Swift.Int? - /// The unit for the target capacity. TargetCapacityUnitType can only be specified when InstanceRequirements is specified. Default: units (translates to number of instances) + /// The unit for the target capacity. You can specify this parameter only when using attribute-based instance type selection. Default: units (the number of instances) public var targetCapacityUnitType: EC2ClientTypes.TargetCapacityUnitType? /// Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. public var terminateInstancesWithExpiration: Swift.Bool? @@ -170769,7 +170835,7 @@ extension EC2ClientTypes { /// /// * Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price. /// - /// * Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance. + /// * Client.InstanceInitiatedShutdown: The instance was shut down from the operating system of the instance. /// /// * Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation. /// @@ -172495,15 +172561,15 @@ extension EC2ClientTypes.TargetCapacitySpecification: Swift.Codable { extension EC2ClientTypes { /// The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later. You can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance MaxTotalPrice, or both to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity. The MaxTotalPrice parameters are located in [OnDemandOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptions.html) and [SpotOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptions). public struct TargetCapacitySpecification: Swift.Equatable { - /// The default TotalTargetCapacity, which is either Spot or On-Demand. + /// The default target capacity type. public var defaultTargetCapacityType: EC2ClientTypes.DefaultTargetCapacityType? /// The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units. public var onDemandTargetCapacity: Swift.Int? /// The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units. public var spotTargetCapacity: Swift.Int? - /// The unit for the target capacity. TargetCapacityUnitType can only be specified when InstanceRequirements is specified. Default: units (translates to number of instances) + /// The unit for the target capacity. public var targetCapacityUnitType: EC2ClientTypes.TargetCapacityUnitType? - /// The number of units to request, filled using DefaultTargetCapacityType. + /// The number of units to request, filled the default target capacity type. public var totalTargetCapacity: Swift.Int? public init( @@ -172568,17 +172634,17 @@ extension EC2ClientTypes.TargetCapacitySpecificationRequest: Swift.Codable { } extension EC2ClientTypes { - /// The number of units to request. You can choose to set the target capacity as the number of instances. Or you can set the target capacity to a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later. You can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance MaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity. The MaxTotalPrice parameters are located in [OnDemandOptionsRequest](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptionsRequest) and [SpotOptionsRequest](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptionsRequest). + /// The number of units to request. You can choose to set the target capacity as the number of instances. Or you can set the target capacity to a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later. You can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance MaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn't met the target capacity. The MaxTotalPrice parameters are located in [OnDemandOptionsRequest](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptionsRequest) and [SpotOptionsRequest](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptionsRequest). public struct TargetCapacitySpecificationRequest: Swift.Equatable { - /// The default TotalTargetCapacity, which is either Spot or On-Demand. + /// The default target capacity type. public var defaultTargetCapacityType: EC2ClientTypes.DefaultTargetCapacityType? /// The number of On-Demand units to request. public var onDemandTargetCapacity: Swift.Int? /// The number of Spot units to request. public var spotTargetCapacity: Swift.Int? - /// The unit for the target capacity. TargetCapacityUnitType can only be specified when InstanceRequirements is specified. Default: units (translates to number of instances) + /// The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection. Default: units (the number of instances) public var targetCapacityUnitType: EC2ClientTypes.TargetCapacityUnitType? - /// The number of units to request, filled using DefaultTargetCapacityType. + /// The number of units to request, filled using the default target capacity type. /// This member is required. public var totalTargetCapacity: Swift.Int? @@ -183893,16 +183959,21 @@ extension EC2ClientTypes { extension EC2ClientTypes.VolumeAttachment: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case associatedResource = "associatedResource" case attachTime = "attachTime" case deleteOnTermination = "deleteOnTermination" case device = "device" case instanceId = "instanceId" + case instanceOwningService = "instanceOwningService" case state = "status" case volumeId = "volumeId" } public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let associatedResource = associatedResource { + try container.encode(associatedResource, forKey: ClientRuntime.Key("AssociatedResource")) + } if let attachTime = attachTime { try container.encodeTimestamp(attachTime, format: .dateTime, forKey: ClientRuntime.Key("AttachTime")) } @@ -183915,6 +183986,9 @@ extension EC2ClientTypes.VolumeAttachment: Swift.Codable { if let instanceId = instanceId { try container.encode(instanceId, forKey: ClientRuntime.Key("InstanceId")) } + if let instanceOwningService = instanceOwningService { + try container.encode(instanceOwningService, forKey: ClientRuntime.Key("InstanceOwningService")) + } if let state = state { try container.encode(state, forKey: ClientRuntime.Key("Status")) } @@ -183937,38 +184011,50 @@ extension EC2ClientTypes.VolumeAttachment: Swift.Codable { volumeId = volumeIdDecoded let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) deleteOnTermination = deleteOnTerminationDecoded + let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) + associatedResource = associatedResourceDecoded + let instanceOwningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwningService) + instanceOwningService = instanceOwningServiceDecoded } } extension EC2ClientTypes { /// Describes volume attachment details. public struct VolumeAttachment: Swift.Equatable { + /// The ARN of the Amazon ECS or Fargate task to which the volume is attached. + public var associatedResource: Swift.String? /// The time stamp when the attachment initiated. public var attachTime: ClientRuntime.Date? /// Indicates whether the EBS volume is deleted on instance termination. public var deleteOnTermination: Swift.Bool? - /// The device name. + /// The device name. If the volume is attached to a Fargate task, this parameter returns null. public var device: Swift.String? - /// The ID of the instance. + /// The ID of the instance. If the volume is attached to a Fargate task, this parameter returns null. public var instanceId: Swift.String? + /// The service principal of Amazon Web Services service that owns the underlying instance to which the volume is attached. This parameter is returned only for volumes that are attached to Fargate tasks. + public var instanceOwningService: Swift.String? /// The attachment state of the volume. public var state: EC2ClientTypes.VolumeAttachmentState? /// The ID of the volume. public var volumeId: Swift.String? public init( + associatedResource: Swift.String? = nil, attachTime: ClientRuntime.Date? = nil, deleteOnTermination: Swift.Bool? = nil, device: Swift.String? = nil, instanceId: Swift.String? = nil, + instanceOwningService: Swift.String? = nil, state: EC2ClientTypes.VolumeAttachmentState? = nil, volumeId: Swift.String? = nil ) { + self.associatedResource = associatedResource self.attachTime = attachTime self.deleteOnTermination = deleteOnTermination self.device = device self.instanceId = instanceId + self.instanceOwningService = instanceOwningService self.state = state self.volumeId = volumeId } diff --git a/Sources/Services/AWSECS/ECSClient.swift b/Sources/Services/AWSECS/ECSClient.swift index 2298a6875b1..05fcf50d5f1 100644 --- a/Sources/Services/AWSECS/ECSClient.swift +++ b/Sources/Services/AWSECS/ECSClient.swift @@ -170,7 +170,7 @@ extension ECSClient: ECSClientProtocol { /// Performs the `CreateService` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Runs and maintains your desired number of tasks from a specified task definition. If the number of tasks running in a service drops below the desiredCount, Amazon ECS runs another copy of the task in the specified cluster. To update an existing service, see the [UpdateService] action. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind one or more load balancers. The load balancers distribute traffic across the tasks that are associated with the service. For more information, see [Service load balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the Amazon Elastic Container Service Developer Guide. Tasks for services that don't use a load balancer are considered healthy if they're in the RUNNING state. Tasks for services that use a load balancer are considered healthy if they're in the RUNNING state and are reported as healthy by the load balancer. There are two service scheduler strategies available: + /// Runs and maintains your desired number of tasks from a specified task definition. If the number of tasks running in a service drops below the desiredCount, Amazon ECS runs another copy of the task in the specified cluster. To update an existing service, see the [UpdateService] action. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind one or more load balancers. The load balancers distribute traffic across the tasks that are associated with the service. For more information, see [Service load balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the Amazon Elastic Container Service Developer Guide. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. volumeConfigurations is only supported for REPLICA service and not DAEMON service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. Tasks for services that don't use a load balancer are considered healthy if they're in the RUNNING state. Tasks for services that use a load balancer are considered healthy if they're in the RUNNING state and are reported as healthy by the load balancer. There are two service scheduler strategies available: /// /// * REPLICA - The replica scheduling strategy places and maintains your desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. For more information, see [Service scheduler concepts](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html) in the Amazon Elastic Container Service Developer Guide. /// @@ -232,7 +232,7 @@ extension ECSClient: ECSClientProtocol { /// Performs the `CreateTaskSet` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Create a task set in the specified cluster and service. This is used when a service uses the EXTERNAL deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the Amazon Elastic Container Service Developer Guide. + /// Create a task set in the specified cluster and service. This is used when a service uses the EXTERNAL deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the Amazon Elastic Container Service Developer Guide. You can create a maximum of 5 tasks sets for a deployment. /// /// - Parameter CreateTaskSetInput : [no documentation found] /// @@ -2051,7 +2051,7 @@ extension ECSClient: ECSClientProtocol { /// Performs the `RunTask` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Starts a new task using the specified task definition. You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places tasks using placement constraints and placement strategies. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. Alternatively, you can use [StartTask] to use your own scheduler or place tasks manually on specific container instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. The Amazon ECS API follows an eventual consistency model. This is because of the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your Amazon ECS resources might not be immediately visible to all subsequent commands you run. Keep this in mind when you carry out an API command that immediately follows a previous API command. To manage eventual consistency, you can do the following: + /// Starts a new task using the specified task definition. You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places tasks using placement constraints and placement strategies. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. Alternatively, you can use [StartTask] to use your own scheduler or place tasks manually on specific container instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. The Amazon ECS API follows an eventual consistency model. This is because of the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your Amazon ECS resources might not be immediately visible to all subsequent commands you run. Keep this in mind when you carry out an API command that immediately follows a previous API command. To manage eventual consistency, you can do the following: /// /// * Confirm the state of the resource before you run a command to modify it. Run the DescribeTasks command using an exponential backoff algorithm to ensure that you allow enough time for the previous command to propagate through the system. To do this, run the DescribeTasks command repeatedly, starting with a couple of seconds of wait time and increasing gradually up to five minutes of wait time. /// @@ -2116,7 +2116,7 @@ extension ECSClient: ECSClientProtocol { /// Performs the `StartTask` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Starts a new task from the specified task definition on the specified container instance or instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. Alternatively, you can use [RunTask] to place tasks for you. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. + /// Starts a new task from the specified task definition on the specified container instance or instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. Alternatively, you can use [RunTask] to place tasks for you. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. /// /// - Parameter StartTaskInput : [no documentation found] /// @@ -2129,6 +2129,7 @@ extension ECSClient: ECSClientProtocol { /// - `ClusterNotFoundException` : The specified cluster wasn't found. You can view your available clusters with [ListClusters]. Amazon ECS clusters are Region specific. /// - `InvalidParameterException` : The specified parameter isn't valid. Review the available parameters for the API request. /// - `ServerException` : These errors are usually caused by a server issue. + /// - `UnsupportedFeatureException` : The specified task isn't supported in this Region. public func startTask(input: StartTaskInput) async throws -> StartTaskOutput { let context = ClientRuntime.HttpContextBuilder() @@ -2727,7 +2728,7 @@ extension ECSClient: ECSClientProtocol { /// Performs the `UpdateService` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Modifies the parameters of a service. For services using the rolling update (ECS) you can update the desired count, deployment configuration, network configuration, load balancers, service registries, enable ECS managed tags option, propagate tags option, task placement constraints and strategies, and task definition. When you update any of these parameters, Amazon ECS starts new tasks with the new configuration. For services using the blue/green (CODE_DEPLOY) deployment controller, only the desired count, deployment configuration, health check grace period, task placement constraints and strategies, enable ECS managed tags option, and propagate tags can be updated using this API. If the network configuration, platform version, task definition, or load balancer need to be updated, create a new CodeDeploy deployment. For more information, see [CreateDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) in the CodeDeploy API Reference. For services using an external deployment controller, you can update only the desired count, task placement constraints and strategies, health check grace period, enable ECS managed tags option, and propagate tags option, using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, create a new task set For more information, see [CreateTaskSet]. You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new desiredCount parameter. If you have updated the Docker image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy. If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, my_image:latest), you don't need to create a new revision of your task definition. You can update the service using the forceNewDeployment option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start. You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent, to determine the deployment strategy. + /// Modifies the parameters of a service. For services using the rolling update (ECS) you can update the desired count, deployment configuration, network configuration, load balancers, service registries, enable ECS managed tags option, propagate tags option, task placement constraints and strategies, and task definition. When you update any of these parameters, Amazon ECS starts new tasks with the new configuration. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when starting or running a task, or when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. You can update your volume configurations and trigger a new deployment. volumeConfigurations is only supported for REPLICA service and not DAEMON service. If you leave volumeConfigurationsnull, it doesn't trigger a new deployment. For more infomation on volumes, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. For services using the blue/green (CODE_DEPLOY) deployment controller, only the desired count, deployment configuration, health check grace period, task placement constraints and strategies, enable ECS managed tags option, and propagate tags can be updated using this API. If the network configuration, platform version, task definition, or load balancer need to be updated, create a new CodeDeploy deployment. For more information, see [CreateDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) in the CodeDeploy API Reference. For services using an external deployment controller, you can update only the desired count, task placement constraints and strategies, health check grace period, enable ECS managed tags option, and propagate tags option, using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, create a new task set For more information, see [CreateTaskSet]. You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new desiredCount parameter. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when starting or running a task, or when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. If you have updated the container image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy. If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, my_image:latest), you don't need to create a new revision of your task definition. You can update the service using the forceNewDeployment option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start. You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent, to determine the deployment strategy. /// /// * If minimumHealthyPercent is below 100%, the scheduler can ignore desiredCount temporarily during a deployment. For example, if desiredCount is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that don't use a load balancer are considered healthy if they're in the RUNNING state. Tasks for services that use a load balancer are considered healthy if they're in the RUNNING state and are reported as healthy by the load balancer. /// @@ -2781,6 +2782,7 @@ extension ECSClient: ECSClientProtocol { /// - `ServerException` : These errors are usually caused by a server issue. /// - `ServiceNotActiveException` : The specified service isn't active. You can't update a service that's inactive. If you have previously deleted a service, you can re-create it with [CreateService]. /// - `ServiceNotFoundException` : The specified service wasn't found. You can view your available services with [ListServices]. Amazon ECS services are cluster specific and Region specific. + /// - `UnsupportedFeatureException` : The specified task isn't supported in this Region. public func updateService(input: UpdateServiceInput) async throws -> UpdateServiceOutput { let context = ClientRuntime.HttpContextBuilder() diff --git a/Sources/Services/AWSECS/ECSClientProtocol.swift b/Sources/Services/AWSECS/ECSClientProtocol.swift index 7f0b68c95c8..20673b14160 100644 --- a/Sources/Services/AWSECS/ECSClientProtocol.swift +++ b/Sources/Services/AWSECS/ECSClientProtocol.swift @@ -39,7 +39,7 @@ public protocol ECSClientProtocol { func createCluster(input: CreateClusterInput) async throws -> CreateClusterOutput /// Performs the `CreateService` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Runs and maintains your desired number of tasks from a specified task definition. If the number of tasks running in a service drops below the desiredCount, Amazon ECS runs another copy of the task in the specified cluster. To update an existing service, see the [UpdateService] action. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind one or more load balancers. The load balancers distribute traffic across the tasks that are associated with the service. For more information, see [Service load balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the Amazon Elastic Container Service Developer Guide. Tasks for services that don't use a load balancer are considered healthy if they're in the RUNNING state. Tasks for services that use a load balancer are considered healthy if they're in the RUNNING state and are reported as healthy by the load balancer. There are two service scheduler strategies available: + /// Runs and maintains your desired number of tasks from a specified task definition. If the number of tasks running in a service drops below the desiredCount, Amazon ECS runs another copy of the task in the specified cluster. To update an existing service, see the [UpdateService] action. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind one or more load balancers. The load balancers distribute traffic across the tasks that are associated with the service. For more information, see [Service load balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the Amazon Elastic Container Service Developer Guide. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. volumeConfigurations is only supported for REPLICA service and not DAEMON service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. Tasks for services that don't use a load balancer are considered healthy if they're in the RUNNING state. Tasks for services that use a load balancer are considered healthy if they're in the RUNNING state and are reported as healthy by the load balancer. There are two service scheduler strategies available: /// /// * REPLICA - The replica scheduling strategy places and maintains your desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. For more information, see [Service scheduler concepts](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html) in the Amazon Elastic Container Service Developer Guide. /// @@ -67,7 +67,7 @@ public protocol ECSClientProtocol { func createService(input: CreateServiceInput) async throws -> CreateServiceOutput /// Performs the `CreateTaskSet` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Create a task set in the specified cluster and service. This is used when a service uses the EXTERNAL deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the Amazon Elastic Container Service Developer Guide. + /// Create a task set in the specified cluster and service. This is used when a service uses the EXTERNAL deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the Amazon Elastic Container Service Developer Guide. You can create a maximum of 5 tasks sets for a deployment. /// /// - Parameter CreateTaskSetInput : [no documentation found] /// @@ -662,7 +662,7 @@ public protocol ECSClientProtocol { func registerTaskDefinition(input: RegisterTaskDefinitionInput) async throws -> RegisterTaskDefinitionOutput /// Performs the `RunTask` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Starts a new task using the specified task definition. You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places tasks using placement constraints and placement strategies. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. Alternatively, you can use [StartTask] to use your own scheduler or place tasks manually on specific container instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. The Amazon ECS API follows an eventual consistency model. This is because of the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your Amazon ECS resources might not be immediately visible to all subsequent commands you run. Keep this in mind when you carry out an API command that immediately follows a previous API command. To manage eventual consistency, you can do the following: + /// Starts a new task using the specified task definition. You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places tasks using placement constraints and placement strategies. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. Alternatively, you can use [StartTask] to use your own scheduler or place tasks manually on specific container instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. The Amazon ECS API follows an eventual consistency model. This is because of the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your Amazon ECS resources might not be immediately visible to all subsequent commands you run. Keep this in mind when you carry out an API command that immediately follows a previous API command. To manage eventual consistency, you can do the following: /// /// * Confirm the state of the resource before you run a command to modify it. Run the DescribeTasks command using an exponential backoff algorithm to ensure that you allow enough time for the previous command to propagate through the system. To do this, run the DescribeTasks command repeatedly, starting with a couple of seconds of wait time and increasing gradually up to five minutes of wait time. /// @@ -692,7 +692,7 @@ public protocol ECSClientProtocol { func runTask(input: RunTaskInput) async throws -> RunTaskOutput /// Performs the `StartTask` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Starts a new task from the specified task definition on the specified container instance or instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. Alternatively, you can use [RunTask] to place tasks for you. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. + /// Starts a new task from the specified task definition on the specified container instance or instances. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. Alternatively, you can use [RunTask] to place tasks for you. For more information, see [Scheduling Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) in the Amazon Elastic Container Service Developer Guide. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. /// /// - Parameter StartTaskInput : [no documentation found] /// @@ -705,6 +705,7 @@ public protocol ECSClientProtocol { /// - `ClusterNotFoundException` : The specified cluster wasn't found. You can view your available clusters with [ListClusters]. Amazon ECS clusters are Region specific. /// - `InvalidParameterException` : The specified parameter isn't valid. Review the available parameters for the API request. /// - `ServerException` : These errors are usually caused by a server issue. + /// - `UnsupportedFeatureException` : The specified task isn't supported in this Region. func startTask(input: StartTaskInput) async throws -> StartTaskOutput /// Performs the `StopTask` operation on the `AmazonEC2ContainerServiceV20141113` service. /// @@ -895,7 +896,7 @@ public protocol ECSClientProtocol { func updateContainerInstancesState(input: UpdateContainerInstancesStateInput) async throws -> UpdateContainerInstancesStateOutput /// Performs the `UpdateService` operation on the `AmazonEC2ContainerServiceV20141113` service. /// - /// Modifies the parameters of a service. For services using the rolling update (ECS) you can update the desired count, deployment configuration, network configuration, load balancers, service registries, enable ECS managed tags option, propagate tags option, task placement constraints and strategies, and task definition. When you update any of these parameters, Amazon ECS starts new tasks with the new configuration. For services using the blue/green (CODE_DEPLOY) deployment controller, only the desired count, deployment configuration, health check grace period, task placement constraints and strategies, enable ECS managed tags option, and propagate tags can be updated using this API. If the network configuration, platform version, task definition, or load balancer need to be updated, create a new CodeDeploy deployment. For more information, see [CreateDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) in the CodeDeploy API Reference. For services using an external deployment controller, you can update only the desired count, task placement constraints and strategies, health check grace period, enable ECS managed tags option, and propagate tags option, using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, create a new task set For more information, see [CreateTaskSet]. You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new desiredCount parameter. If you have updated the Docker image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy. If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, my_image:latest), you don't need to create a new revision of your task definition. You can update the service using the forceNewDeployment option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start. You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent, to determine the deployment strategy. + /// Modifies the parameters of a service. For services using the rolling update (ECS) you can update the desired count, deployment configuration, network configuration, load balancers, service registries, enable ECS managed tags option, propagate tags option, task placement constraints and strategies, and task definition. When you update any of these parameters, Amazon ECS starts new tasks with the new configuration. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when starting or running a task, or when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. You can update your volume configurations and trigger a new deployment. volumeConfigurations is only supported for REPLICA service and not DAEMON service. If you leave volumeConfigurationsnull, it doesn't trigger a new deployment. For more infomation on volumes, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. For services using the blue/green (CODE_DEPLOY) deployment controller, only the desired count, deployment configuration, health check grace period, task placement constraints and strategies, enable ECS managed tags option, and propagate tags can be updated using this API. If the network configuration, platform version, task definition, or load balancer need to be updated, create a new CodeDeploy deployment. For more information, see [CreateDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) in the CodeDeploy API Reference. For services using an external deployment controller, you can update only the desired count, task placement constraints and strategies, health check grace period, enable ECS managed tags option, and propagate tags option, using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, create a new task set For more information, see [CreateTaskSet]. You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new desiredCount parameter. You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when starting or running a task, or when creating or updating a service. For more infomation, see [Amazon EBS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types) in the Amazon Elastic Container Service Developer Guide. If you have updated the container image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy. If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, my_image:latest), you don't need to create a new revision of your task definition. You can update the service using the forceNewDeployment option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start. You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent, to determine the deployment strategy. /// /// * If minimumHealthyPercent is below 100%, the scheduler can ignore desiredCount temporarily during a deployment. For example, if desiredCount is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that don't use a load balancer are considered healthy if they're in the RUNNING state. Tasks for services that use a load balancer are considered healthy if they're in the RUNNING state and are reported as healthy by the load balancer. /// @@ -949,6 +950,7 @@ public protocol ECSClientProtocol { /// - `ServerException` : These errors are usually caused by a server issue. /// - `ServiceNotActiveException` : The specified service isn't active. You can't update a service that's inactive. If you have previously deleted a service, you can re-create it with [CreateService]. /// - `ServiceNotFoundException` : The specified service wasn't found. You can view your available services with [ListServices]. Amazon ECS services are cluster specific and Region specific. + /// - `UnsupportedFeatureException` : The specified task isn't supported in this Region. func updateService(input: UpdateServiceInput) async throws -> UpdateServiceOutput /// Performs the `UpdateServicePrimaryTaskSet` operation on the `AmazonEC2ContainerServiceV20141113` service. /// diff --git a/Sources/Services/AWSECS/models/Models.swift b/Sources/Services/AWSECS/models/Models.swift index 9c997b032ee..89de4ae9f72 100644 --- a/Sources/Services/AWSECS/models/Models.swift +++ b/Sources/Services/AWSECS/models/Models.swift @@ -21,6 +21,7 @@ extension AccessDeniedException { public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -220,13 +221,13 @@ extension ECSClientTypes.Attachment: Swift.Codable { extension ECSClientTypes { /// An object representing a container instance or task attachment. public struct Attachment: Swift.Equatable { - /// Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC address, the subnet ID, and the private IPv4 address. + /// Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC address, the subnet ID, and the private IPv4 address. For Service Connect services, this includes portName, clientAliases, discoveryName, and ingressPortOverride. For elastic block storage, this includes roleArn, encrypted, filesystemType, iops, kmsKeyId, sizeInGiB, snapshotId, tagSpecifications, throughput, and volumeType. public var details: [ECSClientTypes.KeyValuePair]? /// The unique identifier for the attachment. public var id: Swift.String? /// The status of the attachment. Valid values are PRECREATED, CREATED, ATTACHING, ATTACHED, DETACHING, DETACHED, DELETED, and FAILED. public var status: Swift.String? - /// The type of the attachment, such as ElasticNetworkInterface. + /// The type of the attachment, such as ElasticNetworkInterface, Service Connect, and AmazonElasticBlockStorage. public var type: Swift.String? public init( @@ -377,6 +378,7 @@ extension AttributeLimitExceededException { public struct AttributeLimitExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -416,6 +418,7 @@ extension AttributeLimitExceededExceptionBody: Swift.Decodable { extension ECSClientTypes.AutoScalingGroupProvider: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupArn + case managedDraining case managedScaling case managedTerminationProtection } @@ -425,6 +428,9 @@ extension ECSClientTypes.AutoScalingGroupProvider: Swift.Codable { if let autoScalingGroupArn = self.autoScalingGroupArn { try encodeContainer.encode(autoScalingGroupArn, forKey: .autoScalingGroupArn) } + if let managedDraining = self.managedDraining { + try encodeContainer.encode(managedDraining.rawValue, forKey: .managedDraining) + } if let managedScaling = self.managedScaling { try encodeContainer.encode(managedScaling, forKey: .managedScaling) } @@ -441,6 +447,8 @@ extension ECSClientTypes.AutoScalingGroupProvider: Swift.Codable { managedScaling = managedScalingDecoded let managedTerminationProtectionDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ManagedTerminationProtection.self, forKey: .managedTerminationProtection) managedTerminationProtection = managedTerminationProtectionDecoded + let managedDrainingDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ManagedDraining.self, forKey: .managedDraining) + managedDraining = managedDrainingDecoded } } @@ -450,6 +458,8 @@ extension ECSClientTypes { /// The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name. /// This member is required. public var autoScalingGroupArn: Swift.String? + /// The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider. + public var managedDraining: ECSClientTypes.ManagedDraining? /// The managed scaling settings for the Auto Scaling group capacity provider. public var managedScaling: ECSClientTypes.ManagedScaling? /// The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. The default is off. When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work. When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see [Instance Protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the Auto Scaling User Guide. When managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in. @@ -457,11 +467,13 @@ extension ECSClientTypes { public init( autoScalingGroupArn: Swift.String? = nil, + managedDraining: ECSClientTypes.ManagedDraining? = nil, managedScaling: ECSClientTypes.ManagedScaling? = nil, managedTerminationProtection: ECSClientTypes.ManagedTerminationProtection? = nil ) { self.autoScalingGroupArn = autoScalingGroupArn + self.managedDraining = managedDraining self.managedScaling = managedScaling self.managedTerminationProtection = managedTerminationProtection } @@ -471,12 +483,16 @@ extension ECSClientTypes { extension ECSClientTypes.AutoScalingGroupProviderUpdate: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case managedDraining case managedScaling case managedTerminationProtection } public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let managedDraining = self.managedDraining { + try encodeContainer.encode(managedDraining.rawValue, forKey: .managedDraining) + } if let managedScaling = self.managedScaling { try encodeContainer.encode(managedScaling, forKey: .managedScaling) } @@ -491,22 +507,28 @@ extension ECSClientTypes.AutoScalingGroupProviderUpdate: Swift.Codable { managedScaling = managedScalingDecoded let managedTerminationProtectionDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ManagedTerminationProtection.self, forKey: .managedTerminationProtection) managedTerminationProtection = managedTerminationProtectionDecoded + let managedDrainingDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ManagedDraining.self, forKey: .managedDraining) + managedDraining = managedDrainingDecoded } } extension ECSClientTypes { /// The details of the Auto Scaling group capacity provider to update. public struct AutoScalingGroupProviderUpdate: Swift.Equatable { + /// The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider. + public var managedDraining: ECSClientTypes.ManagedDraining? /// The managed scaling settings for the Auto Scaling group capacity provider. public var managedScaling: ECSClientTypes.ManagedScaling? /// The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work. When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on. For more information, see [Instance Protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the Auto Scaling User Guide. When managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in. public var managedTerminationProtection: ECSClientTypes.ManagedTerminationProtection? public init( + managedDraining: ECSClientTypes.ManagedDraining? = nil, managedScaling: ECSClientTypes.ManagedScaling? = nil, managedTerminationProtection: ECSClientTypes.ManagedTerminationProtection? = nil ) { + self.managedDraining = managedDraining self.managedScaling = managedScaling self.managedTerminationProtection = managedTerminationProtection } @@ -613,6 +635,7 @@ extension BlockedException { public struct BlockedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -982,6 +1005,7 @@ extension ClientException { public struct ClientException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -1359,6 +1383,7 @@ extension ClusterContainsContainerInstancesException { public struct ClusterContainsContainerInstancesException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -1414,6 +1439,7 @@ extension ClusterContainsServicesException { public struct ClusterContainsServicesException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -1469,6 +1495,7 @@ extension ClusterContainsTasksException { public struct ClusterContainsTasksException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -1565,6 +1592,7 @@ extension ClusterNotFoundException { public struct ClusterNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -1806,6 +1834,7 @@ extension ConflictException { public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil /// The existing task ARNs which are already associated with the clientToken. public internal(set) var resourceIds: [Swift.String]? = nil @@ -4017,6 +4046,7 @@ extension CreateServiceInput: Swift.Encodable { case serviceRegistries case tags case taskDefinition + case volumeConfigurations } public func encode(to encoder: Swift.Encoder) throws { @@ -4108,6 +4138,12 @@ extension CreateServiceInput: Swift.Encodable { if let taskDefinition = self.taskDefinition { try encodeContainer.encode(taskDefinition, forKey: .taskDefinition) } + if let volumeConfigurations = volumeConfigurations { + var volumeConfigurationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .volumeConfigurations) + for servicevolumeconfiguration0 in volumeConfigurations { + try volumeConfigurationsContainer.encode(servicevolumeconfiguration0) + } + } } } @@ -4183,6 +4219,8 @@ public struct CreateServiceInput: Swift.Equatable { public var tags: [ECSClientTypes.Tag]? /// The family and revision (family:revision) or full ARN of the task definition to run in your service. If a revision isn't specified, the latest ACTIVE revision is used. A task definition must be specified if the service uses either the ECS or CODE_DEPLOY deployment controllers. For more information about deployment types, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html). public var taskDefinition: Swift.String? + /// The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. + public var volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? public init( capacityProviderStrategy: [ECSClientTypes.CapacityProviderStrategyItem]? = nil, @@ -4207,7 +4245,8 @@ public struct CreateServiceInput: Swift.Equatable { serviceName: Swift.String? = nil, serviceRegistries: [ECSClientTypes.ServiceRegistry]? = nil, tags: [ECSClientTypes.Tag]? = nil, - taskDefinition: Swift.String? = nil + taskDefinition: Swift.String? = nil, + volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? = nil ) { self.capacityProviderStrategy = capacityProviderStrategy @@ -4233,6 +4272,7 @@ public struct CreateServiceInput: Swift.Equatable { self.serviceRegistries = serviceRegistries self.tags = tags self.taskDefinition = taskDefinition + self.volumeConfigurations = volumeConfigurations } } @@ -4260,6 +4300,7 @@ struct CreateServiceInputBody: Swift.Equatable { let propagateTags: ECSClientTypes.PropagateTags? let enableExecuteCommand: Swift.Bool? let serviceConnectConfiguration: ECSClientTypes.ServiceConnectConfiguration? + let volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? } extension CreateServiceInputBody: Swift.Decodable { @@ -4287,6 +4328,7 @@ extension CreateServiceInputBody: Swift.Decodable { case serviceRegistries case tags case taskDefinition + case volumeConfigurations } public init(from decoder: Swift.Decoder) throws { @@ -4391,6 +4433,17 @@ extension CreateServiceInputBody: Swift.Decodable { enableExecuteCommand = enableExecuteCommandDecoded let serviceConnectConfigurationDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ServiceConnectConfiguration.self, forKey: .serviceConnectConfiguration) serviceConnectConfiguration = serviceConnectConfigurationDecoded + let volumeConfigurationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.ServiceVolumeConfiguration?].self, forKey: .volumeConfigurations) + var volumeConfigurationsDecoded0:[ECSClientTypes.ServiceVolumeConfiguration]? = nil + if let volumeConfigurationsContainer = volumeConfigurationsContainer { + volumeConfigurationsDecoded0 = [ECSClientTypes.ServiceVolumeConfiguration]() + for structure0 in volumeConfigurationsContainer { + if let structure0 = structure0 { + volumeConfigurationsDecoded0?.append(structure0) + } + } + } + volumeConfigurations = volumeConfigurationsDecoded0 } } @@ -5658,6 +5711,7 @@ extension ECSClientTypes.Deployment: Swift.Codable { case status case taskDefinition case updatedAt + case volumeConfigurations } public func encode(to encoder: Swift.Encoder) throws { @@ -5722,6 +5776,12 @@ extension ECSClientTypes.Deployment: Swift.Codable { if let updatedAt = self.updatedAt { try encodeContainer.encodeTimestamp(updatedAt, format: .epochSeconds, forKey: .updatedAt) } + if let volumeConfigurations = volumeConfigurations { + var volumeConfigurationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .volumeConfigurations) + for servicevolumeconfiguration0 in volumeConfigurations { + try volumeConfigurationsContainer.encode(servicevolumeconfiguration0) + } + } } public init(from decoder: Swift.Decoder) throws { @@ -5780,6 +5840,17 @@ extension ECSClientTypes.Deployment: Swift.Codable { } } serviceConnectResources = serviceConnectResourcesDecoded0 + let volumeConfigurationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.ServiceVolumeConfiguration?].self, forKey: .volumeConfigurations) + var volumeConfigurationsDecoded0:[ECSClientTypes.ServiceVolumeConfiguration]? = nil + if let volumeConfigurationsContainer = volumeConfigurationsContainer { + volumeConfigurationsDecoded0 = [ECSClientTypes.ServiceVolumeConfiguration]() + for structure0 in volumeConfigurationsContainer { + if let structure0 = structure0 { + volumeConfigurationsDecoded0?.append(structure0) + } + } + } + volumeConfigurations = volumeConfigurationsDecoded0 } } @@ -5822,6 +5893,8 @@ extension ECSClientTypes { public var taskDefinition: Swift.String? /// The Unix timestamp for the time when the service deployment was last updated. public var updatedAt: ClientRuntime.Date? + /// The details of the volume that was configuredAtLaunch. You can configure different settings like the size, throughput, volumeType, and ecryption in [ServiceManagedEBSVolumeConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html). The name of the volume must match the name from the task definition. + public var volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? public init( capacityProviderStrategy: [ECSClientTypes.CapacityProviderStrategyItem]? = nil, @@ -5841,7 +5914,8 @@ extension ECSClientTypes { serviceConnectResources: [ECSClientTypes.ServiceConnectServiceResource]? = nil, status: Swift.String? = nil, taskDefinition: Swift.String? = nil, - updatedAt: ClientRuntime.Date? = nil + updatedAt: ClientRuntime.Date? = nil, + volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? = nil ) { self.capacityProviderStrategy = capacityProviderStrategy @@ -5862,6 +5936,7 @@ extension ECSClientTypes { self.status = status self.taskDefinition = taskDefinition self.updatedAt = updatedAt + self.volumeConfigurations = volumeConfigurations } } @@ -8015,6 +8090,103 @@ extension ECSClientTypes { } +extension ECSClientTypes { + public enum EBSResourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case volume + case sdkUnknown(Swift.String) + + public static var allCases: [EBSResourceType] { + return [ + .volume, + .sdkUnknown("") + ] + } + 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 .volume: return "volume" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = EBSResourceType(rawValue: rawValue) ?? EBSResourceType.sdkUnknown(rawValue) + } + } +} + +extension ECSClientTypes.EBSTagSpecification: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case propagateTags + case resourceType + case tags + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let propagateTags = self.propagateTags { + try encodeContainer.encode(propagateTags.rawValue, forKey: .propagateTags) + } + if let resourceType = self.resourceType { + try encodeContainer.encode(resourceType.rawValue, forKey: .resourceType) + } + if let tags = tags { + var tagsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .tags) + for tag0 in tags { + try tagsContainer.encode(tag0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let resourceTypeDecoded = try containerValues.decodeIfPresent(ECSClientTypes.EBSResourceType.self, forKey: .resourceType) + resourceType = resourceTypeDecoded + let tagsContainer = try containerValues.decodeIfPresent([ECSClientTypes.Tag?].self, forKey: .tags) + var tagsDecoded0:[ECSClientTypes.Tag]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [ECSClientTypes.Tag]() + for structure0 in tagsContainer { + if let structure0 = structure0 { + tagsDecoded0?.append(structure0) + } + } + } + tags = tagsDecoded0 + let propagateTagsDecoded = try containerValues.decodeIfPresent(ECSClientTypes.PropagateTags.self, forKey: .propagateTags) + propagateTags = propagateTagsDecoded + } +} + +extension ECSClientTypes { + /// The tag specifications of an Amazon EBS volume. + public struct EBSTagSpecification: Swift.Equatable { + /// Determines whether to propagate the tags from the task definition to 
the Amazon EBS volume. Tags can only propagate to a SERVICE specified in 
ServiceVolumeConfiguration. If no value is specified, the tags aren't 
propagated. + public var propagateTags: ECSClientTypes.PropagateTags? + /// The type of volume resource. + /// This member is required. + public var resourceType: ECSClientTypes.EBSResourceType? + /// The tags applied to this Amazon EBS volume. AmazonECSCreated and AmazonECSManaged are reserved tags that can't be used. + public var tags: [ECSClientTypes.Tag]? + + public init( + propagateTags: ECSClientTypes.PropagateTags? = nil, + resourceType: ECSClientTypes.EBSResourceType? = nil, + tags: [ECSClientTypes.Tag]? = nil + ) + { + self.propagateTags = propagateTags + self.resourceType = resourceType + self.tags = tags + } + } + +} + extension ECSClientTypes.EFSAuthorizationConfig: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case accessPointId @@ -9619,6 +9791,7 @@ extension InvalidParameterException { public struct InvalidParameterException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -9858,6 +10031,7 @@ extension LimitExceededException { public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -11998,6 +12172,38 @@ extension ECSClientTypes { } +extension ECSClientTypes { + public enum ManagedDraining: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case disabled + case enabled + case sdkUnknown(Swift.String) + + public static var allCases: [ManagedDraining] { + return [ + .disabled, + .enabled, + .sdkUnknown("") + ] + } + 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 .disabled: return "DISABLED" + case .enabled: return "ENABLED" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ManagedDraining(rawValue: rawValue) ?? ManagedDraining.sdkUnknown(rawValue) + } + } +} + extension ECSClientTypes.ManagedScaling: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case instanceWarmupPeriod @@ -12156,6 +12362,7 @@ extension MissingVersionException { public struct MissingVersionException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -12266,6 +12473,7 @@ extension NamespaceNotFoundException { public struct NamespaceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -12566,6 +12774,7 @@ extension NoUpdateAvailableException { public struct NoUpdateAvailableException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -12936,6 +13145,7 @@ extension PlatformTaskDefinitionIncompatibilityException { public struct PlatformTaskDefinitionIncompatibilityException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -12991,6 +13201,7 @@ extension PlatformUnknownException { public struct PlatformUnknownException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -14741,6 +14952,7 @@ extension ResourceInUseException { public struct ResourceInUseException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -14796,6 +15008,7 @@ extension ResourceNotFoundException { public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -14931,6 +15144,7 @@ extension RunTaskInput: Swift.Encodable { case startedBy case tags case taskDefinition + case volumeConfigurations } public func encode(to encoder: Swift.Encoder) throws { @@ -15001,6 +15215,12 @@ extension RunTaskInput: Swift.Encodable { if let taskDefinition = self.taskDefinition { try encodeContainer.encode(taskDefinition, forKey: .taskDefinition) } + if let volumeConfigurations = volumeConfigurations { + var volumeConfigurationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .volumeConfigurations) + for taskvolumeconfiguration0 in volumeConfigurations { + try volumeConfigurationsContainer.encode(taskvolumeconfiguration0) + } + } } } @@ -15062,6 +15282,8 @@ public struct RunTaskInput: Swift.Equatable { /// The family and revision (family:revision) or full ARN of the task definition to run. If a revision isn't specified, the latest ACTIVE revision is used. When you create a policy for run-task, you can set the resource to be the latest task definition revision, or a specific revision. The full ARN value must match the value that you specified as the Resource of the principal's permissions policy. When you specify the policy resource as the latest task definition version (by setting the Resource in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName), then set this value to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName. When you specify the policy resource as a specific task definition version (by setting the Resource in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1 or arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*), then set this value to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1. For more information, see [Policy Resources for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources) in the Amazon Elastic Container Service developer Guide. /// This member is required. public var taskDefinition: Swift.String? + /// The details of the volume that was configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in in [TaskManagedEBSVolumeConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html). The name of the volume must match the name from the task definition. + public var volumeConfigurations: [ECSClientTypes.TaskVolumeConfiguration]? public init( capacityProviderStrategy: [ECSClientTypes.CapacityProviderStrategyItem]? = nil, @@ -15081,7 +15303,8 @@ public struct RunTaskInput: Swift.Equatable { referenceId: Swift.String? = nil, startedBy: Swift.String? = nil, tags: [ECSClientTypes.Tag]? = nil, - taskDefinition: Swift.String? = nil + taskDefinition: Swift.String? = nil, + volumeConfigurations: [ECSClientTypes.TaskVolumeConfiguration]? = nil ) { self.capacityProviderStrategy = capacityProviderStrategy @@ -15102,6 +15325,7 @@ public struct RunTaskInput: Swift.Equatable { self.startedBy = startedBy self.tags = tags self.taskDefinition = taskDefinition + self.volumeConfigurations = volumeConfigurations } } @@ -15124,6 +15348,7 @@ struct RunTaskInputBody: Swift.Equatable { let tags: [ECSClientTypes.Tag]? let taskDefinition: Swift.String? let clientToken: Swift.String? + let volumeConfigurations: [ECSClientTypes.TaskVolumeConfiguration]? } extension RunTaskInputBody: Swift.Decodable { @@ -15146,6 +15371,7 @@ extension RunTaskInputBody: Swift.Decodable { case startedBy case tags case taskDefinition + case volumeConfigurations } public init(from decoder: Swift.Decoder) throws { @@ -15222,6 +15448,17 @@ extension RunTaskInputBody: Swift.Decodable { taskDefinition = taskDefinitionDecoded let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) clientToken = clientTokenDecoded + let volumeConfigurationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.TaskVolumeConfiguration?].self, forKey: .volumeConfigurations) + var volumeConfigurationsDecoded0:[ECSClientTypes.TaskVolumeConfiguration]? = nil + if let volumeConfigurationsContainer = volumeConfigurationsContainer { + volumeConfigurationsDecoded0 = [ECSClientTypes.TaskVolumeConfiguration]() + for structure0 in volumeConfigurationsContainer { + if let structure0 = structure0 { + volumeConfigurationsDecoded0?.append(structure0) + } + } + } + volumeConfigurations = volumeConfigurationsDecoded0 } } @@ -15569,6 +15806,7 @@ extension ServerException { public struct ServerException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -16405,6 +16643,171 @@ extension ECSClientTypes { } } +extension ECSClientTypes.ServiceManagedEBSVolumeConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case encrypted + case filesystemType + case iops + case kmsKeyId + case roleArn + case sizeInGiB + case snapshotId + case tagSpecifications + case throughput + case volumeType + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let encrypted = self.encrypted { + try encodeContainer.encode(encrypted, forKey: .encrypted) + } + if let filesystemType = self.filesystemType { + try encodeContainer.encode(filesystemType.rawValue, forKey: .filesystemType) + } + if let iops = self.iops { + try encodeContainer.encode(iops, forKey: .iops) + } + if let kmsKeyId = self.kmsKeyId { + try encodeContainer.encode(kmsKeyId, forKey: .kmsKeyId) + } + if let roleArn = self.roleArn { + try encodeContainer.encode(roleArn, forKey: .roleArn) + } + if let sizeInGiB = self.sizeInGiB { + try encodeContainer.encode(sizeInGiB, forKey: .sizeInGiB) + } + if let snapshotId = self.snapshotId { + try encodeContainer.encode(snapshotId, forKey: .snapshotId) + } + if let tagSpecifications = tagSpecifications { + var tagSpecificationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .tagSpecifications) + for ebstagspecification0 in tagSpecifications { + try tagSpecificationsContainer.encode(ebstagspecification0) + } + } + if let throughput = self.throughput { + try encodeContainer.encode(throughput, forKey: .throughput) + } + if let volumeType = self.volumeType { + try encodeContainer.encode(volumeType, forKey: .volumeType) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) + encrypted = encryptedDecoded + let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) + kmsKeyId = kmsKeyIdDecoded + let volumeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeType) + volumeType = volumeTypeDecoded + let sizeInGiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInGiB) + sizeInGiB = sizeInGiBDecoded + let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) + snapshotId = snapshotIdDecoded + let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) + iops = iopsDecoded + let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) + throughput = throughputDecoded + let tagSpecificationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.EBSTagSpecification?].self, forKey: .tagSpecifications) + var tagSpecificationsDecoded0:[ECSClientTypes.EBSTagSpecification]? = nil + if let tagSpecificationsContainer = tagSpecificationsContainer { + tagSpecificationsDecoded0 = [ECSClientTypes.EBSTagSpecification]() + for structure0 in tagSpecificationsContainer { + if let structure0 = structure0 { + tagSpecificationsDecoded0?.append(structure0) + } + } + } + tagSpecifications = tagSpecificationsDecoded0 + let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) + roleArn = roleArnDecoded + let filesystemTypeDecoded = try containerValues.decodeIfPresent(ECSClientTypes.TaskFilesystemType.self, forKey: .filesystemType) + filesystemType = filesystemTypeDecoded + } +} + +extension ECSClientTypes { + /// The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. Many of these parameters map 1:1 with the Amazon EBS CreateVolume API request parameters. + public struct ServiceManagedEBSVolumeConfiguration: Swift.Equatable { + /// Indicates whether the volume should be encrypted. If no value is specified, encryption is turned on by default. This parameter maps 1:1 with the Encrypted parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var encrypted: Swift.Bool? + /// The Linux filesystem type for the volume. For volumes created from a snapshot, you must specify the same filesystem type that the volume was using when the snapshot was created. If there is a filesystem type mismatch, the task will fail to start. The available filesystem types are
 ext3, ext4, and xfs. If no value is specified, the xfs filesystem type is used by default. + public var filesystemType: ECSClientTypes.TaskFilesystemType? + /// The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. The following are the supported values for each volume type. + /// + /// * gp3: 3,000 - 16,000 IOPS + /// + /// * io1: 100 - 64,000 IOPS + /// + /// * io2: 100 - 256,000 IOPS + /// + /// + /// This parameter is required for io1 and io2 volume types. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for st1, sc1, or standard volume types. This parameter maps 1:1 with the Iops parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var iops: Swift.Int? + /// The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption. When encryption is turned on and no Amazon Web Services Key Management Service key is specified, the default Amazon Web Services managed key for Amazon EBS volumes is used. This parameter maps 1:1 with the KmsKeyId parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. Amazon Web Services authenticates the Amazon Web Services Key Management Service key asynchronously. Therefore, if you specify an ID, alias, or ARN that is invalid, the action can appear to complete, but eventually fails. + public var kmsKeyId: Swift.String? + /// The ARN of the IAM role to associate with this volume. This is the Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. We recommend using the Amazon ECS-managed AmazonECSInfrastructureRolePolicyForVolumes IAM policy with this role. For more information, see [Amazon ECS infrastructure IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/infrastructure_IAM_role.html) in the Amazon ECS Developer Guide. + /// This member is required. + public var roleArn: Swift.String? + /// The size of the volume in GiB. You must specify either a volume size or a snapshot ID. If you specify a snapshot ID, the snapshot size is used for the volume size by default. You can optionally specify a volume size greater than or equal to the snapshot size. This parameter maps 1:1 with the Size parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. The following are the supported volume size values for each volume type. + /// + /// * gp2 and gp3: 1-16,384 + /// + /// * io1 and io2: 4-16,384 + /// + /// * st1 and sc1: 125-16,384 + /// + /// * standard: 1-1,024 + public var sizeInGiB: Swift.Int? + /// The snapshot that Amazon ECS uses to create the volume. You must specify either a snapshot ID or a volume size. This parameter maps 1:1 with the SnapshotId parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var snapshotId: Swift.String? + /// The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the TagSpecifications.N parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var tagSpecifications: [ECSClientTypes.EBSTagSpecification]? + /// The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s. This parameter maps 1:1 with the Throughput parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. This parameter is only supported for the gp3 volume type. + public var throughput: Swift.Int? + /// The volume type. This parameter maps 1:1 with the VolumeType parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. For more information, see [Amazon EBS volume types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html) in the Amazon EC2 User Guide. The following are the supported volume types. + /// + /// * General Purpose SSD: gp2|gp3 + /// + /// * Provisioned IOPS SSD: io1|io2 + /// + /// * Throughput Optimized HDD: st1 + /// + /// * Cold HDD: sc1 + /// + /// * Magnetic: standard The magnetic volume type is not supported on Fargate. + public var volumeType: Swift.String? + + public init( + encrypted: Swift.Bool? = nil, + filesystemType: ECSClientTypes.TaskFilesystemType? = nil, + iops: Swift.Int? = nil, + kmsKeyId: Swift.String? = nil, + roleArn: Swift.String? = nil, + sizeInGiB: Swift.Int? = nil, + snapshotId: Swift.String? = nil, + tagSpecifications: [ECSClientTypes.EBSTagSpecification]? = nil, + throughput: Swift.Int? = nil, + volumeType: Swift.String? = nil + ) + { + self.encrypted = encrypted + self.filesystemType = filesystemType + self.iops = iops + self.kmsKeyId = kmsKeyId + self.roleArn = roleArn + self.sizeInGiB = sizeInGiB + self.snapshotId = snapshotId + self.tagSpecifications = tagSpecifications + self.throughput = throughput + self.volumeType = volumeType + } + } + +} + extension ServiceNotActiveException { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { if let data = try await httpResponse.body.readData(), @@ -16424,6 +16827,7 @@ extension ServiceNotActiveException { public struct ServiceNotActiveException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -16479,6 +16883,7 @@ extension ServiceNotFoundException { public struct ServiceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -16580,6 +16985,52 @@ extension ECSClientTypes { } +extension ECSClientTypes.ServiceVolumeConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case managedEBSVolume + case name + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let managedEBSVolume = self.managedEBSVolume { + try encodeContainer.encode(managedEBSVolume, forKey: .managedEBSVolume) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let managedEBSVolumeDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ServiceManagedEBSVolumeConfiguration.self, forKey: .managedEBSVolume) + managedEBSVolume = managedEBSVolumeDecoded + } +} + +extension ECSClientTypes { + /// The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. + public struct ServiceVolumeConfiguration: Swift.Equatable { + /// The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. The Amazon EBS volumes are visible in your account in the Amazon EC2 console once they are created. + public var managedEBSVolume: ECSClientTypes.ServiceManagedEBSVolumeConfiguration? + /// The name of the volume. This value must match the volume name from the Volume object in the task definition. + /// This member is required. + public var name: Swift.String? + + public init( + managedEBSVolume: ECSClientTypes.ServiceManagedEBSVolumeConfiguration? = nil, + name: Swift.String? = nil + ) + { + self.managedEBSVolume = managedEBSVolume + self.name = name + } + } + +} + extension ECSClientTypes.Session: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case sessionId @@ -16868,6 +17319,7 @@ extension StartTaskInput: Swift.Encodable { case startedBy case tags case taskDefinition + case volumeConfigurations } public func encode(to encoder: Swift.Encoder) throws { @@ -16914,6 +17366,12 @@ extension StartTaskInput: Swift.Encodable { if let taskDefinition = self.taskDefinition { try encodeContainer.encode(taskDefinition, forKey: .taskDefinition) } + if let volumeConfigurations = volumeConfigurations { + var volumeConfigurationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .volumeConfigurations) + for taskvolumeconfiguration0 in volumeConfigurations { + try volumeConfigurationsContainer.encode(taskvolumeconfiguration0) + } + } } } @@ -16964,6 +17422,8 @@ public struct StartTaskInput: Swift.Equatable { /// The family and revision (family:revision) or full ARN of the task definition to start. If a revision isn't specified, the latest ACTIVE revision is used. /// This member is required. public var taskDefinition: Swift.String? + /// The details of the volume that was configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in [TaskManagedEBSVolumeConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html). The name of the volume must match the name from the task definition. + public var volumeConfigurations: [ECSClientTypes.TaskVolumeConfiguration]? public init( cluster: Swift.String? = nil, @@ -16977,7 +17437,8 @@ public struct StartTaskInput: Swift.Equatable { referenceId: Swift.String? = nil, startedBy: Swift.String? = nil, tags: [ECSClientTypes.Tag]? = nil, - taskDefinition: Swift.String? = nil + taskDefinition: Swift.String? = nil, + volumeConfigurations: [ECSClientTypes.TaskVolumeConfiguration]? = nil ) { self.cluster = cluster @@ -16992,6 +17453,7 @@ public struct StartTaskInput: Swift.Equatable { self.startedBy = startedBy self.tags = tags self.taskDefinition = taskDefinition + self.volumeConfigurations = volumeConfigurations } } @@ -17008,6 +17470,7 @@ struct StartTaskInputBody: Swift.Equatable { let startedBy: Swift.String? let tags: [ECSClientTypes.Tag]? let taskDefinition: Swift.String? + let volumeConfigurations: [ECSClientTypes.TaskVolumeConfiguration]? } extension StartTaskInputBody: Swift.Decodable { @@ -17024,6 +17487,7 @@ extension StartTaskInputBody: Swift.Decodable { case startedBy case tags case taskDefinition + case volumeConfigurations } public init(from decoder: Swift.Decoder) throws { @@ -17070,6 +17534,17 @@ extension StartTaskInputBody: Swift.Decodable { tags = tagsDecoded0 let taskDefinitionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .taskDefinition) taskDefinition = taskDefinitionDecoded + let volumeConfigurationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.TaskVolumeConfiguration?].self, forKey: .volumeConfigurations) + var volumeConfigurationsDecoded0:[ECSClientTypes.TaskVolumeConfiguration]? = nil + if let volumeConfigurationsContainer = volumeConfigurationsContainer { + volumeConfigurationsDecoded0 = [ECSClientTypes.TaskVolumeConfiguration]() + for structure0 in volumeConfigurationsContainer { + if let structure0 = structure0 { + volumeConfigurationsDecoded0?.append(structure0) + } + } + } + volumeConfigurations = volumeConfigurationsDecoded0 } } @@ -17150,6 +17625,7 @@ enum StartTaskOutputError: ClientRuntime.HttpResponseErrorBinding { case "ClusterNotFoundException": return try await ClusterNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServerException": return try await ServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnsupportedFeatureException": return try await UnsupportedFeatureException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } @@ -18096,6 +18572,7 @@ extension TargetNotConnectedException { public struct TargetNotConnectedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -18151,6 +18628,7 @@ extension TargetNotFoundException { public struct TargetNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -19301,6 +19779,252 @@ extension ECSClientTypes { } } +extension ECSClientTypes { + public enum TaskFilesystemType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case ext3 + case ext4 + case xfs + case sdkUnknown(Swift.String) + + public static var allCases: [TaskFilesystemType] { + return [ + .ext3, + .ext4, + .xfs, + .sdkUnknown("") + ] + } + 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 .ext3: return "ext3" + case .ext4: return "ext4" + case .xfs: return "xfs" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = TaskFilesystemType(rawValue: rawValue) ?? TaskFilesystemType.sdkUnknown(rawValue) + } + } +} + +extension ECSClientTypes.TaskManagedEBSVolumeConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case encrypted + case filesystemType + case iops + case kmsKeyId + case roleArn + case sizeInGiB + case snapshotId + case tagSpecifications + case terminationPolicy + case throughput + case volumeType + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let encrypted = self.encrypted { + try encodeContainer.encode(encrypted, forKey: .encrypted) + } + if let filesystemType = self.filesystemType { + try encodeContainer.encode(filesystemType.rawValue, forKey: .filesystemType) + } + if let iops = self.iops { + try encodeContainer.encode(iops, forKey: .iops) + } + if let kmsKeyId = self.kmsKeyId { + try encodeContainer.encode(kmsKeyId, forKey: .kmsKeyId) + } + if let roleArn = self.roleArn { + try encodeContainer.encode(roleArn, forKey: .roleArn) + } + if let sizeInGiB = self.sizeInGiB { + try encodeContainer.encode(sizeInGiB, forKey: .sizeInGiB) + } + if let snapshotId = self.snapshotId { + try encodeContainer.encode(snapshotId, forKey: .snapshotId) + } + if let tagSpecifications = tagSpecifications { + var tagSpecificationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .tagSpecifications) + for ebstagspecification0 in tagSpecifications { + try tagSpecificationsContainer.encode(ebstagspecification0) + } + } + if let terminationPolicy = self.terminationPolicy { + try encodeContainer.encode(terminationPolicy, forKey: .terminationPolicy) + } + if let throughput = self.throughput { + try encodeContainer.encode(throughput, forKey: .throughput) + } + if let volumeType = self.volumeType { + try encodeContainer.encode(volumeType, forKey: .volumeType) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) + encrypted = encryptedDecoded + let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) + kmsKeyId = kmsKeyIdDecoded + let volumeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeType) + volumeType = volumeTypeDecoded + let sizeInGiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInGiB) + sizeInGiB = sizeInGiBDecoded + let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) + snapshotId = snapshotIdDecoded + let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) + iops = iopsDecoded + let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) + throughput = throughputDecoded + let tagSpecificationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.EBSTagSpecification?].self, forKey: .tagSpecifications) + var tagSpecificationsDecoded0:[ECSClientTypes.EBSTagSpecification]? = nil + if let tagSpecificationsContainer = tagSpecificationsContainer { + tagSpecificationsDecoded0 = [ECSClientTypes.EBSTagSpecification]() + for structure0 in tagSpecificationsContainer { + if let structure0 = structure0 { + tagSpecificationsDecoded0?.append(structure0) + } + } + } + tagSpecifications = tagSpecificationsDecoded0 + let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) + roleArn = roleArnDecoded + let terminationPolicyDecoded = try containerValues.decodeIfPresent(ECSClientTypes.TaskManagedEBSVolumeTerminationPolicy.self, forKey: .terminationPolicy) + terminationPolicy = terminationPolicyDecoded + let filesystemTypeDecoded = try containerValues.decodeIfPresent(ECSClientTypes.TaskFilesystemType.self, forKey: .filesystemType) + filesystemType = filesystemTypeDecoded + } +} + +extension ECSClientTypes { + /// The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task. + public struct TaskManagedEBSVolumeConfiguration: Swift.Equatable { + /// Indicates whether the volume should be encrypted. If no value is specified, encryption is turned on by default. This parameter maps 1:1 with the Encrypted parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var encrypted: Swift.Bool? + /// The Linux filesystem type for the volume. For volumes created from a snapshot, you must specify the same filesystem type that the volume was using when the snapshot was created. If there is a filesystem type mismatch, the task will fail to start. The available filesystem types are
 ext3, ext4, and xfs. If no value is specified, the xfs filesystem type is used by default. + public var filesystemType: ECSClientTypes.TaskFilesystemType? + /// The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. The following are the supported values for each volume type. + /// + /// * gp3: 3,000 - 16,000 IOPS + /// + /// * io1: 100 - 64,000 IOPS + /// + /// * io2: 100 - 256,000 IOPS + /// + /// + /// This parameter is required for io1 and io2 volume types. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for st1, sc1, or standard volume types. This parameter maps 1:1 with the Iops parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var iops: Swift.Int? + /// The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption. When encryption is turned on and no Amazon Web Services Key Management Service key is specified, the default Amazon Web Services managed key for Amazon EBS volumes is used. This parameter maps 1:1 with the KmsKeyId parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. Amazon Web Services authenticates the Amazon Web Services Key Management Service key asynchronously. Therefore, if you specify an ID, alias, or ARN that is invalid, the action can appear to complete, but eventually fails. + public var kmsKeyId: Swift.String? + /// The ARN of the IAM role to associate with this volume. This is the Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. We recommend using the Amazon ECS-managed AmazonECSInfrastructureRolePolicyForVolumes IAM policy with this role. For more information, see [Amazon ECS infrastructure IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/infrastructure_IAM_role.html) in the Amazon ECS Developer Guide. + /// This member is required. + public var roleArn: Swift.String? + /// The size of the volume in GiB. You must specify either a volume size or a snapshot ID. If you specify a snapshot ID, the snapshot size is used for the volume size by default. You can optionally specify a volume size greater than or equal to the snapshot size. This parameter maps 1:1 with the Size parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. The following are the supported volume size values for each volume type. + /// + /// * gp2 and gp3: 1-16,384 + /// + /// * io1 and io2: 4-16,384 + /// + /// * st1 and sc1: 125-16,384 + /// + /// * standard: 1-1,024 + public var sizeInGiB: Swift.Int? + /// The snapshot that Amazon ECS uses to create the volume. You must specify either a snapshot ID or a volume size. This parameter maps 1:1 with the SnapshotId parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var snapshotId: Swift.String? + /// The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the TagSpecifications.N parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. + public var tagSpecifications: [ECSClientTypes.EBSTagSpecification]? + /// The termination policy for the volume when the task exits. This provides a way to control whether Amazon ECS terminates the Amazon EBS volume when the task stops. + public var terminationPolicy: ECSClientTypes.TaskManagedEBSVolumeTerminationPolicy? + /// The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s. This parameter maps 1:1 with the Throughput parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. This parameter is only supported for the gp3 volume type. + public var throughput: Swift.Int? + /// The volume type. This parameter maps 1:1 with the VolumeType parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the Amazon EC2 API Reference. For more information, see [Amazon EBS volume types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html) in the Amazon EC2 User Guide. The following are the supported volume types. + /// + /// * General Purpose SSD: gp2|gp3 + /// + /// * Provisioned IOPS SSD: io1|io2 + /// + /// * Throughput Optimized HDD: st1 + /// + /// * Cold HDD: sc1 + /// + /// * Magnetic: standard The magnetic volume type is not supported on Fargate. + public var volumeType: Swift.String? + + public init( + encrypted: Swift.Bool? = nil, + filesystemType: ECSClientTypes.TaskFilesystemType? = nil, + iops: Swift.Int? = nil, + kmsKeyId: Swift.String? = nil, + roleArn: Swift.String? = nil, + sizeInGiB: Swift.Int? = nil, + snapshotId: Swift.String? = nil, + tagSpecifications: [ECSClientTypes.EBSTagSpecification]? = nil, + terminationPolicy: ECSClientTypes.TaskManagedEBSVolumeTerminationPolicy? = nil, + throughput: Swift.Int? = nil, + volumeType: Swift.String? = nil + ) + { + self.encrypted = encrypted + self.filesystemType = filesystemType + self.iops = iops + self.kmsKeyId = kmsKeyId + self.roleArn = roleArn + self.sizeInGiB = sizeInGiB + self.snapshotId = snapshotId + self.tagSpecifications = tagSpecifications + self.terminationPolicy = terminationPolicy + self.throughput = throughput + self.volumeType = volumeType + } + } + +} + +extension ECSClientTypes.TaskManagedEBSVolumeTerminationPolicy: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deleteOnTermination + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let deleteOnTermination = self.deleteOnTermination { + try encodeContainer.encode(deleteOnTermination, forKey: .deleteOnTermination) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) + deleteOnTermination = deleteOnTerminationDecoded + } +} + +extension ECSClientTypes { + /// The termination policy for the Amazon EBS volume when the task exits. For more information, see [Amazon ECS volume termination policy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types). + public struct TaskManagedEBSVolumeTerminationPolicy: Swift.Equatable { + /// Indicates whether the volume should be deleted on when the task stops. If a value of true is specified, 
Amazon ECS deletes the Amazon EBS volume on your behalf when the task goes into the STOPPED state. If no value is specified, the 
default value is true is used. When set to false, Amazon ECS leaves the volume in your 
account. + /// This member is required. + public var deleteOnTermination: Swift.Bool? + + public init( + deleteOnTermination: Swift.Bool? = nil + ) + { + self.deleteOnTermination = deleteOnTermination + } + } + +} + extension ECSClientTypes.TaskOverride: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case containerOverrides @@ -19810,6 +20534,7 @@ extension TaskSetNotFoundException { public struct TaskSetNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -19890,6 +20615,52 @@ extension ECSClientTypes { } } +extension ECSClientTypes.TaskVolumeConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case managedEBSVolume + case name + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let managedEBSVolume = self.managedEBSVolume { + try encodeContainer.encode(managedEBSVolume, forKey: .managedEBSVolume) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let managedEBSVolumeDecoded = try containerValues.decodeIfPresent(ECSClientTypes.TaskManagedEBSVolumeConfiguration.self, forKey: .managedEBSVolume) + managedEBSVolume = managedEBSVolumeDecoded + } +} + +extension ECSClientTypes { + /// Configuration settings for the task volume that was configuredAtLaunch that weren't set during RegisterTaskDef. + public struct TaskVolumeConfiguration: Swift.Equatable { + /// The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task. The Amazon EBS volumes are visible in your account in the Amazon EC2 console once they are created. + public var managedEBSVolume: ECSClientTypes.TaskManagedEBSVolumeConfiguration? + /// The name of the volume. This value must match the volume name from the Volume object in the task definition. + /// This member is required. + public var name: Swift.String? + + public init( + managedEBSVolume: ECSClientTypes.TaskManagedEBSVolumeConfiguration? = nil, + name: Swift.String? = nil + ) + { + self.managedEBSVolume = managedEBSVolume + self.name = name + } + } + +} + extension ECSClientTypes.Tmpfs: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case containerPath @@ -20139,6 +20910,7 @@ extension UnsupportedFeatureException { public struct UnsupportedFeatureException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -20968,6 +21740,7 @@ extension UpdateInProgressException { public struct UpdateInProgressException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Message that describes the cause of the exception. public internal(set) var message: Swift.String? = nil } @@ -21024,6 +21797,7 @@ extension UpdateServiceInput: Swift.Encodable { case serviceConnectConfiguration case serviceRegistries case taskDefinition + case volumeConfigurations } public func encode(to encoder: Swift.Encoder) throws { @@ -21097,6 +21871,12 @@ extension UpdateServiceInput: Swift.Encodable { if let taskDefinition = self.taskDefinition { try encodeContainer.encode(taskDefinition, forKey: .taskDefinition) } + if let volumeConfigurations = volumeConfigurations { + var volumeConfigurationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .volumeConfigurations) + for servicevolumeconfiguration0 in volumeConfigurations { + try volumeConfigurationsContainer.encode(servicevolumeconfiguration0) + } + } } } @@ -21144,6 +21924,8 @@ public struct UpdateServiceInput: Swift.Equatable { public var serviceRegistries: [ECSClientTypes.ServiceRegistry]? /// The family and revision (family:revision) or full ARN of the task definition to run in your service. If a revision is not specified, the latest ACTIVE revision is used. If you modify the task definition with UpdateService, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running. public var taskDefinition: Swift.String? + /// The details of the volume that was configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in [ServiceManagedEBSVolumeConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html). The name of the volume must match the name from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment. + public var volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? public init( capacityProviderStrategy: [ECSClientTypes.CapacityProviderStrategyItem]? = nil, @@ -21163,7 +21945,8 @@ public struct UpdateServiceInput: Swift.Equatable { service: Swift.String? = nil, serviceConnectConfiguration: ECSClientTypes.ServiceConnectConfiguration? = nil, serviceRegistries: [ECSClientTypes.ServiceRegistry]? = nil, - taskDefinition: Swift.String? = nil + taskDefinition: Swift.String? = nil, + volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? = nil ) { self.capacityProviderStrategy = capacityProviderStrategy @@ -21184,6 +21967,7 @@ public struct UpdateServiceInput: Swift.Equatable { self.serviceConnectConfiguration = serviceConnectConfiguration self.serviceRegistries = serviceRegistries self.taskDefinition = taskDefinition + self.volumeConfigurations = volumeConfigurations } } @@ -21206,6 +21990,7 @@ struct UpdateServiceInputBody: Swift.Equatable { let propagateTags: ECSClientTypes.PropagateTags? let serviceRegistries: [ECSClientTypes.ServiceRegistry]? let serviceConnectConfiguration: ECSClientTypes.ServiceConnectConfiguration? + let volumeConfigurations: [ECSClientTypes.ServiceVolumeConfiguration]? } extension UpdateServiceInputBody: Swift.Decodable { @@ -21228,6 +22013,7 @@ extension UpdateServiceInputBody: Swift.Decodable { case serviceConnectConfiguration case serviceRegistries case taskDefinition + case volumeConfigurations } public init(from decoder: Swift.Decoder) throws { @@ -21313,6 +22099,17 @@ extension UpdateServiceInputBody: Swift.Decodable { serviceRegistries = serviceRegistriesDecoded0 let serviceConnectConfigurationDecoded = try containerValues.decodeIfPresent(ECSClientTypes.ServiceConnectConfiguration.self, forKey: .serviceConnectConfiguration) serviceConnectConfiguration = serviceConnectConfigurationDecoded + let volumeConfigurationsContainer = try containerValues.decodeIfPresent([ECSClientTypes.ServiceVolumeConfiguration?].self, forKey: .volumeConfigurations) + var volumeConfigurationsDecoded0:[ECSClientTypes.ServiceVolumeConfiguration]? = nil + if let volumeConfigurationsContainer = volumeConfigurationsContainer { + volumeConfigurationsDecoded0 = [ECSClientTypes.ServiceVolumeConfiguration]() + for structure0 in volumeConfigurationsContainer { + if let structure0 = structure0 { + volumeConfigurationsDecoded0?.append(structure0) + } + } + } + volumeConfigurations = volumeConfigurationsDecoded0 } } @@ -21371,6 +22168,7 @@ enum UpdateServiceOutputError: ClientRuntime.HttpResponseErrorBinding { case "ServerException": return try await ServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceNotActiveException": return try await ServiceNotActiveException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceNotFoundException": return try await ServiceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnsupportedFeatureException": return try await UnsupportedFeatureException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } @@ -21901,6 +22699,7 @@ extension ECSClientTypes { extension ECSClientTypes.Volume: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case configuredAtLaunch case dockerVolumeConfiguration case efsVolumeConfiguration case fsxWindowsFileServerVolumeConfiguration @@ -21910,6 +22709,9 @@ extension ECSClientTypes.Volume: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let configuredAtLaunch = self.configuredAtLaunch { + try encodeContainer.encode(configuredAtLaunch, forKey: .configuredAtLaunch) + } if let dockerVolumeConfiguration = self.dockerVolumeConfiguration { try encodeContainer.encode(dockerVolumeConfiguration, forKey: .dockerVolumeConfiguration) } @@ -21939,12 +22741,16 @@ extension ECSClientTypes.Volume: Swift.Codable { efsVolumeConfiguration = efsVolumeConfigurationDecoded let fsxWindowsFileServerVolumeConfigurationDecoded = try containerValues.decodeIfPresent(ECSClientTypes.FSxWindowsFileServerVolumeConfiguration.self, forKey: .fsxWindowsFileServerVolumeConfiguration) fsxWindowsFileServerVolumeConfiguration = fsxWindowsFileServerVolumeConfigurationDecoded + let configuredAtLaunchDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .configuredAtLaunch) + configuredAtLaunch = configuredAtLaunchDecoded } } extension ECSClientTypes { - /// A data volume that's used in a task definition. For tasks that use the Amazon Elastic File System (Amazon EFS), specify an efsVolumeConfiguration. For Windows tasks that use Amazon FSx for Windows File Server file system, specify a fsxWindowsFileServerVolumeConfiguration. For tasks that use a Docker volume, specify a DockerVolumeConfiguration. For tasks that use a bind mount host volume, specify a host and optional sourcePath. For more information, see [Using Data Volumes in Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html). + /// The data volume configuration for tasks launched using this task definition. Specifying a volume configuration in a task definition is optional. The volume configuration may contain multiple volumes but only one volume configured at launch is supported. Each volume defined in the volume configuration may only specify a name and one of either configuredAtLaunch, dockerVolumeConfiguration, efsVolumeConfiguration, fsxWindowsFileServerVolumeConfiguration, or host. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html). public struct Volume: Swift.Equatable { + /// Indicates whether the volume should be configured at launch time. This is used to create Amazon EBS volumes for standalone tasks or tasks created as part of a service. Each task definition revision may only have one volume configured at launch in the volume configuration. To configure a volume at launch time, use this task definition revision and specify a volumeConfigurations object when calling the CreateService, UpdateService, RunTask or StartTask APIs. + public var configuredAtLaunch: Swift.Bool? /// This parameter is specified when you use Docker volumes. Windows containers only support the use of the local driver. To use bind mounts, specify the host parameter instead. Docker volumes aren't supported by tasks run on Fargate. public var dockerVolumeConfiguration: ECSClientTypes.DockerVolumeConfiguration? /// This parameter is specified when you use an Amazon Elastic File System file system for task storage. @@ -21953,10 +22759,11 @@ extension ECSClientTypes { public var fsxWindowsFileServerVolumeConfiguration: ECSClientTypes.FSxWindowsFileServerVolumeConfiguration? /// This parameter is specified when you use bind mount host volumes. The contents of the host parameter determine whether your bind mount host volume persists on the host container instance and where it's stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running. Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows containers can't mount directories on a different drive, and mount point can't be across drives. For example, you can mount C:\my\path:C:\my\path and D:\:D:\, but not D:\my\path:C:\my\path or D:\:C:\my\path. public var host: ECSClientTypes.HostVolumeProperties? - /// The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This name is referenced in the sourceVolume parameter of container definition mountPoints. This is required wwhen you use an Amazon EFS volume. + /// The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. When using a volume configured at launch, the name is required and must also be specified as the volume name in the ServiceVolumeConfiguration or TaskVolumeConfiguration parameter when creating your service or standalone task. For all other types of volumes, this name is referenced in the sourceVolume parameter of the mountPoints object in the container definition. When a volume is using the efsVolumeConfiguration, the name is required. public var name: Swift.String? public init( + configuredAtLaunch: Swift.Bool? = nil, dockerVolumeConfiguration: ECSClientTypes.DockerVolumeConfiguration? = nil, efsVolumeConfiguration: ECSClientTypes.EFSVolumeConfiguration? = nil, fsxWindowsFileServerVolumeConfiguration: ECSClientTypes.FSxWindowsFileServerVolumeConfiguration? = nil, @@ -21964,6 +22771,7 @@ extension ECSClientTypes { name: Swift.String? = nil ) { + self.configuredAtLaunch = configuredAtLaunch self.dockerVolumeConfiguration = dockerVolumeConfiguration self.efsVolumeConfiguration = efsVolumeConfiguration self.fsxWindowsFileServerVolumeConfiguration = fsxWindowsFileServerVolumeConfiguration diff --git a/Sources/Services/AWSEKS/EKSClient.swift b/Sources/Services/AWSEKS/EKSClient.swift index 1d689a7af48..5e73b53326e 100644 --- a/Sources/Services/AWSEKS/EKSClient.swift +++ b/Sources/Services/AWSEKS/EKSClient.swift @@ -1331,6 +1331,52 @@ extension EKSClient: EKSClientProtocol { return result } + /// Performs the `DescribeInsight` operation on the `AWSWesleyFrontend` service. + /// + /// Returns details about an insight that you specify using its ID. + /// + /// - Parameter DescribeInsightInput : [no documentation found] + /// + /// - Returns: `DescribeInsightOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : The specified parameter is invalid. Review the available parameters for the API request. + /// - `InvalidRequestException` : The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations. + /// - `ResourceNotFoundException` : The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific. + /// - `ServerException` : These errors are usually caused by a server-side issue. + public func describeInsight(input: DescribeInsightInput) async throws -> DescribeInsightOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "describeInsight") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "eks") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "describeInsight") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInsightOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DescribeNodegroup` operation on the `AWSWesleyFrontend` service. /// /// Describes a managed node group. @@ -1942,6 +1988,55 @@ extension EKSClient: EKSClientProtocol { return result } + /// Performs the `ListInsights` operation on the `AWSWesleyFrontend` service. + /// + /// Returns a list of all insights checked for against the specified cluster. You can filter which insights are returned by category, associated Kubernetes version, and status. + /// + /// - Parameter ListInsightsInput : [no documentation found] + /// + /// - Returns: `ListInsightsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : The specified parameter is invalid. Review the available parameters for the API request. + /// - `InvalidRequestException` : The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations. + /// - `ResourceNotFoundException` : The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific. + /// - `ServerException` : These errors are usually caused by a server-side issue. + public func listInsights(input: ListInsightsInput) async throws -> ListInsightsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "listInsights") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "eks") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "listInsights") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListInsightsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `ListNodegroups` operation on the `AWSWesleyFrontend` service. /// /// Lists the managed node groups associated with the specified cluster in your Amazon Web Services account in the specified Amazon Web Services Region. Self-managed node groups aren't listed. diff --git a/Sources/Services/AWSEKS/EKSClientProtocol.swift b/Sources/Services/AWSEKS/EKSClientProtocol.swift index a1f89b9ddad..47e43438b59 100644 --- a/Sources/Services/AWSEKS/EKSClientProtocol.swift +++ b/Sources/Services/AWSEKS/EKSClientProtocol.swift @@ -443,6 +443,22 @@ public protocol EKSClientProtocol { /// - `ServerException` : These errors are usually caused by a server-side issue. /// - `ServiceUnavailableException` : The service is unavailable. Back off and retry the operation. func describeIdentityProviderConfig(input: DescribeIdentityProviderConfigInput) async throws -> DescribeIdentityProviderConfigOutput + /// Performs the `DescribeInsight` operation on the `AWSWesleyFrontend` service. + /// + /// Returns details about an insight that you specify using its ID. + /// + /// - Parameter DescribeInsightInput : [no documentation found] + /// + /// - Returns: `DescribeInsightOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : The specified parameter is invalid. Review the available parameters for the API request. + /// - `InvalidRequestException` : The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations. + /// - `ResourceNotFoundException` : The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific. + /// - `ServerException` : These errors are usually caused by a server-side issue. + func describeInsight(input: DescribeInsightInput) async throws -> DescribeInsightOutput /// Performs the `DescribeNodegroup` operation on the `AWSWesleyFrontend` service. /// /// Describes a managed node group. @@ -651,6 +667,22 @@ public protocol EKSClientProtocol { /// - `ServerException` : These errors are usually caused by a server-side issue. /// - `ServiceUnavailableException` : The service is unavailable. Back off and retry the operation. func listIdentityProviderConfigs(input: ListIdentityProviderConfigsInput) async throws -> ListIdentityProviderConfigsOutput + /// Performs the `ListInsights` operation on the `AWSWesleyFrontend` service. + /// + /// Returns a list of all insights checked for against the specified cluster. You can filter which insights are returned by category, associated Kubernetes version, and status. + /// + /// - Parameter ListInsightsInput : [no documentation found] + /// + /// - Returns: `ListInsightsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : The specified parameter is invalid. Review the available parameters for the API request. + /// - `InvalidRequestException` : The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations. + /// - `ResourceNotFoundException` : The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific. + /// - `ServerException` : These errors are usually caused by a server-side issue. + func listInsights(input: ListInsightsInput) async throws -> ListInsightsOutput /// Performs the `ListNodegroups` operation on the `AWSWesleyFrontend` service. /// /// Lists the managed node groups associated with the specified cluster in your Amazon Web Services account in the specified Amazon Web Services Region. Self-managed node groups aren't listed. diff --git a/Sources/Services/AWSEKS/Paginators.swift b/Sources/Services/AWSEKS/Paginators.swift index 4b9c20efc18..bb7822ea57a 100644 --- a/Sources/Services/AWSEKS/Paginators.swift +++ b/Sources/Services/AWSEKS/Paginators.swift @@ -286,6 +286,38 @@ extension PaginatorSequence where OperationStackInput == ListIdentityProviderCon return try await self.asyncCompactMap { item in item.identityProviderConfigs } } } +extension EKSClient { + /// Paginate over `[ListInsightsOutput]` 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 `[ListInsightsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListInsightsOutput` + public func listInsightsPaginated(input: ListInsightsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listInsights(input:)) + } +} + +extension ListInsightsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListInsightsInput { + return ListInsightsInput( + clusterName: self.clusterName, + filter: self.filter, + maxResults: self.maxResults, + nextToken: token + )} +} + +extension PaginatorSequence where OperationStackInput == ListInsightsInput, OperationStackOutput == ListInsightsOutput { + /// This paginator transforms the `AsyncSequence` returned by `listInsightsPaginated` + /// to access the nested member `[EKSClientTypes.InsightSummary]` + /// - Returns: `[EKSClientTypes.InsightSummary]` + public func insights() async throws -> [EKSClientTypes.InsightSummary] { + return try await self.asyncCompactMap { item in item.insights } + } +} extension EKSClient { /// Paginate over `[ListNodegroupsOutput]` results. /// diff --git a/Sources/Services/AWSEKS/models/Models.swift b/Sources/Services/AWSEKS/models/Models.swift index 7ce2a4791c3..e941cea6781 100644 --- a/Sources/Services/AWSEKS/models/Models.swift +++ b/Sources/Services/AWSEKS/models/Models.swift @@ -1692,6 +1692,35 @@ extension EKSClientTypes { } } +extension EKSClientTypes { + public enum Category: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case upgradeReadiness + case sdkUnknown(Swift.String) + + public static var allCases: [Category] { + return [ + .upgradeReadiness, + .sdkUnknown("") + ] + } + 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 .upgradeReadiness: return "UPGRADE_READINESS" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = Category(rawValue: rawValue) ?? Category.sdkUnknown(rawValue) + } + } +} + extension EKSClientTypes.Certificate: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case data @@ -1823,6 +1852,61 @@ extension ClientExceptionBody: Swift.Decodable { } } +extension EKSClientTypes.ClientStat: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case lastRequestTime + case numberOfRequestsLast30Days + case userAgent + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let lastRequestTime = self.lastRequestTime { + try encodeContainer.encodeTimestamp(lastRequestTime, format: .epochSeconds, forKey: .lastRequestTime) + } + if numberOfRequestsLast30Days != 0 { + try encodeContainer.encode(numberOfRequestsLast30Days, forKey: .numberOfRequestsLast30Days) + } + if let userAgent = self.userAgent { + try encodeContainer.encode(userAgent, forKey: .userAgent) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let userAgentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userAgent) + userAgent = userAgentDecoded + let numberOfRequestsLast30DaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfRequestsLast30Days) ?? 0 + numberOfRequestsLast30Days = numberOfRequestsLast30DaysDecoded + let lastRequestTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastRequestTime) + lastRequestTime = lastRequestTimeDecoded + } +} + +extension EKSClientTypes { + /// Details about clients using the deprecated resources. + public struct ClientStat: Swift.Equatable { + /// The timestamp of the last request seen from the Kubernetes client. + public var lastRequestTime: ClientRuntime.Date? + /// The number of requests from the Kubernetes client seen over the last 30 days. + public var numberOfRequestsLast30Days: Swift.Int + /// The user agent of the Kubernetes client using the deprecated resource. + public var userAgent: Swift.String? + + public init( + lastRequestTime: ClientRuntime.Date? = nil, + numberOfRequestsLast30Days: Swift.Int = 0, + userAgent: Swift.String? = nil + ) + { + self.lastRequestTime = lastRequestTime + self.numberOfRequestsLast30Days = numberOfRequestsLast30Days + self.userAgent = userAgent + } + } + +} + extension EKSClientTypes.Cluster: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case accessConfig @@ -2771,12 +2855,12 @@ public struct CreateAccessEntryInput: Swift.Equatable { public var clusterName: Swift.String? /// The value for name that you've specified for kind: Group as a subject in a Kubernetes RoleBinding or ClusterRoleBinding object. Amazon EKS doesn't confirm that the value for name exists in any bindings on your cluster. You can specify one or more names. Kubernetes authorizes the principalArn of the access entry to access any cluster objects that you've specified in a Kubernetes Role or ClusterRole object that is also specified in a binding's roleRef. For more information about creating Kubernetes RoleBinding, ClusterRoleBinding, Role, or ClusterRole objects, see [Using RBAC Authorization in the Kubernetes documentation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/). If you want Amazon EKS to authorize the principalArn (instead of, or in addition to Kubernetes authorizing the principalArn), you can associate one or more access policies to the access entry using AssociateAccessPolicy. If you associate any access policies, the principalARN has all permissions assigned in the associated access policies and all permissions in any Kubernetes Role or ClusterRole objects that the group names are bound to. public var kubernetesGroups: [Swift.String]? - /// The ARN of the IAM principal for the AccessEntry. You can specify one ARN for each access entry. You can't specify the same ARN in more than one access entry. This value can't be changed after access entry creation. [IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) recommend using IAM roles with temporary credentials, rather than IAM users with long-term credentials. + /// The ARN of the IAM principal for the AccessEntry. You can specify one ARN for each access entry. You can't specify the same ARN in more than one access entry. This value can't be changed after access entry creation. The valid principals differ depending on the type of the access entry in the type field. The only valid ARN is IAM roles for the types of access entries for nodes: . You can use every IAM principal type for STANDARD access entries. You can't use the STS session principal type with access entries because this is a temporary principal for each session and not a permanent identity that can be assigned permissions. [IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) recommend using IAM roles with temporary credentials, rather than IAM users with long-term credentials. /// This member is required. public var principalArn: Swift.String? /// Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources. public var tags: [Swift.String:Swift.String]? - /// If the principalArn is for an IAM role that's used for self-managed Amazon EC2 nodes, specify EC2_LINUX or EC2_WINDOWS. Amazon EKS grants the necessary permissions to the node for you. If the principalArn is for any other purpose, specify STANDARD. If you don't specify a value, Amazon EKS sets the value to STANDARD. It's unnecessary to create access entries for IAM roles used with Fargate profiles or managed Amazon EC2 nodes, because Amazon EKS creates entries in the aws-authConfigMap for the roles. You can't change this value once you've created the access entry. If you set the value to EC2_LINUX or EC2_WINDOWS, you can't specify values for kubernetesGroups, or associate an AccessPolicy to the access entry. + /// The type of the new access entry. Valid values are Standard, FARGATE_LINUX, EC2_LINUX, and EC2_WINDOWS. If the principalArn is for an IAM role that's used for self-managed Amazon EC2 nodes, specify EC2_LINUX or EC2_WINDOWS. Amazon EKS grants the necessary permissions to the node for you. If the principalArn is for any other purpose, specify STANDARD. If you don't specify a value, Amazon EKS sets the value to STANDARD. It's unnecessary to create access entries for IAM roles used with Fargate profiles or managed Amazon EC2 nodes, because Amazon EKS creates entries in the aws-authConfigMap for the roles. You can't change this value once you've created the access entry. If you set the value to EC2_LINUX or EC2_WINDOWS, you can't specify values for kubernetesGroups, or associate an AccessPolicy to the access entry. public var type: Swift.String? /// The username to authenticate to Kubernetes with. We recommend not specifying a username and letting Amazon EKS specify it for you. For more information about the value Amazon EKS specifies for you, or constraints before specifying your own username, see [Creating access entries](https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#creating-access-entries) in the Amazon EKS User Guide. public var username: Swift.String? @@ -4944,6 +5028,93 @@ enum DeletePodIdentityAssociationOutputError: ClientRuntime.HttpResponseErrorBin } } +extension EKSClientTypes.DeprecationDetail: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientStats + case replacedWith + case startServingReplacementVersion + case stopServingVersion + case usage + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let clientStats = clientStats { + var clientStatsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .clientStats) + for clientstat0 in clientStats { + try clientStatsContainer.encode(clientstat0) + } + } + if let replacedWith = self.replacedWith { + try encodeContainer.encode(replacedWith, forKey: .replacedWith) + } + if let startServingReplacementVersion = self.startServingReplacementVersion { + try encodeContainer.encode(startServingReplacementVersion, forKey: .startServingReplacementVersion) + } + if let stopServingVersion = self.stopServingVersion { + try encodeContainer.encode(stopServingVersion, forKey: .stopServingVersion) + } + if let usage = self.usage { + try encodeContainer.encode(usage, forKey: .usage) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let usageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usage) + usage = usageDecoded + let replacedWithDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replacedWith) + replacedWith = replacedWithDecoded + let stopServingVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stopServingVersion) + stopServingVersion = stopServingVersionDecoded + let startServingReplacementVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .startServingReplacementVersion) + startServingReplacementVersion = startServingReplacementVersionDecoded + let clientStatsContainer = try containerValues.decodeIfPresent([EKSClientTypes.ClientStat?].self, forKey: .clientStats) + var clientStatsDecoded0:[EKSClientTypes.ClientStat]? = nil + if let clientStatsContainer = clientStatsContainer { + clientStatsDecoded0 = [EKSClientTypes.ClientStat]() + for structure0 in clientStatsContainer { + if let structure0 = structure0 { + clientStatsDecoded0?.append(structure0) + } + } + } + clientStats = clientStatsDecoded0 + } +} + +extension EKSClientTypes { + /// The summary information about deprecated resource usage for an insight check in the UPGRADE_READINESS category. + public struct DeprecationDetail: Swift.Equatable { + /// Details about Kubernetes clients using the deprecated resources. + public var clientStats: [EKSClientTypes.ClientStat]? + /// The newer version of the resource to migrate to if applicable. + public var replacedWith: Swift.String? + /// The version of the software where the newer resource version became available to migrate to if applicable. + public var startServingReplacementVersion: Swift.String? + /// The version of the software where the deprecated resource version will stop being served. + public var stopServingVersion: Swift.String? + /// The deprecated version of the resource. + public var usage: Swift.String? + + public init( + clientStats: [EKSClientTypes.ClientStat]? = nil, + replacedWith: Swift.String? = nil, + startServingReplacementVersion: Swift.String? = nil, + stopServingVersion: Swift.String? = nil, + usage: Swift.String? = nil + ) + { + self.clientStats = clientStats + self.replacedWith = replacedWith + self.startServingReplacementVersion = startServingReplacementVersion + self.stopServingVersion = stopServingVersion + self.usage = usage + } + } + +} + extension DeregisterClusterInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let name = name else { @@ -5884,6 +6055,99 @@ enum DescribeIdentityProviderConfigOutputError: ClientRuntime.HttpResponseErrorB } } +extension DescribeInsightInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let clusterName = clusterName else { + return nil + } + guard let id = id else { + return nil + } + return "/clusters/\(clusterName.urlPercentEncoding())/insights/\(id.urlPercentEncoding())" + } +} + +public struct DescribeInsightInput: Swift.Equatable { + /// The name of the cluster to describe the insight for. + /// This member is required. + public var clusterName: Swift.String? + /// The identity of the insight to describe. + /// This member is required. + public var id: Swift.String? + + public init( + clusterName: Swift.String? = nil, + id: Swift.String? = nil + ) + { + self.clusterName = clusterName + self.id = id + } +} + +struct DescribeInsightInputBody: Swift.Equatable { +} + +extension DescribeInsightInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DescribeInsightOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: DescribeInsightOutputBody = try responseDecoder.decode(responseBody: data) + self.insight = output.insight + } else { + self.insight = nil + } + } +} + +public struct DescribeInsightOutput: Swift.Equatable { + /// The full description of the insight. + public var insight: EKSClientTypes.Insight? + + public init( + insight: EKSClientTypes.Insight? = nil + ) + { + self.insight = insight + } +} + +struct DescribeInsightOutputBody: Swift.Equatable { + let insight: EKSClientTypes.Insight? +} + +extension DescribeInsightOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case insight + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let insightDecoded = try containerValues.decodeIfPresent(EKSClientTypes.Insight.self, forKey: .insight) + insight = insightDecoded + } +} + +enum DescribeInsightOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServerException": return try await ServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension DescribeNodegroupInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let clusterName = clusterName else { @@ -7281,62 +7545,612 @@ extension EKSClientTypes { } -extension InvalidParameterException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: InvalidParameterExceptionBody = try responseDecoder.decode(responseBody: data) - self.properties.addonName = output.addonName - self.properties.clusterName = output.clusterName - self.properties.fargateProfileName = output.fargateProfileName - self.properties.message = output.message - self.properties.nodegroupName = output.nodegroupName - self.properties.subscriptionId = output.subscriptionId - } else { - self.properties.addonName = nil - self.properties.clusterName = nil - self.properties.fargateProfileName = nil - self.properties.message = nil - self.properties.nodegroupName = nil - self.properties.subscriptionId = nil +extension EKSClientTypes.Insight: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalInfo + case category + case categorySpecificSummary + case description + case id + case insightStatus + case kubernetesVersion + case lastRefreshTime + case lastTransitionTime + case name + case recommendation + case resources + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let additionalInfo = additionalInfo { + var additionalInfoContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .additionalInfo) + for (dictKey0, additionalInfoMap0) in additionalInfo { + try additionalInfoContainer.encode(additionalInfoMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + if let category = self.category { + try encodeContainer.encode(category.rawValue, forKey: .category) + } + if let categorySpecificSummary = self.categorySpecificSummary { + try encodeContainer.encode(categorySpecificSummary, forKey: .categorySpecificSummary) + } + if let description = self.description { + try encodeContainer.encode(description, forKey: .description) + } + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + if let insightStatus = self.insightStatus { + try encodeContainer.encode(insightStatus, forKey: .insightStatus) + } + if let kubernetesVersion = self.kubernetesVersion { + try encodeContainer.encode(kubernetesVersion, forKey: .kubernetesVersion) + } + if let lastRefreshTime = self.lastRefreshTime { + try encodeContainer.encodeTimestamp(lastRefreshTime, format: .epochSeconds, forKey: .lastRefreshTime) + } + if let lastTransitionTime = self.lastTransitionTime { + try encodeContainer.encodeTimestamp(lastTransitionTime, format: .epochSeconds, forKey: .lastTransitionTime) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + if let recommendation = self.recommendation { + try encodeContainer.encode(recommendation, forKey: .recommendation) + } + if let resources = resources { + var resourcesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .resources) + for insightresourcedetail0 in resources { + try resourcesContainer.encode(insightresourcedetail0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) + id = idDecoded + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let categoryDecoded = try containerValues.decodeIfPresent(EKSClientTypes.Category.self, forKey: .category) + category = categoryDecoded + let kubernetesVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kubernetesVersion) + kubernetesVersion = kubernetesVersionDecoded + let lastRefreshTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastRefreshTime) + lastRefreshTime = lastRefreshTimeDecoded + let lastTransitionTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastTransitionTime) + lastTransitionTime = lastTransitionTimeDecoded + let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) + description = descriptionDecoded + let insightStatusDecoded = try containerValues.decodeIfPresent(EKSClientTypes.InsightStatus.self, forKey: .insightStatus) + insightStatus = insightStatusDecoded + let recommendationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recommendation) + recommendation = recommendationDecoded + let additionalInfoContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .additionalInfo) + var additionalInfoDecoded0: [Swift.String:Swift.String]? = nil + if let additionalInfoContainer = additionalInfoContainer { + additionalInfoDecoded0 = [Swift.String:Swift.String]() + for (key0, string0) in additionalInfoContainer { + if let string0 = string0 { + additionalInfoDecoded0?[key0] = string0 + } + } + } + additionalInfo = additionalInfoDecoded0 + let resourcesContainer = try containerValues.decodeIfPresent([EKSClientTypes.InsightResourceDetail?].self, forKey: .resources) + var resourcesDecoded0:[EKSClientTypes.InsightResourceDetail]? = nil + if let resourcesContainer = resourcesContainer { + resourcesDecoded0 = [EKSClientTypes.InsightResourceDetail]() + for structure0 in resourcesContainer { + if let structure0 = structure0 { + resourcesDecoded0?.append(structure0) + } + } + } + resources = resourcesDecoded0 + let categorySpecificSummaryDecoded = try containerValues.decodeIfPresent(EKSClientTypes.InsightCategorySpecificSummary.self, forKey: .categorySpecificSummary) + categorySpecificSummary = categorySpecificSummaryDecoded } } -/// The specified parameter is invalid. Review the available parameters for the API request. -public struct InvalidParameterException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { +extension EKSClientTypes { + /// A check that provides recommendations to remedy potential upgrade-impacting issues. + public struct Insight: Swift.Equatable { + /// Links to sources that provide additional context on the insight. + public var additionalInfo: [Swift.String:Swift.String]? + /// The category of the insight. + public var category: EKSClientTypes.Category? + /// Summary information that relates to the category of the insight. Currently only returned with certain insights having category UPGRADE_READINESS. + public var categorySpecificSummary: EKSClientTypes.InsightCategorySpecificSummary? + /// The description of the insight which includes alert criteria, remediation recommendation, and additional resources (contains Markdown). + public var description: Swift.String? + /// The ID of the insight. + public var id: Swift.String? + /// An object containing more detail on the status of the insight resource. + public var insightStatus: EKSClientTypes.InsightStatus? + /// The Kubernetes minor version associated with an insight if applicable. + public var kubernetesVersion: Swift.String? + /// The time Amazon EKS last successfully completed a refresh of this insight check on the cluster. + public var lastRefreshTime: ClientRuntime.Date? + /// The time the status of the insight last changed. + public var lastTransitionTime: ClientRuntime.Date? + /// The name of the insight. + public var name: Swift.String? + /// A summary of how to remediate the finding of this insight if applicable. + public var recommendation: Swift.String? + /// The details about each resource listed in the insight check result. + public var resources: [EKSClientTypes.InsightResourceDetail]? - public struct Properties { - /// The specified parameter for the add-on name is invalid. Review the available parameters for the API request - public internal(set) var addonName: Swift.String? = nil - /// The Amazon EKS cluster associated with the exception. - public internal(set) var clusterName: Swift.String? = nil - /// The Fargate profile associated with the exception. - public internal(set) var fargateProfileName: Swift.String? = nil - /// The specified parameter is invalid. Review the available parameters for the API request. - public internal(set) var message: Swift.String? = nil - /// The Amazon EKS managed node group associated with the exception. - public internal(set) var nodegroupName: Swift.String? = nil - /// The Amazon EKS subscription ID with the exception. - public internal(set) var subscriptionId: Swift.String? = nil + public init( + additionalInfo: [Swift.String:Swift.String]? = nil, + category: EKSClientTypes.Category? = nil, + categorySpecificSummary: EKSClientTypes.InsightCategorySpecificSummary? = nil, + description: Swift.String? = nil, + id: Swift.String? = nil, + insightStatus: EKSClientTypes.InsightStatus? = nil, + kubernetesVersion: Swift.String? = nil, + lastRefreshTime: ClientRuntime.Date? = nil, + lastTransitionTime: ClientRuntime.Date? = nil, + name: Swift.String? = nil, + recommendation: Swift.String? = nil, + resources: [EKSClientTypes.InsightResourceDetail]? = nil + ) + { + self.additionalInfo = additionalInfo + self.category = category + self.categorySpecificSummary = categorySpecificSummary + self.description = description + self.id = id + self.insightStatus = insightStatus + self.kubernetesVersion = kubernetesVersion + self.lastRefreshTime = lastRefreshTime + self.lastTransitionTime = lastTransitionTime + self.name = name + self.recommendation = recommendation + self.resources = resources + } } - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "InvalidParameterException" } - public static var fault: ErrorFault { .client } - public static var isRetryable: Swift.Bool { false } - public static var isThrottling: Swift.Bool { false } - public internal(set) var httpResponse = HttpResponse() - public internal(set) var message: Swift.String? - public internal(set) var requestID: Swift.String? +} - public init( - addonName: Swift.String? = nil, - clusterName: Swift.String? = nil, - fargateProfileName: Swift.String? = nil, +extension EKSClientTypes.InsightCategorySpecificSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deprecationDetails + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let deprecationDetails = deprecationDetails { + var deprecationDetailsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .deprecationDetails) + for deprecationdetail0 in deprecationDetails { + try deprecationDetailsContainer.encode(deprecationdetail0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let deprecationDetailsContainer = try containerValues.decodeIfPresent([EKSClientTypes.DeprecationDetail?].self, forKey: .deprecationDetails) + var deprecationDetailsDecoded0:[EKSClientTypes.DeprecationDetail]? = nil + if let deprecationDetailsContainer = deprecationDetailsContainer { + deprecationDetailsDecoded0 = [EKSClientTypes.DeprecationDetail]() + for structure0 in deprecationDetailsContainer { + if let structure0 = structure0 { + deprecationDetailsDecoded0?.append(structure0) + } + } + } + deprecationDetails = deprecationDetailsDecoded0 + } +} + +extension EKSClientTypes { + /// Summary information that relates to the category of the insight. Currently only returned with certain insights having category UPGRADE_READINESS. + public struct InsightCategorySpecificSummary: Swift.Equatable { + /// The summary information about deprecated resource usage for an insight check in the UPGRADE_READINESS category. + public var deprecationDetails: [EKSClientTypes.DeprecationDetail]? + + public init( + deprecationDetails: [EKSClientTypes.DeprecationDetail]? = nil + ) + { + self.deprecationDetails = deprecationDetails + } + } + +} + +extension EKSClientTypes.InsightResourceDetail: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn + case insightStatus + case kubernetesResourceUri + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let arn = self.arn { + try encodeContainer.encode(arn, forKey: .arn) + } + if let insightStatus = self.insightStatus { + try encodeContainer.encode(insightStatus, forKey: .insightStatus) + } + if let kubernetesResourceUri = self.kubernetesResourceUri { + try encodeContainer.encode(kubernetesResourceUri, forKey: .kubernetesResourceUri) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let insightStatusDecoded = try containerValues.decodeIfPresent(EKSClientTypes.InsightStatus.self, forKey: .insightStatus) + insightStatus = insightStatusDecoded + let kubernetesResourceUriDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kubernetesResourceUri) + kubernetesResourceUri = kubernetesResourceUriDecoded + let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) + arn = arnDecoded + } +} + +extension EKSClientTypes { + /// Returns information about the resource being evaluated. + public struct InsightResourceDetail: Swift.Equatable { + /// The Amazon Resource Name (ARN) if applicable. + public var arn: Swift.String? + /// An object containing more detail on the status of the insight resource. + public var insightStatus: EKSClientTypes.InsightStatus? + /// The Kubernetes resource URI if applicable. + public var kubernetesResourceUri: Swift.String? + + public init( + arn: Swift.String? = nil, + insightStatus: EKSClientTypes.InsightStatus? = nil, + kubernetesResourceUri: Swift.String? = nil + ) + { + self.arn = arn + self.insightStatus = insightStatus + self.kubernetesResourceUri = kubernetesResourceUri + } + } + +} + +extension EKSClientTypes.InsightStatus: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case reason + case status + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let reason = self.reason { + try encodeContainer.encode(reason, forKey: .reason) + } + if let status = self.status { + try encodeContainer.encode(status.rawValue, forKey: .status) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let statusDecoded = try containerValues.decodeIfPresent(EKSClientTypes.InsightStatusValue.self, forKey: .status) + status = statusDecoded + let reasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reason) + reason = reasonDecoded + } +} + +extension EKSClientTypes { + /// The status of the insight. + public struct InsightStatus: Swift.Equatable { + /// Explanation on the reasoning for the status of the resource. + public var reason: Swift.String? + /// The status of the resource. + public var status: EKSClientTypes.InsightStatusValue? + + public init( + reason: Swift.String? = nil, + status: EKSClientTypes.InsightStatusValue? = nil + ) + { + self.reason = reason + self.status = status + } + } + +} + +extension EKSClientTypes { + public enum InsightStatusValue: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case error + case passing + case unknown + case warning + case sdkUnknown(Swift.String) + + public static var allCases: [InsightStatusValue] { + return [ + .error, + .passing, + .unknown, + .warning, + .sdkUnknown("") + ] + } + 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 .error: return "ERROR" + case .passing: return "PASSING" + case .unknown: return "UNKNOWN" + case .warning: return "WARNING" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = InsightStatusValue(rawValue: rawValue) ?? InsightStatusValue.sdkUnknown(rawValue) + } + } +} + +extension EKSClientTypes.InsightSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case category + case description + case id + case insightStatus + case kubernetesVersion + case lastRefreshTime + case lastTransitionTime + case name + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let category = self.category { + try encodeContainer.encode(category.rawValue, forKey: .category) + } + if let description = self.description { + try encodeContainer.encode(description, forKey: .description) + } + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + if let insightStatus = self.insightStatus { + try encodeContainer.encode(insightStatus, forKey: .insightStatus) + } + if let kubernetesVersion = self.kubernetesVersion { + try encodeContainer.encode(kubernetesVersion, forKey: .kubernetesVersion) + } + if let lastRefreshTime = self.lastRefreshTime { + try encodeContainer.encodeTimestamp(lastRefreshTime, format: .epochSeconds, forKey: .lastRefreshTime) + } + if let lastTransitionTime = self.lastTransitionTime { + try encodeContainer.encodeTimestamp(lastTransitionTime, format: .epochSeconds, forKey: .lastTransitionTime) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) + id = idDecoded + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let categoryDecoded = try containerValues.decodeIfPresent(EKSClientTypes.Category.self, forKey: .category) + category = categoryDecoded + let kubernetesVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kubernetesVersion) + kubernetesVersion = kubernetesVersionDecoded + let lastRefreshTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastRefreshTime) + lastRefreshTime = lastRefreshTimeDecoded + let lastTransitionTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastTransitionTime) + lastTransitionTime = lastTransitionTimeDecoded + let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) + description = descriptionDecoded + let insightStatusDecoded = try containerValues.decodeIfPresent(EKSClientTypes.InsightStatus.self, forKey: .insightStatus) + insightStatus = insightStatusDecoded + } +} + +extension EKSClientTypes { + /// The summarized description of the insight. + public struct InsightSummary: Swift.Equatable { + /// The category of the insight. + public var category: EKSClientTypes.Category? + /// The description of the insight which includes alert criteria, remediation recommendation, and additional resources (contains Markdown). + public var description: Swift.String? + /// The ID of the insight. + public var id: Swift.String? + /// An object containing more detail on the status of the insight. + public var insightStatus: EKSClientTypes.InsightStatus? + /// The Kubernetes minor version associated with an insight if applicable. + public var kubernetesVersion: Swift.String? + /// The time Amazon EKS last successfully completed a refresh of this insight check on the cluster. + public var lastRefreshTime: ClientRuntime.Date? + /// The time the status of the insight last changed. + public var lastTransitionTime: ClientRuntime.Date? + /// The name of the insight. + public var name: Swift.String? + + public init( + category: EKSClientTypes.Category? = nil, + description: Swift.String? = nil, + id: Swift.String? = nil, + insightStatus: EKSClientTypes.InsightStatus? = nil, + kubernetesVersion: Swift.String? = nil, + lastRefreshTime: ClientRuntime.Date? = nil, + lastTransitionTime: ClientRuntime.Date? = nil, + name: Swift.String? = nil + ) + { + self.category = category + self.description = description + self.id = id + self.insightStatus = insightStatus + self.kubernetesVersion = kubernetesVersion + self.lastRefreshTime = lastRefreshTime + self.lastTransitionTime = lastTransitionTime + self.name = name + } + } + +} + +extension EKSClientTypes.InsightsFilter: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case categories + case kubernetesVersions + case statuses + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let categories = categories { + var categoriesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .categories) + for category0 in categories { + try categoriesContainer.encode(category0.rawValue) + } + } + if let kubernetesVersions = kubernetesVersions { + var kubernetesVersionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .kubernetesVersions) + for string0 in kubernetesVersions { + try kubernetesVersionsContainer.encode(string0) + } + } + if let statuses = statuses { + var statusesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .statuses) + for insightstatusvalue0 in statuses { + try statusesContainer.encode(insightstatusvalue0.rawValue) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let categoriesContainer = try containerValues.decodeIfPresent([EKSClientTypes.Category?].self, forKey: .categories) + var categoriesDecoded0:[EKSClientTypes.Category]? = nil + if let categoriesContainer = categoriesContainer { + categoriesDecoded0 = [EKSClientTypes.Category]() + for enum0 in categoriesContainer { + if let enum0 = enum0 { + categoriesDecoded0?.append(enum0) + } + } + } + categories = categoriesDecoded0 + let kubernetesVersionsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .kubernetesVersions) + var kubernetesVersionsDecoded0:[Swift.String]? = nil + if let kubernetesVersionsContainer = kubernetesVersionsContainer { + kubernetesVersionsDecoded0 = [Swift.String]() + for string0 in kubernetesVersionsContainer { + if let string0 = string0 { + kubernetesVersionsDecoded0?.append(string0) + } + } + } + kubernetesVersions = kubernetesVersionsDecoded0 + let statusesContainer = try containerValues.decodeIfPresent([EKSClientTypes.InsightStatusValue?].self, forKey: .statuses) + var statusesDecoded0:[EKSClientTypes.InsightStatusValue]? = nil + if let statusesContainer = statusesContainer { + statusesDecoded0 = [EKSClientTypes.InsightStatusValue]() + for enum0 in statusesContainer { + if let enum0 = enum0 { + statusesDecoded0?.append(enum0) + } + } + } + statuses = statusesDecoded0 + } +} + +extension EKSClientTypes { + /// The criteria to use for the insights. + public struct InsightsFilter: Swift.Equatable { + /// The categories to use to filter insights. + public var categories: [EKSClientTypes.Category]? + /// The Kubernetes versions to use to filter the insights. + public var kubernetesVersions: [Swift.String]? + /// The statuses to use to filter the insights. + public var statuses: [EKSClientTypes.InsightStatusValue]? + + public init( + categories: [EKSClientTypes.Category]? = nil, + kubernetesVersions: [Swift.String]? = nil, + statuses: [EKSClientTypes.InsightStatusValue]? = nil + ) + { + self.categories = categories + self.kubernetesVersions = kubernetesVersions + self.statuses = statuses + } + } + +} + +extension InvalidParameterException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidParameterExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.addonName = output.addonName + self.properties.clusterName = output.clusterName + self.properties.fargateProfileName = output.fargateProfileName + self.properties.message = output.message + self.properties.nodegroupName = output.nodegroupName + self.properties.subscriptionId = output.subscriptionId + } else { + self.properties.addonName = nil + self.properties.clusterName = nil + self.properties.fargateProfileName = nil + self.properties.message = nil + self.properties.nodegroupName = nil + self.properties.subscriptionId = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The specified parameter is invalid. Review the available parameters for the API request. +public struct InvalidParameterException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// The specified parameter for the add-on name is invalid. Review the available parameters for the API request + public internal(set) var addonName: Swift.String? = nil + /// The Amazon EKS cluster associated with the exception. + public internal(set) var clusterName: Swift.String? = nil + /// The Fargate profile associated with the exception. + public internal(set) var fargateProfileName: Swift.String? = nil + /// The specified parameter is invalid. Review the available parameters for the API request. + public internal(set) var message: Swift.String? = nil + /// The Amazon EKS managed node group associated with the exception. + public internal(set) var nodegroupName: Swift.String? = nil + /// The Amazon EKS subscription ID with the exception. + public internal(set) var subscriptionId: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidParameterException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + addonName: Swift.String? = nil, + clusterName: Swift.String? = nil, + fargateProfileName: Swift.String? = nil, message: Swift.String? = nil, nodegroupName: Swift.String? = nil, subscriptionId: Swift.String? = nil @@ -8781,7 +9595,7 @@ extension ListIdentityProviderConfigsOutput: ClientRuntime.HttpResponseBinding { public struct ListIdentityProviderConfigsOutput: Swift.Equatable { /// The identity provider configurations for the cluster. public var identityProviderConfigs: [EKSClientTypes.IdentityProviderConfig]? - /// The nextToken value to include in a future ListIdentityProviderConfigsResponse request. When the results of a ListIdentityProviderConfigsResponse request exceed maxResults, you can use this value to retrieve the next page of results. This value is null when there are no more results to return. + /// The nextToken value to include in a future ListIdentityProviderConfigsResponse request. When the results of a ListIdentityProviderConfigsResponse request exceed maxResults, you can use this value to retrieve the next page of results. This value is null when there are no more results to return. This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes. public var nextToken: Swift.String? public init( @@ -8838,6 +9652,158 @@ enum ListIdentityProviderConfigsOutputError: ClientRuntime.HttpResponseErrorBind } } +extension ListInsightsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filter + case maxResults + case nextToken + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let filter = self.filter { + try encodeContainer.encode(filter, forKey: .filter) + } + if let maxResults = self.maxResults { + try encodeContainer.encode(maxResults, forKey: .maxResults) + } + if let nextToken = self.nextToken { + try encodeContainer.encode(nextToken, forKey: .nextToken) + } + } +} + +extension ListInsightsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let clusterName = clusterName else { + return nil + } + return "/clusters/\(clusterName.urlPercentEncoding())/insights" + } +} + +public struct ListInsightsInput: Swift.Equatable { + /// The name of the Amazon EKS cluster associated with the insights. + /// This member is required. + public var clusterName: Swift.String? + /// The criteria to filter your list of insights for your cluster. You can filter which insights are returned by category, associated Kubernetes version, and status. + public var filter: EKSClientTypes.InsightsFilter? + /// The maximum number of identity provider configurations returned by ListInsights in paginated output. When you use this parameter, ListInsights returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListInsights request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListInsights returns up to 100 results and a nextToken value, if applicable. + public var maxResults: Swift.Int? + /// The nextToken value returned from a previous paginated ListInsights request. When the results of a ListInsights request exceed maxResults, you can use this value to retrieve the next page of results. This value is null when there are no more results to return. + public var nextToken: Swift.String? + + public init( + clusterName: Swift.String? = nil, + filter: EKSClientTypes.InsightsFilter? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil + ) + { + self.clusterName = clusterName + self.filter = filter + self.maxResults = maxResults + self.nextToken = nextToken + } +} + +struct ListInsightsInputBody: Swift.Equatable { + let filter: EKSClientTypes.InsightsFilter? + let maxResults: Swift.Int? + let nextToken: Swift.String? +} + +extension ListInsightsInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filter + case maxResults + case nextToken + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let filterDecoded = try containerValues.decodeIfPresent(EKSClientTypes.InsightsFilter.self, forKey: .filter) + filter = filterDecoded + let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) + maxResults = maxResultsDecoded + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + } +} + +extension ListInsightsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ListInsightsOutputBody = try responseDecoder.decode(responseBody: data) + self.insights = output.insights + self.nextToken = output.nextToken + } else { + self.insights = nil + self.nextToken = nil + } + } +} + +public struct ListInsightsOutput: Swift.Equatable { + /// The returned list of insights. + public var insights: [EKSClientTypes.InsightSummary]? + /// The nextToken value to include in a future ListInsights request. When the results of a ListInsights request exceed maxResults, you can use this value to retrieve the next page of results. This value is null when there are no more results to return. + public var nextToken: Swift.String? + + public init( + insights: [EKSClientTypes.InsightSummary]? = nil, + nextToken: Swift.String? = nil + ) + { + self.insights = insights + self.nextToken = nextToken + } +} + +struct ListInsightsOutputBody: Swift.Equatable { + let insights: [EKSClientTypes.InsightSummary]? + let nextToken: Swift.String? +} + +extension ListInsightsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case insights + case nextToken + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let insightsContainer = try containerValues.decodeIfPresent([EKSClientTypes.InsightSummary?].self, forKey: .insights) + var insightsDecoded0:[EKSClientTypes.InsightSummary]? = nil + if let insightsContainer = insightsContainer { + insightsDecoded0 = [EKSClientTypes.InsightSummary]() + for structure0 in insightsContainer { + if let structure0 = structure0 { + insightsDecoded0?.append(structure0) + } + } + } + insights = insightsDecoded0 + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + } +} + +enum ListInsightsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidParameterException": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServerException": return try await ServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension ListNodegroupsInput: ClientRuntime.QueryItemProvider { public var queryItems: [ClientRuntime.URLQueryItem] { get throws { diff --git a/Sources/Services/AWSEMR/EMRClient.swift b/Sources/Services/AWSEMR/EMRClient.swift index 527ed815969..59216b47e8d 100644 --- a/Sources/Services/AWSEMR/EMRClient.swift +++ b/Sources/Services/AWSEMR/EMRClient.swift @@ -2278,6 +2278,53 @@ extension EMRClient: EMRClientProtocol { return result } + /// Performs the `SetKeepJobFlowAliveWhenNoSteps` operation on the `ElasticMapReduce` service. + /// + /// You can use the SetKeepJobFlowAliveWhenNoSteps to configure a cluster (job flow) to terminate after the step execution, i.e., all your steps are executed. If you want a transient cluster that shuts down after the last of the current executing steps are completed, you can configure SetKeepJobFlowAliveWhenNoSteps to false. If you want a long running cluster, configure SetKeepJobFlowAliveWhenNoSteps to true. For more information, see [Managing Cluster Termination](https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html) in the Amazon EMR Management Guide. + /// + /// - Parameter SetKeepJobFlowAliveWhenNoStepsInput : [no documentation found] + /// + /// - Returns: `SetKeepJobFlowAliveWhenNoStepsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerError` : Indicates that an error occurred while processing the request and that the request was not completed. + public func setKeepJobFlowAliveWhenNoSteps(input: SetKeepJobFlowAliveWhenNoStepsInput) async throws -> SetKeepJobFlowAliveWhenNoStepsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "setKeepJobFlowAliveWhenNoSteps") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "elasticmapreduce") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "setKeepJobFlowAliveWhenNoSteps") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "ElasticMapReduce.SetKeepJobFlowAliveWhenNoSteps")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.1")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetKeepJobFlowAliveWhenNoStepsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `SetTerminationProtection` operation on the `ElasticMapReduce` service. /// /// SetTerminationProtection locks a cluster (job flow) so the Amazon EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all Amazon EC2 instances in a cluster. SetTerminationProtection is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage. To terminate a cluster that has been locked by setting SetTerminationProtection to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to false. For more information, see[Managing Cluster Termination](https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html) in the Amazon EMR Management Guide. diff --git a/Sources/Services/AWSEMR/EMRClientProtocol.swift b/Sources/Services/AWSEMR/EMRClientProtocol.swift index 2236f7254b4..10bb218ad3c 100644 --- a/Sources/Services/AWSEMR/EMRClientProtocol.swift +++ b/Sources/Services/AWSEMR/EMRClientProtocol.swift @@ -617,6 +617,19 @@ public protocol EMRClientProtocol { /// __Possible Exceptions:__ /// - `InternalServerError` : Indicates that an error occurred while processing the request and that the request was not completed. func runJobFlow(input: RunJobFlowInput) async throws -> RunJobFlowOutput + /// Performs the `SetKeepJobFlowAliveWhenNoSteps` operation on the `ElasticMapReduce` service. + /// + /// You can use the SetKeepJobFlowAliveWhenNoSteps to configure a cluster (job flow) to terminate after the step execution, i.e., all your steps are executed. If you want a transient cluster that shuts down after the last of the current executing steps are completed, you can configure SetKeepJobFlowAliveWhenNoSteps to false. If you want a long running cluster, configure SetKeepJobFlowAliveWhenNoSteps to true. For more information, see [Managing Cluster Termination](https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html) in the Amazon EMR Management Guide. + /// + /// - Parameter SetKeepJobFlowAliveWhenNoStepsInput : [no documentation found] + /// + /// - Returns: `SetKeepJobFlowAliveWhenNoStepsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerError` : Indicates that an error occurred while processing the request and that the request was not completed. + func setKeepJobFlowAliveWhenNoSteps(input: SetKeepJobFlowAliveWhenNoStepsInput) async throws -> SetKeepJobFlowAliveWhenNoStepsOutput /// Performs the `SetTerminationProtection` operation on the `ElasticMapReduce` service. /// /// SetTerminationProtection locks a cluster (job flow) so the Amazon EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all Amazon EC2 instances in a cluster. SetTerminationProtection is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage. To terminate a cluster that has been locked by setting SetTerminationProtection to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to false. For more information, see[Managing Cluster Termination](https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html) in the Amazon EMR Management Guide. diff --git a/Sources/Services/AWSEMR/models/Models.swift b/Sources/Services/AWSEMR/models/Models.swift index 8162647df19..446fb70c3dd 100644 --- a/Sources/Services/AWSEMR/models/Models.swift +++ b/Sources/Services/AWSEMR/models/Models.swift @@ -14540,6 +14540,100 @@ extension EMRClientTypes { } +extension SetKeepJobFlowAliveWhenNoStepsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case jobFlowIds = "JobFlowIds" + case keepJobFlowAliveWhenNoSteps = "KeepJobFlowAliveWhenNoSteps" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let jobFlowIds = jobFlowIds { + var jobFlowIdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .jobFlowIds) + for xmlstring0 in jobFlowIds { + try jobFlowIdsContainer.encode(xmlstring0) + } + } + if let keepJobFlowAliveWhenNoSteps = self.keepJobFlowAliveWhenNoSteps { + try encodeContainer.encode(keepJobFlowAliveWhenNoSteps, forKey: .keepJobFlowAliveWhenNoSteps) + } + } +} + +extension SetKeepJobFlowAliveWhenNoStepsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct SetKeepJobFlowAliveWhenNoStepsInput: Swift.Equatable { + /// A list of strings that uniquely identify the clusters to protect. This identifier is returned by [RunJobFlow](https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html) and can also be obtained from [DescribeJobFlows](https://docs.aws.amazon.com/emr/latest/APIReference/API_DescribeJobFlows.html). + /// This member is required. + public var jobFlowIds: [Swift.String]? + /// A Boolean that indicates whether to terminate the cluster after all steps are executed. + /// This member is required. + public var keepJobFlowAliveWhenNoSteps: Swift.Bool? + + public init( + jobFlowIds: [Swift.String]? = nil, + keepJobFlowAliveWhenNoSteps: Swift.Bool? = nil + ) + { + self.jobFlowIds = jobFlowIds + self.keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoSteps + } +} + +struct SetKeepJobFlowAliveWhenNoStepsInputBody: Swift.Equatable { + let jobFlowIds: [Swift.String]? + let keepJobFlowAliveWhenNoSteps: Swift.Bool? +} + +extension SetKeepJobFlowAliveWhenNoStepsInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case jobFlowIds = "JobFlowIds" + case keepJobFlowAliveWhenNoSteps = "KeepJobFlowAliveWhenNoSteps" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let jobFlowIdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .jobFlowIds) + var jobFlowIdsDecoded0:[Swift.String]? = nil + if let jobFlowIdsContainer = jobFlowIdsContainer { + jobFlowIdsDecoded0 = [Swift.String]() + for string0 in jobFlowIdsContainer { + if let string0 = string0 { + jobFlowIdsDecoded0?.append(string0) + } + } + } + jobFlowIds = jobFlowIdsDecoded0 + let keepJobFlowAliveWhenNoStepsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .keepJobFlowAliveWhenNoSteps) + keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoStepsDecoded + } +} + +extension SetKeepJobFlowAliveWhenNoStepsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct SetKeepJobFlowAliveWhenNoStepsOutput: Swift.Equatable { + + public init() { } +} + +enum SetKeepJobFlowAliveWhenNoStepsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InternalFailure": return try await InternalServerError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension SetTerminationProtectionInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case jobFlowIds = "JobFlowIds" diff --git a/Sources/Services/AWSElasticsearchService/EndpointResolver.swift b/Sources/Services/AWSElasticsearchService/EndpointResolver.swift index dd474477109..f6831983920 100644 --- a/Sources/Services/AWSElasticsearchService/EndpointResolver.swift +++ b/Sources/Services/AWSElasticsearchService/EndpointResolver.swift @@ -34,7 +34,7 @@ public protocol EndpointResolver { public struct DefaultEndpointResolver: EndpointResolver { private let engine: AWSClientRuntime.AWSEndpointsRuleEngine - private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://es-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://es.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://es.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}]}" + private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://es-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://aos.{Region}.api.aws\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws-cn\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://aos.{Region}.api.amazonwebservices.com.cn\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws-us-gov\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://aos.{Region}.api.aws\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://es.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://es.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}]}" public init() throws { engine = try AWSClientRuntime.AWSEndpointsRuleEngine(ruleSet: ruleSet) diff --git a/Sources/Services/AWSElasticsearchService/models/Models.swift b/Sources/Services/AWSElasticsearchService/models/Models.swift index 4154e1bd53e..6c2d1a592a2 100644 --- a/Sources/Services/AWSElasticsearchService/models/Models.swift +++ b/Sources/Services/AWSElasticsearchService/models/Models.swift @@ -5267,9 +5267,11 @@ extension ElasticsearchClientTypes { /// /// It can be one of the following values: /// - /// * Policy-Min-TLS-1-0-2019-07: TLS security policy which supports TLSv1.0 and higher. + /// * Policy-Min-TLS-1-0-2019-07: TLS security policy that supports TLS version 1.0 to TLS version 1.2 /// - /// * Policy-Min-TLS-1-2-2019-07: TLS security policy which supports only TLSv1.2 + /// * Policy-Min-TLS-1-2-2019-07: TLS security policy that supports only TLS version 1.2 + /// + /// * Policy-Min-TLS-1-2-PFS-2023-10: TLS security policy that supports TLS version 1.2 to TLS version 1.3 with perfect forward secrecy cipher suites public var tlsSecurityPolicy: ElasticsearchClientTypes.TLSSecurityPolicy? public init( @@ -11822,12 +11824,14 @@ extension ElasticsearchClientTypes { public enum TLSSecurityPolicy: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case policyMinTls10201907 case policyMinTls12201907 + case policyMinTls12Pfs202310 case sdkUnknown(Swift.String) public static var allCases: [TLSSecurityPolicy] { return [ .policyMinTls10201907, .policyMinTls12201907, + .policyMinTls12Pfs202310, .sdkUnknown("") ] } @@ -11839,6 +11843,7 @@ extension ElasticsearchClientTypes { switch self { case .policyMinTls10201907: return "Policy-Min-TLS-1-0-2019-07" case .policyMinTls12201907: return "Policy-Min-TLS-1-2-2019-07" + case .policyMinTls12Pfs202310: return "Policy-Min-TLS-1-2-PFS-2023-10" case let .sdkUnknown(s): return s } } diff --git a/Sources/Services/AWSEventBridge/models/Models.swift b/Sources/Services/AWSEventBridge/models/Models.swift index b503291957d..e424ebd21c9 100644 --- a/Sources/Services/AWSEventBridge/models/Models.swift +++ b/Sources/Services/AWSEventBridge/models/Models.swift @@ -269,6 +269,46 @@ extension EventBridgeClientTypes { } } +extension EventBridgeClientTypes.AppSyncParameters: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case graphQLOperation = "GraphQLOperation" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let graphQLOperation = self.graphQLOperation { + try encodeContainer.encode(graphQLOperation, forKey: .graphQLOperation) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let graphQLOperationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .graphQLOperation) + graphQLOperation = graphQLOperationDecoded + } +} + +extension EventBridgeClientTypes.AppSyncParameters: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "AppSyncParameters(graphQLOperation: \"CONTENT_REDACTED\")"} +} + +extension EventBridgeClientTypes { + /// Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API. + public struct AppSyncParameters: Swift.Equatable { + /// The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service. For more information, see [Operations](https://docs.aws.amazon.com/appsync/latest/devguide/graphql-architecture.html#graphql-operations) in the AppSync User Guide. + public var graphQLOperation: Swift.String? + + public init( + graphQLOperation: Swift.String? = nil + ) + { + self.graphQLOperation = graphQLOperation + } + } + +} + extension EventBridgeClientTypes.Archive: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case archiveName = "ArchiveName" @@ -10142,13 +10182,7 @@ public struct PutRuleInput: Swift.Equatable { public var roleArn: Swift.String? /// The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)". public var scheduleExpression: Swift.String? - /// The state of the rule. Valid values include: - /// - /// * DISABLED: The rule is disabled. EventBridge does not match any events against the rule. - /// - /// * ENABLED: The rule is enabled. EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail. - /// - /// * ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail. Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see [Logging management events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events) in the CloudTrail User Guide, and [Filtering management events from Amazon Web Services services](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail) in the Amazon EventBridge User Guide. This value is only valid for rules on the [default](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses) event bus or [custom event buses](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html). It does not apply to [partner event buses](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html). + /// Indicates whether the rule is enabled or disabled. public var state: EventBridgeClientTypes.RuleState? /// The list of key-value pairs to associate with the rule. public var tags: [EventBridgeClientTypes.Tag]? @@ -11492,13 +11526,7 @@ extension EventBridgeClientTypes { public var roleArn: Swift.String? /// The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see [Creating an Amazon EventBridge rule that runs on a schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html). public var scheduleExpression: Swift.String? - /// The state of the rule. Valid values include: - /// - /// * DISABLED: The rule is disabled. EventBridge does not match any events against the rule. - /// - /// * ENABLED: The rule is enabled. EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail. - /// - /// * ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail. Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see [Logging management events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events) in the CloudTrail User Guide, and [Filtering management events from Amazon Web Services services](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail) in the Amazon EventBridge User Guide. This value is only valid for rules on the [default](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses) event bus or [custom event buses](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html). It does not apply to [partner event buses](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html). + /// The state of the rule. public var state: EventBridgeClientTypes.RuleState? public init( @@ -12177,6 +12205,7 @@ enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { extension EventBridgeClientTypes.Target: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case appSyncParameters = "AppSyncParameters" case arn = "Arn" case batchParameters = "BatchParameters" case deadLetterConfig = "DeadLetterConfig" @@ -12197,6 +12226,9 @@ extension EventBridgeClientTypes.Target: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let appSyncParameters = self.appSyncParameters { + try encodeContainer.encode(appSyncParameters, forKey: .appSyncParameters) + } if let arn = self.arn { try encodeContainer.encode(arn, forKey: .arn) } @@ -12281,12 +12313,16 @@ extension EventBridgeClientTypes.Target: Swift.Codable { deadLetterConfig = deadLetterConfigDecoded let retryPolicyDecoded = try containerValues.decodeIfPresent(EventBridgeClientTypes.RetryPolicy.self, forKey: .retryPolicy) retryPolicy = retryPolicyDecoded + let appSyncParametersDecoded = try containerValues.decodeIfPresent(EventBridgeClientTypes.AppSyncParameters.self, forKey: .appSyncParameters) + appSyncParameters = appSyncParametersDecoded } } extension EventBridgeClientTypes { /// Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see [PutTargets](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html). If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a RoleArn with proper permissions in the Target structure. For more information, see [Sending and Receiving Events Between Amazon Web Services Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the Amazon EventBridge User Guide. public struct Target: Swift.Equatable { + /// Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API. + public var appSyncParameters: EventBridgeClientTypes.AppSyncParameters? /// The Amazon Resource Name (ARN) of the target. /// This member is required. public var arn: Swift.String? @@ -12323,6 +12359,7 @@ extension EventBridgeClientTypes { public var sqsParameters: EventBridgeClientTypes.SqsParameters? public init( + appSyncParameters: EventBridgeClientTypes.AppSyncParameters? = nil, arn: Swift.String? = nil, batchParameters: EventBridgeClientTypes.BatchParameters? = nil, deadLetterConfig: EventBridgeClientTypes.DeadLetterConfig? = nil, @@ -12341,6 +12378,7 @@ extension EventBridgeClientTypes { sqsParameters: EventBridgeClientTypes.SqsParameters? = nil ) { + self.appSyncParameters = appSyncParameters self.arn = arn self.batchParameters = batchParameters self.deadLetterConfig = deadLetterConfig diff --git a/Sources/Services/AWSFis/FisClient.swift b/Sources/Services/AWSFis/FisClient.swift index d4e6e0c7250..6909bc61e61 100644 --- a/Sources/Services/AWSFis/FisClient.swift +++ b/Sources/Services/AWSFis/FisClient.swift @@ -78,7 +78,7 @@ extension FisClient: FisClientProtocol { /// * Stop conditions: If a stop condition is triggered while an experiment is running, the experiment is automatically stopped. You can define a stop condition as a CloudWatch alarm. /// /// - /// For more information, see [experiment templates](https://docs.aws.amazon.com/fis/latest/userguide/experiment-templates.html) in the Fault Injection Simulator User Guide. + /// For more information, see [experiment templates](https://docs.aws.amazon.com/fis/latest/userguide/experiment-templates.html) in the Fault Injection Service User Guide. /// /// - Parameter CreateExperimentTemplateInput : [no documentation found] /// @@ -128,7 +128,7 @@ extension FisClient: FisClientProtocol { /// Performs the `CreateTargetAccountConfiguration` operation on the `FaultInjectionSimulator` service. /// - /// Creates a target account configuration for the experiment template. A target account configuration is required when accountTargeting of experimentOptions is set to multi-account. For more information, see [experiment options](https://docs.aws.amazon.com/fis/latest/userguide/experiment-options.html) in the Fault Injection Simulator User Guide. + /// Creates a target account configuration for the experiment template. A target account configuration is required when accountTargeting of experimentOptions is set to multi-account. For more information, see [experiment options](https://docs.aws.amazon.com/fis/latest/userguide/experiment-options.html) in the Fault Injection Service User Guide. /// /// - Parameter CreateTargetAccountConfigurationInput : [no documentation found] /// diff --git a/Sources/Services/AWSFis/FisClientProtocol.swift b/Sources/Services/AWSFis/FisClientProtocol.swift index 6dd139eefd7..dc47a33caa8 100644 --- a/Sources/Services/AWSFis/FisClientProtocol.swift +++ b/Sources/Services/AWSFis/FisClientProtocol.swift @@ -2,7 +2,7 @@ import ClientRuntime -/// Fault Injection Simulator is a managed service that enables you to perform fault injection experiments on your Amazon Web Services workloads. For more information, see the [Fault Injection Simulator User Guide](https://docs.aws.amazon.com/fis/latest/userguide/). +/// Fault Injection Service is a managed service that enables you to perform fault injection experiments on your Amazon Web Services workloads. For more information, see the [Fault Injection Service User Guide](https://docs.aws.amazon.com/fis/latest/userguide/). public protocol FisClientProtocol { /// Performs the `CreateExperimentTemplate` operation on the `FaultInjectionSimulator` service. /// @@ -15,7 +15,7 @@ public protocol FisClientProtocol { /// * Stop conditions: If a stop condition is triggered while an experiment is running, the experiment is automatically stopped. You can define a stop condition as a CloudWatch alarm. /// /// - /// For more information, see [experiment templates](https://docs.aws.amazon.com/fis/latest/userguide/experiment-templates.html) in the Fault Injection Simulator User Guide. + /// For more information, see [experiment templates](https://docs.aws.amazon.com/fis/latest/userguide/experiment-templates.html) in the Fault Injection Service User Guide. /// /// - Parameter CreateExperimentTemplateInput : [no documentation found] /// @@ -31,7 +31,7 @@ public protocol FisClientProtocol { func createExperimentTemplate(input: CreateExperimentTemplateInput) async throws -> CreateExperimentTemplateOutput /// Performs the `CreateTargetAccountConfiguration` operation on the `FaultInjectionSimulator` service. /// - /// Creates a target account configuration for the experiment template. A target account configuration is required when accountTargeting of experimentOptions is set to multi-account. For more information, see [experiment options](https://docs.aws.amazon.com/fis/latest/userguide/experiment-options.html) in the Fault Injection Simulator User Guide. + /// Creates a target account configuration for the experiment template. A target account configuration is required when accountTargeting of experimentOptions is set to multi-account. For more information, see [experiment options](https://docs.aws.amazon.com/fis/latest/userguide/experiment-options.html) in the Fault Injection Service User Guide. /// /// - Parameter CreateTargetAccountConfigurationInput : [no documentation found] /// diff --git a/Sources/Services/AWSFis/models/Models.swift b/Sources/Services/AWSFis/models/Models.swift index aa917232061..dacb21c0fe0 100644 --- a/Sources/Services/AWSFis/models/Models.swift +++ b/Sources/Services/AWSFis/models/Models.swift @@ -114,7 +114,7 @@ extension FisClientTypes.Action: Swift.Codable { } extension FisClientTypes { - /// Describes an action. For more information, see [FIS actions](https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html) in the Fault Injection Simulator User Guide. + /// Describes an action. For more information, see [FIS actions](https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html) in the Fault Injection Service User Guide. public struct Action: Swift.Equatable { /// The description for the action. public var description: Swift.String? @@ -449,7 +449,7 @@ extension FisClientTypes.CreateExperimentTemplateActionInput: Swift.Codable { } extension FisClientTypes { - /// Specifies an action for an experiment template. For more information, see [Actions](https://docs.aws.amazon.com/fis/latest/userguide/actions.html) in the Fault Injection Simulator User Guide. + /// Specifies an action for an experiment template. For more information, see [Actions](https://docs.aws.amazon.com/fis/latest/userguide/actions.html) in the Fault Injection Service User Guide. public struct CreateExperimentTemplateActionInput: Swift.Equatable { /// The ID of the action. The format of the action ID is: aws:service-name:action-type. /// This member is required. @@ -976,7 +976,7 @@ extension FisClientTypes.CreateExperimentTemplateTargetInput: Swift.Codable { } extension FisClientTypes { - /// Specifies a target for an experiment. You must specify at least one Amazon Resource Name (ARN) or at least one resource tag. You cannot specify both ARNs and tags. For more information, see [Targets](https://docs.aws.amazon.com/fis/latest/userguide/targets.html) in the Fault Injection Simulator User Guide. + /// Specifies a target for an experiment. You must specify at least one Amazon Resource Name (ARN) or at least one resource tag. You cannot specify both ARNs and tags. For more information, see [Targets](https://docs.aws.amazon.com/fis/latest/userguide/targets.html) in the Fault Injection Service User Guide. public struct CreateExperimentTemplateTargetInput: Swift.Equatable { /// The filters to apply to identify target resources using specific attributes. public var filters: [FisClientTypes.ExperimentTemplateTargetInputFilter]? @@ -3449,7 +3449,7 @@ extension FisClientTypes.ExperimentTemplateTargetInputFilter: Swift.Codable { } extension FisClientTypes { - /// Specifies a filter used for the target resource input in an experiment template. For more information, see [Resource filters](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters) in the Fault Injection Simulator User Guide. + /// Specifies a filter used for the target resource input in an experiment template. For more information, see [Resource filters](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters) in the Fault Injection Service User Guide. public struct ExperimentTemplateTargetInputFilter: Swift.Equatable { /// The attribute path for the filter. /// This member is required. diff --git a/Sources/Services/AWSGlue/GlueClient.swift b/Sources/Services/AWSGlue/GlueClient.swift index b523ba1be90..8b162c55b21 100644 --- a/Sources/Services/AWSGlue/GlueClient.swift +++ b/Sources/Services/AWSGlue/GlueClient.swift @@ -627,7 +627,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -1266,7 +1266,7 @@ extension GlueClient: GlueClientProtocol { /// Performs the `CreateConnection` operation on the `AWSGlue` service. /// - /// Creates a connection definition in the Data Catalog. + /// Creates a connection definition in the Data Catalog. Connections used for creating federated resources require the IAM glue:PassConnection permission. /// /// - Parameter CreateConnectionInput : [no documentation found] /// @@ -5421,7 +5421,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -5525,7 +5525,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -6182,7 +6182,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -6388,7 +6388,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -6591,7 +6591,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -6645,7 +6645,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -6699,7 +6699,7 @@ extension GlueClient: GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. diff --git a/Sources/Services/AWSGlue/GlueClientProtocol.swift b/Sources/Services/AWSGlue/GlueClientProtocol.swift index 1c4db4e285b..a7399e502a1 100644 --- a/Sources/Services/AWSGlue/GlueClientProtocol.swift +++ b/Sources/Services/AWSGlue/GlueClientProtocol.swift @@ -190,7 +190,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -387,7 +387,7 @@ public protocol GlueClientProtocol { func createClassifier(input: CreateClassifierInput) async throws -> CreateClassifierOutput /// Performs the `CreateConnection` operation on the `AWSGlue` service. /// - /// Creates a connection definition in the Data Catalog. + /// Creates a connection definition in the Data Catalog. Connections used for creating federated resources require the IAM glue:PassConnection permission. /// /// - Parameter CreateConnectionInput : [no documentation found] /// @@ -1754,7 +1754,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -1790,7 +1790,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -2005,7 +2005,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -2041,7 +2041,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -2142,7 +2142,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -2162,7 +2162,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. @@ -2182,7 +2182,7 @@ public protocol GlueClientProtocol { /// __Possible Exceptions:__ /// - `EntityNotFoundException` : A specified entity does not exist /// - `FederationSourceException` : A federation source failed. - /// - `FederationSourceRetryableException` : [no documentation found] + /// - `FederationSourceRetryableException` : A federation source failed, but the operation may be retried. /// - `GlueEncryptionException` : An encryption operation failed. /// - `InternalServiceException` : An internal service error occurred. /// - `InvalidInputException` : The input provided was not valid. diff --git a/Sources/Services/AWSGlue/Paginators.swift b/Sources/Services/AWSGlue/Paginators.swift index f90f8c74578..33f75c1fec0 100644 --- a/Sources/Services/AWSGlue/Paginators.swift +++ b/Sources/Services/AWSGlue/Paginators.swift @@ -485,6 +485,8 @@ extension GetUnfilteredPartitionsMetadataInput: ClientRuntime.PaginateToken { expression: self.expression, maxResults: self.maxResults, nextToken: token, + querySessionContext: self.querySessionContext, + region: self.region, segment: self.segment, supportedPermissionTypes: self.supportedPermissionTypes, tableName: self.tableName diff --git a/Sources/Services/AWSGlue/models/Models.swift b/Sources/Services/AWSGlue/models/Models.swift index a53520a2889..9612ff51680 100644 --- a/Sources/Services/AWSGlue/models/Models.swift +++ b/Sources/Services/AWSGlue/models/Models.swift @@ -23128,9 +23128,11 @@ extension FederationSourceRetryableException { } } +/// A federation source failed, but the operation may be retried. public struct FederationSourceRetryableException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// A message describing the problem. public internal(set) var message: Swift.String? = nil } @@ -32939,6 +32941,8 @@ extension GetUnfilteredPartitionMetadataInput: Swift.Encodable { case catalogId = "CatalogId" case databaseName = "DatabaseName" case partitionValues = "PartitionValues" + case querySessionContext = "QuerySessionContext" + case region = "Region" case supportedPermissionTypes = "SupportedPermissionTypes" case tableName = "TableName" } @@ -32960,6 +32964,12 @@ extension GetUnfilteredPartitionMetadataInput: Swift.Encodable { try partitionValuesContainer.encode(valuestring0) } } + if let querySessionContext = self.querySessionContext { + try encodeContainer.encode(querySessionContext, forKey: .querySessionContext) + } + if let region = self.region { + try encodeContainer.encode(region, forKey: .region) + } if let supportedPermissionTypes = supportedPermissionTypes { var supportedPermissionTypesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .supportedPermissionTypes) for permissiontype0 in supportedPermissionTypes { @@ -32990,6 +33000,10 @@ public struct GetUnfilteredPartitionMetadataInput: Swift.Equatable { /// (Required) A list of partition key values. /// This member is required. public var partitionValues: [Swift.String]? + /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context. + public var querySessionContext: GlueClientTypes.QuerySessionContext? + /// Specified only if the base tables belong to a different Amazon Web Services Region. + public var region: Swift.String? /// (Required) A list of supported permission types. /// This member is required. public var supportedPermissionTypes: [GlueClientTypes.PermissionType]? @@ -33002,6 +33016,8 @@ public struct GetUnfilteredPartitionMetadataInput: Swift.Equatable { catalogId: Swift.String? = nil, databaseName: Swift.String? = nil, partitionValues: [Swift.String]? = nil, + querySessionContext: GlueClientTypes.QuerySessionContext? = nil, + region: Swift.String? = nil, supportedPermissionTypes: [GlueClientTypes.PermissionType]? = nil, tableName: Swift.String? = nil ) @@ -33010,18 +33026,22 @@ public struct GetUnfilteredPartitionMetadataInput: Swift.Equatable { self.catalogId = catalogId self.databaseName = databaseName self.partitionValues = partitionValues + self.querySessionContext = querySessionContext + self.region = region self.supportedPermissionTypes = supportedPermissionTypes self.tableName = tableName } } struct GetUnfilteredPartitionMetadataInputBody: Swift.Equatable { + let region: Swift.String? let catalogId: Swift.String? let databaseName: Swift.String? let tableName: Swift.String? let partitionValues: [Swift.String]? let auditContext: GlueClientTypes.AuditContext? let supportedPermissionTypes: [GlueClientTypes.PermissionType]? + let querySessionContext: GlueClientTypes.QuerySessionContext? } extension GetUnfilteredPartitionMetadataInputBody: Swift.Decodable { @@ -33030,12 +33050,16 @@ extension GetUnfilteredPartitionMetadataInputBody: Swift.Decodable { case catalogId = "CatalogId" case databaseName = "DatabaseName" case partitionValues = "PartitionValues" + case querySessionContext = "QuerySessionContext" + case region = "Region" case supportedPermissionTypes = "SupportedPermissionTypes" case tableName = "TableName" } public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) + region = regionDecoded let catalogIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .catalogId) catalogId = catalogIdDecoded let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) @@ -33066,6 +33090,8 @@ extension GetUnfilteredPartitionMetadataInputBody: Swift.Decodable { } } supportedPermissionTypes = supportedPermissionTypesDecoded0 + let querySessionContextDecoded = try containerValues.decodeIfPresent(GlueClientTypes.QuerySessionContext.self, forKey: .querySessionContext) + querySessionContext = querySessionContextDecoded } } @@ -33164,6 +33190,8 @@ extension GetUnfilteredPartitionsMetadataInput: Swift.Encodable { case expression = "Expression" case maxResults = "MaxResults" case nextToken = "NextToken" + case querySessionContext = "QuerySessionContext" + case region = "Region" case segment = "Segment" case supportedPermissionTypes = "SupportedPermissionTypes" case tableName = "TableName" @@ -33189,6 +33217,12 @@ extension GetUnfilteredPartitionsMetadataInput: Swift.Encodable { if let nextToken = self.nextToken { try encodeContainer.encode(nextToken, forKey: .nextToken) } + if let querySessionContext = self.querySessionContext { + try encodeContainer.encode(querySessionContext, forKey: .querySessionContext) + } + if let region = self.region { + try encodeContainer.encode(region, forKey: .region) + } if let segment = self.segment { try encodeContainer.encode(segment, forKey: .segment) } @@ -33246,6 +33280,10 @@ public struct GetUnfilteredPartitionsMetadataInput: Swift.Equatable { public var maxResults: Swift.Int? /// A continuation token, if this is not the first call to retrieve these partitions. public var nextToken: Swift.String? + /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context. + public var querySessionContext: GlueClientTypes.QuerySessionContext? + /// Specified only if the base tables belong to a different Amazon Web Services Region. + public var region: Swift.String? /// The segment of the table's partitions to scan in this request. public var segment: GlueClientTypes.Segment? /// A list of supported permission types. @@ -33262,6 +33300,8 @@ public struct GetUnfilteredPartitionsMetadataInput: Swift.Equatable { expression: Swift.String? = nil, maxResults: Swift.Int? = nil, nextToken: Swift.String? = nil, + querySessionContext: GlueClientTypes.QuerySessionContext? = nil, + region: Swift.String? = nil, segment: GlueClientTypes.Segment? = nil, supportedPermissionTypes: [GlueClientTypes.PermissionType]? = nil, tableName: Swift.String? = nil @@ -33273,6 +33313,8 @@ public struct GetUnfilteredPartitionsMetadataInput: Swift.Equatable { self.expression = expression self.maxResults = maxResults self.nextToken = nextToken + self.querySessionContext = querySessionContext + self.region = region self.segment = segment self.supportedPermissionTypes = supportedPermissionTypes self.tableName = tableName @@ -33280,6 +33322,7 @@ public struct GetUnfilteredPartitionsMetadataInput: Swift.Equatable { } struct GetUnfilteredPartitionsMetadataInputBody: Swift.Equatable { + let region: Swift.String? let catalogId: Swift.String? let databaseName: Swift.String? let tableName: Swift.String? @@ -33289,6 +33332,7 @@ struct GetUnfilteredPartitionsMetadataInputBody: Swift.Equatable { let nextToken: Swift.String? let segment: GlueClientTypes.Segment? let maxResults: Swift.Int? + let querySessionContext: GlueClientTypes.QuerySessionContext? } extension GetUnfilteredPartitionsMetadataInputBody: Swift.Decodable { @@ -33299,6 +33343,8 @@ extension GetUnfilteredPartitionsMetadataInputBody: Swift.Decodable { case expression = "Expression" case maxResults = "MaxResults" case nextToken = "NextToken" + case querySessionContext = "QuerySessionContext" + case region = "Region" case segment = "Segment" case supportedPermissionTypes = "SupportedPermissionTypes" case tableName = "TableName" @@ -33306,6 +33352,8 @@ extension GetUnfilteredPartitionsMetadataInputBody: Swift.Decodable { public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) + region = regionDecoded let catalogIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .catalogId) catalogId = catalogIdDecoded let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) @@ -33333,6 +33381,8 @@ extension GetUnfilteredPartitionsMetadataInputBody: Swift.Decodable { segment = segmentDecoded let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) maxResults = maxResultsDecoded + let querySessionContextDecoded = try containerValues.decodeIfPresent(GlueClientTypes.QuerySessionContext.self, forKey: .querySessionContext) + querySessionContext = querySessionContextDecoded } } @@ -33419,6 +33469,10 @@ extension GetUnfilteredTableMetadataInput: Swift.Encodable { case catalogId = "CatalogId" case databaseName = "DatabaseName" case name = "Name" + case permissions = "Permissions" + case querySessionContext = "QuerySessionContext" + case region = "Region" + case supportedDialect = "SupportedDialect" case supportedPermissionTypes = "SupportedPermissionTypes" } @@ -33436,6 +33490,21 @@ extension GetUnfilteredTableMetadataInput: Swift.Encodable { if let name = self.name { try encodeContainer.encode(name, forKey: .name) } + if let permissions = permissions { + var permissionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .permissions) + for permission0 in permissions { + try permissionsContainer.encode(permission0.rawValue) + } + } + if let querySessionContext = self.querySessionContext { + try encodeContainer.encode(querySessionContext, forKey: .querySessionContext) + } + if let region = self.region { + try encodeContainer.encode(region, forKey: .region) + } + if let supportedDialect = self.supportedDialect { + try encodeContainer.encode(supportedDialect, forKey: .supportedDialect) + } if let supportedPermissionTypes = supportedPermissionTypes { var supportedPermissionTypesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .supportedPermissionTypes) for permissiontype0 in supportedPermissionTypes { @@ -33463,6 +33532,14 @@ public struct GetUnfilteredTableMetadataInput: Swift.Equatable { /// (Required) Specifies the name of a table for which you are requesting metadata. /// This member is required. public var name: Swift.String? + /// The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found. + public var permissions: [GlueClientTypes.Permission]? + /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context. + public var querySessionContext: GlueClientTypes.QuerySessionContext? + /// Specified only if the base tables belong to a different Amazon Web Services Region. + public var region: Swift.String? + /// A structure specifying the dialect and dialect version used by the query engine. + public var supportedDialect: GlueClientTypes.SupportedDialect? /// (Required) A list of supported permission types. /// This member is required. public var supportedPermissionTypes: [GlueClientTypes.PermissionType]? @@ -33472,6 +33549,10 @@ public struct GetUnfilteredTableMetadataInput: Swift.Equatable { catalogId: Swift.String? = nil, databaseName: Swift.String? = nil, name: Swift.String? = nil, + permissions: [GlueClientTypes.Permission]? = nil, + querySessionContext: GlueClientTypes.QuerySessionContext? = nil, + region: Swift.String? = nil, + supportedDialect: GlueClientTypes.SupportedDialect? = nil, supportedPermissionTypes: [GlueClientTypes.PermissionType]? = nil ) { @@ -33479,16 +33560,24 @@ public struct GetUnfilteredTableMetadataInput: Swift.Equatable { self.catalogId = catalogId self.databaseName = databaseName self.name = name + self.permissions = permissions + self.querySessionContext = querySessionContext + self.region = region + self.supportedDialect = supportedDialect self.supportedPermissionTypes = supportedPermissionTypes } } struct GetUnfilteredTableMetadataInputBody: Swift.Equatable { + let region: Swift.String? let catalogId: Swift.String? let databaseName: Swift.String? let name: Swift.String? let auditContext: GlueClientTypes.AuditContext? let supportedPermissionTypes: [GlueClientTypes.PermissionType]? + let supportedDialect: GlueClientTypes.SupportedDialect? + let permissions: [GlueClientTypes.Permission]? + let querySessionContext: GlueClientTypes.QuerySessionContext? } extension GetUnfilteredTableMetadataInputBody: Swift.Decodable { @@ -33497,11 +33586,17 @@ extension GetUnfilteredTableMetadataInputBody: Swift.Decodable { case catalogId = "CatalogId" case databaseName = "DatabaseName" case name = "Name" + case permissions = "Permissions" + case querySessionContext = "QuerySessionContext" + case region = "Region" + case supportedDialect = "SupportedDialect" case supportedPermissionTypes = "SupportedPermissionTypes" } public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) + region = regionDecoded let catalogIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .catalogId) catalogId = catalogIdDecoded let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) @@ -33521,6 +33616,21 @@ extension GetUnfilteredTableMetadataInputBody: Swift.Decodable { } } supportedPermissionTypes = supportedPermissionTypesDecoded0 + let supportedDialectDecoded = try containerValues.decodeIfPresent(GlueClientTypes.SupportedDialect.self, forKey: .supportedDialect) + supportedDialect = supportedDialectDecoded + let permissionsContainer = try containerValues.decodeIfPresent([GlueClientTypes.Permission?].self, forKey: .permissions) + var permissionsDecoded0:[GlueClientTypes.Permission]? = nil + if let permissionsContainer = permissionsContainer { + permissionsDecoded0 = [GlueClientTypes.Permission]() + for enum0 in permissionsContainer { + if let enum0 = enum0 { + permissionsDecoded0?.append(enum0) + } + } + } + permissions = permissionsDecoded0 + let querySessionContextDecoded = try containerValues.decodeIfPresent(GlueClientTypes.QuerySessionContext.self, forKey: .querySessionContext) + querySessionContext = querySessionContextDecoded } } @@ -33532,11 +33642,17 @@ extension GetUnfilteredTableMetadataOutput: ClientRuntime.HttpResponseBinding { self.authorizedColumns = output.authorizedColumns self.cellFilters = output.cellFilters self.isRegisteredWithLakeFormation = output.isRegisteredWithLakeFormation + self.permissions = output.permissions + self.queryAuthorizationId = output.queryAuthorizationId + self.resourceArn = output.resourceArn self.table = output.table } else { self.authorizedColumns = nil self.cellFilters = nil self.isRegisteredWithLakeFormation = false + self.permissions = nil + self.queryAuthorizationId = nil + self.resourceArn = nil self.table = nil } } @@ -33549,6 +33665,12 @@ public struct GetUnfilteredTableMetadataOutput: Swift.Equatable { public var cellFilters: [GlueClientTypes.ColumnRowFilter]? /// A Boolean value that indicates whether the partition location is registered with Lake Formation. public var isRegisteredWithLakeFormation: Swift.Bool + /// The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found. + public var permissions: [GlueClientTypes.Permission]? + /// A cryptographically generated query identifier generated by Glue or Lake Formation. + public var queryAuthorizationId: Swift.String? + /// The resource ARN of the parent resource extracted from the request. + public var resourceArn: Swift.String? /// A Table object containing the table metadata. public var table: GlueClientTypes.Table? @@ -33556,12 +33678,18 @@ public struct GetUnfilteredTableMetadataOutput: Swift.Equatable { authorizedColumns: [Swift.String]? = nil, cellFilters: [GlueClientTypes.ColumnRowFilter]? = nil, isRegisteredWithLakeFormation: Swift.Bool = false, + permissions: [GlueClientTypes.Permission]? = nil, + queryAuthorizationId: Swift.String? = nil, + resourceArn: Swift.String? = nil, table: GlueClientTypes.Table? = nil ) { self.authorizedColumns = authorizedColumns self.cellFilters = cellFilters self.isRegisteredWithLakeFormation = isRegisteredWithLakeFormation + self.permissions = permissions + self.queryAuthorizationId = queryAuthorizationId + self.resourceArn = resourceArn self.table = table } } @@ -33571,6 +33699,9 @@ struct GetUnfilteredTableMetadataOutputBody: Swift.Equatable { let authorizedColumns: [Swift.String]? let isRegisteredWithLakeFormation: Swift.Bool let cellFilters: [GlueClientTypes.ColumnRowFilter]? + let queryAuthorizationId: Swift.String? + let resourceArn: Swift.String? + let permissions: [GlueClientTypes.Permission]? } extension GetUnfilteredTableMetadataOutputBody: Swift.Decodable { @@ -33578,6 +33709,9 @@ extension GetUnfilteredTableMetadataOutputBody: Swift.Decodable { case authorizedColumns = "AuthorizedColumns" case cellFilters = "CellFilters" case isRegisteredWithLakeFormation = "IsRegisteredWithLakeFormation" + case permissions = "Permissions" + case queryAuthorizationId = "QueryAuthorizationId" + case resourceArn = "ResourceArn" case table = "Table" } @@ -33609,6 +33743,21 @@ extension GetUnfilteredTableMetadataOutputBody: Swift.Decodable { } } cellFilters = cellFiltersDecoded0 + let queryAuthorizationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queryAuthorizationId) + queryAuthorizationId = queryAuthorizationIdDecoded + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + let permissionsContainer = try containerValues.decodeIfPresent([GlueClientTypes.Permission?].self, forKey: .permissions) + var permissionsDecoded0:[GlueClientTypes.Permission]? = nil + if let permissionsContainer = permissionsContainer { + permissionsDecoded0 = [GlueClientTypes.Permission]() + for enum0 in permissionsContainer { + if let enum0 = enum0 { + permissionsDecoded0?.append(enum0) + } + } + } + permissions = permissionsDecoded0 } } @@ -46406,6 +46555,93 @@ enum QuerySchemaVersionMetadataOutputError: ClientRuntime.HttpResponseErrorBindi } } +extension GlueClientTypes.QuerySessionContext: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalContext = "AdditionalContext" + case clusterId = "ClusterId" + case queryAuthorizationId = "QueryAuthorizationId" + case queryId = "QueryId" + case queryStartTime = "QueryStartTime" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let additionalContext = additionalContext { + var additionalContextContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .additionalContext) + for (dictKey0, additionalContextMap0) in additionalContext { + try additionalContextContainer.encode(additionalContextMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + if let clusterId = self.clusterId { + try encodeContainer.encode(clusterId, forKey: .clusterId) + } + if let queryAuthorizationId = self.queryAuthorizationId { + try encodeContainer.encode(queryAuthorizationId, forKey: .queryAuthorizationId) + } + if let queryId = self.queryId { + try encodeContainer.encode(queryId, forKey: .queryId) + } + if let queryStartTime = self.queryStartTime { + try encodeContainer.encodeTimestamp(queryStartTime, format: .epochSeconds, forKey: .queryStartTime) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let queryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queryId) + queryId = queryIdDecoded + let queryStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .queryStartTime) + queryStartTime = queryStartTimeDecoded + let clusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterId) + clusterId = clusterIdDecoded + let queryAuthorizationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queryAuthorizationId) + queryAuthorizationId = queryAuthorizationIdDecoded + let additionalContextContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .additionalContext) + var additionalContextDecoded0: [Swift.String:Swift.String]? = nil + if let additionalContextContainer = additionalContextContainer { + additionalContextDecoded0 = [Swift.String:Swift.String]() + for (key0, contextvalue0) in additionalContextContainer { + if let contextvalue0 = contextvalue0 { + additionalContextDecoded0?[key0] = contextvalue0 + } + } + } + additionalContext = additionalContextDecoded0 + } +} + +extension GlueClientTypes { + /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context. + public struct QuerySessionContext: Swift.Equatable { + /// An opaque string-string map passed by the query engine. + public var additionalContext: [Swift.String:Swift.String]? + /// An identifier string for the consumer cluster. + public var clusterId: Swift.String? + /// A cryptographically generated query identifier generated by Glue or Lake Formation. + public var queryAuthorizationId: Swift.String? + /// A unique identifier generated by the query engine for the query. + public var queryId: Swift.String? + /// A timestamp provided by the query engine for when the query started. + public var queryStartTime: ClientRuntime.Date? + + public init( + additionalContext: [Swift.String:Swift.String]? = nil, + clusterId: Swift.String? = nil, + queryAuthorizationId: Swift.String? = nil, + queryId: Swift.String? = nil, + queryStartTime: ClientRuntime.Date? = nil + ) + { + self.additionalContext = additionalContext + self.clusterId = clusterId + self.queryAuthorizationId = queryAuthorizationId + self.queryId = queryId + self.queryStartTime = queryStartTime + } + } + +} + extension GlueClientTypes { public enum QuoteChar: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case disabled @@ -56715,6 +56951,51 @@ extension GlueClientTypes { } +extension GlueClientTypes.SupportedDialect: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dialect = "Dialect" + case dialectVersion = "DialectVersion" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let dialect = self.dialect { + try encodeContainer.encode(dialect.rawValue, forKey: .dialect) + } + if let dialectVersion = self.dialectVersion { + try encodeContainer.encode(dialectVersion, forKey: .dialectVersion) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let dialectDecoded = try containerValues.decodeIfPresent(GlueClientTypes.ViewDialect.self, forKey: .dialect) + dialect = dialectDecoded + let dialectVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dialectVersion) + dialectVersion = dialectVersionDecoded + } +} + +extension GlueClientTypes { + /// A structure specifying the dialect and dialect version used by the query engine. + public struct SupportedDialect: Swift.Equatable { + /// The dialect of the query engine. + public var dialect: GlueClientTypes.ViewDialect? + /// The version of the dialect of the query engine. For example, 3.0.0. + public var dialectVersion: Swift.String? + + public init( + dialect: GlueClientTypes.ViewDialect? = nil, + dialectVersion: Swift.String? = nil + ) + { + self.dialect = dialect + self.dialectVersion = dialectVersion + } + } + +} + extension GlueClientTypes.Table: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case catalogId = "CatalogId" @@ -63328,6 +63609,41 @@ extension VersionMismatchExceptionBody: Swift.Decodable { } } +extension GlueClientTypes { + public enum ViewDialect: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case athena + case redshift + case spark + case sdkUnknown(Swift.String) + + public static var allCases: [ViewDialect] { + return [ + .athena, + .redshift, + .spark, + .sdkUnknown("") + ] + } + 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 .athena: return "ATHENA" + case .redshift: return "REDSHIFT" + case .spark: return "SPARK" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ViewDialect(rawValue: rawValue) ?? ViewDialect.sdkUnknown(rawValue) + } + } +} + extension GlueClientTypes { public enum WorkerType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case g025x diff --git a/Sources/Services/AWSGuardDuty/GuardDutyClient.swift b/Sources/Services/AWSGuardDuty/GuardDutyClient.swift index d823b324efd..504006b01ff 100644 --- a/Sources/Services/AWSGuardDuty/GuardDutyClient.swift +++ b/Sources/Services/AWSGuardDuty/GuardDutyClient.swift @@ -355,7 +355,7 @@ extension GuardDutyClient: GuardDutyClientProtocol { /// Performs the `CreateMembers` operation on the `GuardDutyAPIService` service. /// - /// Creates member accounts of the current Amazon Web Services account by specifying a list of Amazon Web Services account IDs. This step is a prerequisite for managing the associated member accounts either by invitation or through an organization. As a delegated administrator, using CreateMembers will enable GuardDuty in the added member accounts, with the exception of the organization delegated administrator account. A delegated administrator must enable GuardDuty prior to being added as a member. If you are adding accounts by invitation, before using [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html), use CreateMembers after GuardDuty has been enabled in potential member accounts. If you disassociate a member from a GuardDuty delegated administrator, the member account details obtained from this API, including the associated email addresses, will be retained. This is done so that the delegated administrator can invoke the [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html) API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the [DeleteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteMembers.html) API. + /// Creates member accounts of the current Amazon Web Services account by specifying a list of Amazon Web Services account IDs. This step is a prerequisite for managing the associated member accounts either by invitation or through an organization. As a delegated administrator, using CreateMembers will enable GuardDuty in the added member accounts, with the exception of the organization delegated administrator account. A delegated administrator must enable GuardDuty prior to being added as a member. When you use CreateMembers as an Organizations delegated administrator, GuardDuty applies your organization's auto-enable settings to the member accounts in this request, irrespective of the accounts being new or existing members. For more information about the existing auto-enable settings for your organization, see [DescribeOrganizationConfiguration](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DescribeOrganizationConfiguration.html). If you are adding accounts by invitation, before using [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html), use CreateMembers after GuardDuty has been enabled in potential member accounts. If you disassociate a member from a GuardDuty delegated administrator, the member account details obtained from this API, including the associated email addresses, will be retained. This is done so that the delegated administrator can invoke the [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html) API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the [DeleteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteMembers.html) API. /// /// - Parameter CreateMembersInput : [no documentation found] /// @@ -1316,7 +1316,7 @@ extension GuardDutyClient: GuardDutyClientProtocol { /// Performs the `GetCoverageStatistics` operation on the `GuardDutyAPIService` service. /// - /// Retrieves aggregated statistics for your account. If you are a GuardDuty administrator, you can retrieve the statistics for all the resources associated with the active member accounts in your organization who have enabled EKS Runtime Monitoring and have the GuardDuty agent running on their EKS nodes. + /// Retrieves aggregated statistics for your account. If you are a GuardDuty administrator, you can retrieve the statistics for all the resources associated with the active member accounts in your organization who have enabled Runtime Monitoring and have the GuardDuty security agent running on their resources. /// /// - Parameter GetCoverageStatisticsInput : [no documentation found] /// @@ -1814,6 +1814,50 @@ extension GuardDutyClient: GuardDutyClientProtocol { return result } + /// Performs the `GetOrganizationStatistics` operation on the `GuardDutyAPIService` service. + /// + /// Retrieves how many active member accounts in your Amazon Web Services organization have each feature enabled within GuardDuty. Only a delegated GuardDuty administrator of an organization can run this API. When you create a new Amazon Web Services organization, it might take up to 24 hours to generate the statistics for the entire organization. + /// + /// - Parameter GetOrganizationStatisticsInput : [no documentation found] + /// + /// - Returns: `GetOrganizationStatisticsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : A bad request exception object. + /// - `InternalServerErrorException` : An internal server error exception object. + public func getOrganizationStatistics(input: GetOrganizationStatisticsInput) async throws -> GetOrganizationStatisticsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getOrganizationStatistics") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "guardduty") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "getOrganizationStatistics") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOrganizationStatisticsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `GetRemainingFreeTrialDays` operation on the `GuardDutyAPIService` service. /// /// Provides the number of days left for each data source used in the free trial period. @@ -2001,7 +2045,7 @@ extension GuardDutyClient: GuardDutyClientProtocol { /// Performs the `ListCoverage` operation on the `GuardDutyAPIService` service. /// - /// Lists coverage details for your GuardDuty account. If you're a GuardDuty administrator, you can retrieve all resources associated with the active member accounts in your organization. Make sure the accounts have EKS Runtime Monitoring enabled and GuardDuty agent running on their EKS nodes. + /// Lists coverage details for your GuardDuty account. If you're a GuardDuty administrator, you can retrieve all resources associated with the active member accounts in your organization. Make sure the accounts have Runtime Monitoring enabled and GuardDuty agent running on their resources. /// /// - Parameter ListCoverageInput : [no documentation found] /// diff --git a/Sources/Services/AWSGuardDuty/GuardDutyClientProtocol.swift b/Sources/Services/AWSGuardDuty/GuardDutyClientProtocol.swift index 67579ac3560..5c75f43014b 100644 --- a/Sources/Services/AWSGuardDuty/GuardDutyClientProtocol.swift +++ b/Sources/Services/AWSGuardDuty/GuardDutyClientProtocol.swift @@ -91,7 +91,7 @@ public protocol GuardDutyClientProtocol { func createIPSet(input: CreateIPSetInput) async throws -> CreateIPSetOutput /// Performs the `CreateMembers` operation on the `GuardDutyAPIService` service. /// - /// Creates member accounts of the current Amazon Web Services account by specifying a list of Amazon Web Services account IDs. This step is a prerequisite for managing the associated member accounts either by invitation or through an organization. As a delegated administrator, using CreateMembers will enable GuardDuty in the added member accounts, with the exception of the organization delegated administrator account. A delegated administrator must enable GuardDuty prior to being added as a member. If you are adding accounts by invitation, before using [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html), use CreateMembers after GuardDuty has been enabled in potential member accounts. If you disassociate a member from a GuardDuty delegated administrator, the member account details obtained from this API, including the associated email addresses, will be retained. This is done so that the delegated administrator can invoke the [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html) API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the [DeleteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteMembers.html) API. + /// Creates member accounts of the current Amazon Web Services account by specifying a list of Amazon Web Services account IDs. This step is a prerequisite for managing the associated member accounts either by invitation or through an organization. As a delegated administrator, using CreateMembers will enable GuardDuty in the added member accounts, with the exception of the organization delegated administrator account. A delegated administrator must enable GuardDuty prior to being added as a member. When you use CreateMembers as an Organizations delegated administrator, GuardDuty applies your organization's auto-enable settings to the member accounts in this request, irrespective of the accounts being new or existing members. For more information about the existing auto-enable settings for your organization, see [DescribeOrganizationConfiguration](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DescribeOrganizationConfiguration.html). If you are adding accounts by invitation, before using [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html), use CreateMembers after GuardDuty has been enabled in potential member accounts. If you disassociate a member from a GuardDuty delegated administrator, the member account details obtained from this API, including the associated email addresses, will be retained. This is done so that the delegated administrator can invoke the [InviteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html) API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the [DeleteMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteMembers.html) API. /// /// - Parameter CreateMembersInput : [no documentation found] /// @@ -386,7 +386,7 @@ public protocol GuardDutyClientProtocol { func getAdministratorAccount(input: GetAdministratorAccountInput) async throws -> GetAdministratorAccountOutput /// Performs the `GetCoverageStatistics` operation on the `GuardDutyAPIService` service. /// - /// Retrieves aggregated statistics for your account. If you are a GuardDuty administrator, you can retrieve the statistics for all the resources associated with the active member accounts in your organization who have enabled EKS Runtime Monitoring and have the GuardDuty agent running on their EKS nodes. + /// Retrieves aggregated statistics for your account. If you are a GuardDuty administrator, you can retrieve the statistics for all the resources associated with the active member accounts in your organization who have enabled Runtime Monitoring and have the GuardDuty security agent running on their resources. /// /// - Parameter GetCoverageStatisticsInput : [no documentation found] /// @@ -539,6 +539,20 @@ public protocol GuardDutyClientProtocol { /// - `BadRequestException` : A bad request exception object. /// - `InternalServerErrorException` : An internal server error exception object. func getMembers(input: GetMembersInput) async throws -> GetMembersOutput + /// Performs the `GetOrganizationStatistics` operation on the `GuardDutyAPIService` service. + /// + /// Retrieves how many active member accounts in your Amazon Web Services organization have each feature enabled within GuardDuty. Only a delegated GuardDuty administrator of an organization can run this API. When you create a new Amazon Web Services organization, it might take up to 24 hours to generate the statistics for the entire organization. + /// + /// - Parameter GetOrganizationStatisticsInput : [no documentation found] + /// + /// - Returns: `GetOrganizationStatisticsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : A bad request exception object. + /// - `InternalServerErrorException` : An internal server error exception object. + func getOrganizationStatistics(input: GetOrganizationStatisticsInput) async throws -> GetOrganizationStatisticsOutput /// Performs the `GetRemainingFreeTrialDays` operation on the `GuardDutyAPIService` service. /// /// Provides the number of days left for each data source used in the free trial period. @@ -597,7 +611,7 @@ public protocol GuardDutyClientProtocol { func inviteMembers(input: InviteMembersInput) async throws -> InviteMembersOutput /// Performs the `ListCoverage` operation on the `GuardDutyAPIService` service. /// - /// Lists coverage details for your GuardDuty account. If you're a GuardDuty administrator, you can retrieve all resources associated with the active member accounts in your organization. Make sure the accounts have EKS Runtime Monitoring enabled and GuardDuty agent running on their EKS nodes. + /// Lists coverage details for your GuardDuty account. If you're a GuardDuty administrator, you can retrieve all resources associated with the active member accounts in your organization. Make sure the accounts have Runtime Monitoring enabled and GuardDuty agent running on their resources. /// /// - Parameter ListCoverageInput : [no documentation found] /// diff --git a/Sources/Services/AWSGuardDuty/models/Models.swift b/Sources/Services/AWSGuardDuty/models/Models.swift index 8d075ff9fc7..f0b28728318 100644 --- a/Sources/Services/AWSGuardDuty/models/Models.swift +++ b/Sources/Services/AWSGuardDuty/models/Models.swift @@ -2108,7 +2108,7 @@ extension GuardDutyClientTypes.CoverageEc2InstanceDetails: Swift.Codable { } extension GuardDutyClientTypes { - /// This API is also used when you use GuardDuty Runtime Monitoring for your Amazon EC2 instances (currently in preview release) and is subject to change. Contains information about the Amazon EC2 instance runtime coverage details. + /// This API is also used when you use GuardDuty Runtime Monitoring for your Amazon EC2 instances (currently in preview release) and is subject to change. The use of this API is subject to Section 2 of the [Amazon Web Services Service Terms](http://aws.amazon.com/service-terms/) ("Betas and Previews"). Contains information about the Amazon EC2 instance runtime coverage details. public struct CoverageEc2InstanceDetails: Swift.Equatable { /// Information about the installed security agent. public var agentDetails: GuardDutyClientTypes.AgentDetails? @@ -2125,7 +2125,7 @@ extension GuardDutyClientTypes { /// * MANUAL indicates that you are responsible to deploy, update, and manage the GuardDuty security agent updates for this resource. /// /// - /// The DISABLED status doesn't apply to Amazon EC2 instances and Amazon EKS clusters that run on Amazon EC2 instances. + /// The DISABLED status doesn't apply to Amazon EC2 instances and Amazon EKS clusters. public var managementType: GuardDutyClientTypes.ManagementType? public init( @@ -2631,7 +2631,7 @@ extension GuardDutyClientTypes.CoverageResourceDetails: Swift.Codable { extension GuardDutyClientTypes { /// Information about the resource for each individual EKS cluster. public struct CoverageResourceDetails: Swift.Equatable { - /// This API is also used when you use GuardDuty Runtime Monitoring for your Amazon EC2 instances (currently in preview release) and is subject to change. Information about the Amazon EC2 instance assessed for runtime coverage. + /// This API is also used when you use GuardDuty Runtime Monitoring for your Amazon EC2 instances (currently in preview release) and is subject to change. The use of this API is subject to Section 2 of the [Amazon Web Services Service Terms](http://aws.amazon.com/service-terms/) ("Betas and Previews"). Information about the Amazon EC2 instance assessed for runtime coverage. public var ec2InstanceDetails: GuardDutyClientTypes.CoverageEc2InstanceDetails? /// Information about the Amazon ECS cluster that is assessed for runtime coverage. public var ecsClusterDetails: GuardDutyClientTypes.CoverageEcsClusterDetails? @@ -7539,17 +7539,18 @@ extension GuardDutyClientTypes.FargateDetails: Swift.Codable { } extension GuardDutyClientTypes { - /// Contains information about AWS Fargate details associated with an Amazon ECS cluster. + /// Contains information about Amazon Web Services Fargate details associated with an Amazon ECS cluster. public struct FargateDetails: Swift.Equatable { - /// Runtime coverage issues identified for the resource running on AWS Fargate. + /// Runtime coverage issues identified for the resource running on Amazon Web Services Fargate. public var issues: [Swift.String]? /// Indicates how the GuardDuty security agent is managed for this resource. /// /// * AUTO_MANAGED indicates that GuardDuty deploys and manages updates for this resource. /// - /// * MANUAL indicates that you are responsible to deploy, update, and manage the GuardDuty security agent updates for this resource. - /// /// * DISABLED indicates that the deployment of the GuardDuty security agent is disabled for this resource. + /// + /// + /// The MANUAL status doesn't apply to the Amazon Web Services Fargate (Amazon ECS only) woprkloads. public var managementType: GuardDutyClientTypes.ManagementType? public init( @@ -9880,6 +9881,78 @@ enum GetMembersOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension GetOrganizationStatisticsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/organization/statistics" + } +} + +public struct GetOrganizationStatisticsInput: Swift.Equatable { + + public init() { } +} + +struct GetOrganizationStatisticsInputBody: Swift.Equatable { +} + +extension GetOrganizationStatisticsInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension GetOrganizationStatisticsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: GetOrganizationStatisticsOutputBody = try responseDecoder.decode(responseBody: data) + self.organizationDetails = output.organizationDetails + } else { + self.organizationDetails = nil + } + } +} + +public struct GetOrganizationStatisticsOutput: Swift.Equatable { + /// Information about the statistics report for your organization. + public var organizationDetails: GuardDutyClientTypes.OrganizationDetails? + + public init( + organizationDetails: GuardDutyClientTypes.OrganizationDetails? = nil + ) + { + self.organizationDetails = organizationDetails + } +} + +struct GetOrganizationStatisticsOutputBody: Swift.Equatable { + let organizationDetails: GuardDutyClientTypes.OrganizationDetails? +} + +extension GetOrganizationStatisticsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case organizationDetails = "organizationDetails" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let organizationDetailsDecoded = try containerValues.decodeIfPresent(GuardDutyClientTypes.OrganizationDetails.self, forKey: .organizationDetails) + organizationDetails = organizationDetailsDecoded + } +} + +enum GetOrganizationStatisticsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension GetRemainingFreeTrialDaysInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accountIds = "accountIds" @@ -15185,6 +15258,51 @@ extension GuardDutyClientTypes { } +extension GuardDutyClientTypes.OrganizationDetails: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case organizationStatistics = "organizationStatistics" + case updatedAt = "updatedAt" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let organizationStatistics = self.organizationStatistics { + try encodeContainer.encode(organizationStatistics, forKey: .organizationStatistics) + } + if let updatedAt = self.updatedAt { + try encodeContainer.encodeTimestamp(updatedAt, format: .epochSeconds, forKey: .updatedAt) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let updatedAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .updatedAt) + updatedAt = updatedAtDecoded + let organizationStatisticsDecoded = try containerValues.decodeIfPresent(GuardDutyClientTypes.OrganizationStatistics.self, forKey: .organizationStatistics) + organizationStatistics = organizationStatisticsDecoded + } +} + +extension GuardDutyClientTypes { + /// Information about GuardDuty coverage statistics for members in your Amazon Web Services organization. + public struct OrganizationDetails: Swift.Equatable { + /// Information about the GuardDuty coverage statistics for members in your Amazon Web Services organization. + public var organizationStatistics: GuardDutyClientTypes.OrganizationStatistics? + /// The timestamp at which the organization statistics was last updated. This is in UTC format. + public var updatedAt: ClientRuntime.Date? + + public init( + organizationStatistics: GuardDutyClientTypes.OrganizationStatistics? = nil, + updatedAt: ClientRuntime.Date? = nil + ) + { + self.organizationStatistics = organizationStatistics + self.updatedAt = updatedAt + } + } + +} + extension GuardDutyClientTypes.OrganizationEbsVolumes: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoEnable = "autoEnable" @@ -15401,6 +15519,118 @@ extension GuardDutyClientTypes { } +extension GuardDutyClientTypes.OrganizationFeatureStatistics: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalConfiguration = "additionalConfiguration" + case enabledAccountsCount = "enabledAccountsCount" + case name = "name" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let additionalConfiguration = additionalConfiguration { + var additionalConfigurationContainer = encodeContainer.nestedUnkeyedContainer(forKey: .additionalConfiguration) + for organizationfeaturestatisticsadditionalconfiguration0 in additionalConfiguration { + try additionalConfigurationContainer.encode(organizationfeaturestatisticsadditionalconfiguration0) + } + } + if let enabledAccountsCount = self.enabledAccountsCount { + try encodeContainer.encode(enabledAccountsCount, forKey: .enabledAccountsCount) + } + if let name = self.name { + try encodeContainer.encode(name.rawValue, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(GuardDutyClientTypes.OrgFeature.self, forKey: .name) + name = nameDecoded + let enabledAccountsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .enabledAccountsCount) + enabledAccountsCount = enabledAccountsCountDecoded + let additionalConfigurationContainer = try containerValues.decodeIfPresent([GuardDutyClientTypes.OrganizationFeatureStatisticsAdditionalConfiguration?].self, forKey: .additionalConfiguration) + var additionalConfigurationDecoded0:[GuardDutyClientTypes.OrganizationFeatureStatisticsAdditionalConfiguration]? = nil + if let additionalConfigurationContainer = additionalConfigurationContainer { + additionalConfigurationDecoded0 = [GuardDutyClientTypes.OrganizationFeatureStatisticsAdditionalConfiguration]() + for structure0 in additionalConfigurationContainer { + if let structure0 = structure0 { + additionalConfigurationDecoded0?.append(structure0) + } + } + } + additionalConfiguration = additionalConfigurationDecoded0 + } +} + +extension GuardDutyClientTypes { + /// Information about the number of accounts that have enabled a specific feature. + public struct OrganizationFeatureStatistics: Swift.Equatable { + /// Name of the additional configuration. + public var additionalConfiguration: [GuardDutyClientTypes.OrganizationFeatureStatisticsAdditionalConfiguration]? + /// Total number of accounts that have enabled a specific feature. + public var enabledAccountsCount: Swift.Int? + /// Name of the feature. + public var name: GuardDutyClientTypes.OrgFeature? + + public init( + additionalConfiguration: [GuardDutyClientTypes.OrganizationFeatureStatisticsAdditionalConfiguration]? = nil, + enabledAccountsCount: Swift.Int? = nil, + name: GuardDutyClientTypes.OrgFeature? = nil + ) + { + self.additionalConfiguration = additionalConfiguration + self.enabledAccountsCount = enabledAccountsCount + self.name = name + } + } + +} + +extension GuardDutyClientTypes.OrganizationFeatureStatisticsAdditionalConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabledAccountsCount = "enabledAccountsCount" + case name = "name" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let enabledAccountsCount = self.enabledAccountsCount { + try encodeContainer.encode(enabledAccountsCount, forKey: .enabledAccountsCount) + } + if let name = self.name { + try encodeContainer.encode(name.rawValue, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(GuardDutyClientTypes.OrgFeatureAdditionalConfiguration.self, forKey: .name) + name = nameDecoded + let enabledAccountsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .enabledAccountsCount) + enabledAccountsCount = enabledAccountsCountDecoded + } +} + +extension GuardDutyClientTypes { + /// Information about the coverage statistic for the additional configuration of the feature. + public struct OrganizationFeatureStatisticsAdditionalConfiguration: Swift.Equatable { + /// Total number of accounts that have enabled the additional configuration. + public var enabledAccountsCount: Swift.Int? + /// Name of the additional configuration within a feature. + public var name: GuardDutyClientTypes.OrgFeatureAdditionalConfiguration? + + public init( + enabledAccountsCount: Swift.Int? = nil, + name: GuardDutyClientTypes.OrgFeatureAdditionalConfiguration? = nil + ) + { + self.enabledAccountsCount = enabledAccountsCount + self.name = name + } + } + +} + extension GuardDutyClientTypes.OrganizationKubernetesAuditLogsConfiguration: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoEnable = "autoEnable" @@ -15757,6 +15987,93 @@ extension GuardDutyClientTypes { } +extension GuardDutyClientTypes.OrganizationStatistics: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case activeAccountsCount = "activeAccountsCount" + case countByFeature = "countByFeature" + case enabledAccountsCount = "enabledAccountsCount" + case memberAccountsCount = "memberAccountsCount" + case totalAccountsCount = "totalAccountsCount" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let activeAccountsCount = self.activeAccountsCount { + try encodeContainer.encode(activeAccountsCount, forKey: .activeAccountsCount) + } + if let countByFeature = countByFeature { + var countByFeatureContainer = encodeContainer.nestedUnkeyedContainer(forKey: .countByFeature) + for organizationfeaturestatistics0 in countByFeature { + try countByFeatureContainer.encode(organizationfeaturestatistics0) + } + } + if let enabledAccountsCount = self.enabledAccountsCount { + try encodeContainer.encode(enabledAccountsCount, forKey: .enabledAccountsCount) + } + if let memberAccountsCount = self.memberAccountsCount { + try encodeContainer.encode(memberAccountsCount, forKey: .memberAccountsCount) + } + if let totalAccountsCount = self.totalAccountsCount { + try encodeContainer.encode(totalAccountsCount, forKey: .totalAccountsCount) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let totalAccountsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalAccountsCount) + totalAccountsCount = totalAccountsCountDecoded + let memberAccountsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .memberAccountsCount) + memberAccountsCount = memberAccountsCountDecoded + let activeAccountsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .activeAccountsCount) + activeAccountsCount = activeAccountsCountDecoded + let enabledAccountsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .enabledAccountsCount) + enabledAccountsCount = enabledAccountsCountDecoded + let countByFeatureContainer = try containerValues.decodeIfPresent([GuardDutyClientTypes.OrganizationFeatureStatistics?].self, forKey: .countByFeature) + var countByFeatureDecoded0:[GuardDutyClientTypes.OrganizationFeatureStatistics]? = nil + if let countByFeatureContainer = countByFeatureContainer { + countByFeatureDecoded0 = [GuardDutyClientTypes.OrganizationFeatureStatistics]() + for structure0 in countByFeatureContainer { + if let structure0 = structure0 { + countByFeatureDecoded0?.append(structure0) + } + } + } + countByFeature = countByFeatureDecoded0 + } +} + +extension GuardDutyClientTypes { + /// Information about the coverage statistics of the features for the entire Amazon Web Services organization. When you create a new Amazon Web Services organization, it might take up to 24 hours to generate the statistics summary for this organization. + public struct OrganizationStatistics: Swift.Equatable { + /// Total number of active accounts in your Amazon Web Services organization that are associated with GuardDuty. + public var activeAccountsCount: Swift.Int? + /// Retrieves the coverage statistics for each feature. + public var countByFeature: [GuardDutyClientTypes.OrganizationFeatureStatistics]? + /// Total number of accounts that have enabled GuardDuty. + public var enabledAccountsCount: Swift.Int? + /// Total number of accounts in your Amazon Web Services organization that are associated with GuardDuty. + public var memberAccountsCount: Swift.Int? + /// Total number of accounts in your Amazon Web Services organization. + public var totalAccountsCount: Swift.Int? + + public init( + activeAccountsCount: Swift.Int? = nil, + countByFeature: [GuardDutyClientTypes.OrganizationFeatureStatistics]? = nil, + enabledAccountsCount: Swift.Int? = nil, + memberAccountsCount: Swift.Int? = nil, + totalAccountsCount: Swift.Int? = nil + ) + { + self.activeAccountsCount = activeAccountsCount + self.countByFeature = countByFeature + self.enabledAccountsCount = enabledAccountsCount + self.memberAccountsCount = memberAccountsCount + self.totalAccountsCount = totalAccountsCount + } + } + +} + extension GuardDutyClientTypes.Owner: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case id = "id" @@ -21203,6 +21520,7 @@ extension GuardDutyClientTypes { case sumByDataSource case sumByFeatures case sumByResource + case topAccountsByFeature case topResources case sdkUnknown(Swift.String) @@ -21212,6 +21530,7 @@ extension GuardDutyClientTypes { .sumByDataSource, .sumByFeatures, .sumByResource, + .topAccountsByFeature, .topResources, .sdkUnknown("") ] @@ -21226,6 +21545,7 @@ extension GuardDutyClientTypes { case .sumByDataSource: return "SUM_BY_DATA_SOURCE" case .sumByFeatures: return "SUM_BY_FEATURES" case .sumByResource: return "SUM_BY_RESOURCE" + case .topAccountsByFeature: return "TOP_ACCOUNTS_BY_FEATURE" case .topResources: return "TOP_RESOURCES" case let .sdkUnknown(s): return s } @@ -21244,6 +21564,7 @@ extension GuardDutyClientTypes.UsageStatistics: Swift.Codable { case sumByDataSource = "sumByDataSource" case sumByFeature = "sumByFeature" case sumByResource = "sumByResource" + case topAccountsByFeature = "topAccountsByFeature" case topResources = "topResources" } @@ -21273,6 +21594,12 @@ extension GuardDutyClientTypes.UsageStatistics: Swift.Codable { try sumByResourceContainer.encode(usageresourceresult0) } } + if let topAccountsByFeature = topAccountsByFeature { + var topAccountsByFeatureContainer = encodeContainer.nestedUnkeyedContainer(forKey: .topAccountsByFeature) + for usagetopaccountsresult0 in topAccountsByFeature { + try topAccountsByFeatureContainer.encode(usagetopaccountsresult0) + } + } if let topResources = topResources { var topResourcesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .topResources) for usageresourceresult0 in topResources { @@ -21294,6 +21621,17 @@ extension GuardDutyClientTypes.UsageStatistics: Swift.Codable { } } sumByAccount = sumByAccountDecoded0 + let topAccountsByFeatureContainer = try containerValues.decodeIfPresent([GuardDutyClientTypes.UsageTopAccountsResult?].self, forKey: .topAccountsByFeature) + var topAccountsByFeatureDecoded0:[GuardDutyClientTypes.UsageTopAccountsResult]? = nil + if let topAccountsByFeatureContainer = topAccountsByFeatureContainer { + topAccountsByFeatureDecoded0 = [GuardDutyClientTypes.UsageTopAccountsResult]() + for structure0 in topAccountsByFeatureContainer { + if let structure0 = structure0 { + topAccountsByFeatureDecoded0?.append(structure0) + } + } + } + topAccountsByFeature = topAccountsByFeatureDecoded0 let sumByDataSourceContainer = try containerValues.decodeIfPresent([GuardDutyClientTypes.UsageDataSourceResult?].self, forKey: .sumByDataSource) var sumByDataSourceDecoded0:[GuardDutyClientTypes.UsageDataSourceResult]? = nil if let sumByDataSourceContainer = sumByDataSourceContainer { @@ -21352,6 +21690,8 @@ extension GuardDutyClientTypes { public var sumByFeature: [GuardDutyClientTypes.UsageFeatureResult]? /// The usage statistic sum organized by resource. public var sumByResource: [GuardDutyClientTypes.UsageResourceResult]? + /// Lists the top 50 accounts by feature that have generated the most GuardDuty usage, in the order from most to least expensive. Currently, this doesn't support RDS_LOGIN_EVENTS. + public var topAccountsByFeature: [GuardDutyClientTypes.UsageTopAccountsResult]? /// Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive. public var topResources: [GuardDutyClientTypes.UsageResourceResult]? @@ -21360,6 +21700,7 @@ extension GuardDutyClientTypes { sumByDataSource: [GuardDutyClientTypes.UsageDataSourceResult]? = nil, sumByFeature: [GuardDutyClientTypes.UsageFeatureResult]? = nil, sumByResource: [GuardDutyClientTypes.UsageResourceResult]? = nil, + topAccountsByFeature: [GuardDutyClientTypes.UsageTopAccountsResult]? = nil, topResources: [GuardDutyClientTypes.UsageResourceResult]? = nil ) { @@ -21367,12 +21708,115 @@ extension GuardDutyClientTypes { self.sumByDataSource = sumByDataSource self.sumByFeature = sumByFeature self.sumByResource = sumByResource + self.topAccountsByFeature = topAccountsByFeature self.topResources = topResources } } } +extension GuardDutyClientTypes.UsageTopAccountResult: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountId = "accountId" + case total = "total" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let accountId = self.accountId { + try encodeContainer.encode(accountId, forKey: .accountId) + } + if let total = self.total { + try encodeContainer.encode(total, forKey: .total) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) + accountId = accountIdDecoded + let totalDecoded = try containerValues.decodeIfPresent(GuardDutyClientTypes.Total.self, forKey: .total) + total = totalDecoded + } +} + +extension GuardDutyClientTypes { + /// Contains information on the total of usage based on the topmost 50 account IDs. + public struct UsageTopAccountResult: Swift.Equatable { + /// The unique account ID. + public var accountId: Swift.String? + /// Contains the total usage with the corresponding currency unit for that value. + public var total: GuardDutyClientTypes.Total? + + public init( + accountId: Swift.String? = nil, + total: GuardDutyClientTypes.Total? = nil + ) + { + self.accountId = accountId + self.total = total + } + } + +} + +extension GuardDutyClientTypes.UsageTopAccountsResult: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accounts = "accounts" + case feature = "feature" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let accounts = accounts { + var accountsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .accounts) + for usagetopaccountresult0 in accounts { + try accountsContainer.encode(usagetopaccountresult0) + } + } + if let feature = self.feature { + try encodeContainer.encode(feature.rawValue, forKey: .feature) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let featureDecoded = try containerValues.decodeIfPresent(GuardDutyClientTypes.UsageFeature.self, forKey: .feature) + feature = featureDecoded + let accountsContainer = try containerValues.decodeIfPresent([GuardDutyClientTypes.UsageTopAccountResult?].self, forKey: .accounts) + var accountsDecoded0:[GuardDutyClientTypes.UsageTopAccountResult]? = nil + if let accountsContainer = accountsContainer { + accountsDecoded0 = [GuardDutyClientTypes.UsageTopAccountResult]() + for structure0 in accountsContainer { + if let structure0 = structure0 { + accountsDecoded0?.append(structure0) + } + } + } + accounts = accountsDecoded0 + } +} + +extension GuardDutyClientTypes { + /// Information about the usage statistics, calculated by top accounts by feature. + public struct UsageTopAccountsResult: Swift.Equatable { + /// The accounts that contributed to the total usage cost. + public var accounts: [GuardDutyClientTypes.UsageTopAccountResult]? + /// Features by which you can generate the usage statistics. RDS_LOGIN_EVENTS is currently not supported with topAccountsByFeature. + public var feature: GuardDutyClientTypes.UsageFeature? + + public init( + accounts: [GuardDutyClientTypes.UsageTopAccountResult]? = nil, + feature: GuardDutyClientTypes.UsageFeature? = nil + ) + { + self.accounts = accounts + self.feature = feature + } + } + +} + extension GuardDutyClientTypes.Volume: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case hostPath = "hostPath" diff --git a/Sources/Services/AWSIAM/IAMClient.swift b/Sources/Services/AWSIAM/IAMClient.swift index 2cef84b7e7c..8f47dde59cc 100644 --- a/Sources/Services/AWSIAM/IAMClient.swift +++ b/Sources/Services/AWSIAM/IAMClient.swift @@ -671,7 +671,7 @@ extension IAMClient: IAMClientProtocol { /// * A list of thumbprints of one or more server certificates that the IdP uses /// /// - /// You get all of this information from the OIDC IdP you want to use to access Amazon Web Services. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the [CreateOpenIDConnectProvider] operation to highly privileged users. + /// You get all of this information from the OIDC IdP you want to use to access Amazon Web Services. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the [CreateOpenIDConnectProvider] operation to highly privileged users. /// /// - Parameter CreateOpenIDConnectProviderInput : [no documentation found] /// @@ -7363,7 +7363,7 @@ extension IAMClient: IAMClientProtocol { /// Performs the `UpdateOpenIDConnectProviderThumbprint` operation on the `AWSIdentityManagementV20100508` service. /// - /// Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are not merged.) Typically, you need to update a thumbprint only when the identity provider certificate changes, which occurs rarely. However, if the provider's certificate does change, any attempt to assume an IAM role that specifies the OIDC provider as a principal fails until the certificate thumbprint is updated. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. Trust for the OIDC provider is derived from the provider certificate and is validated by the thumbprint. Therefore, it is best to limit access to the UpdateOpenIDConnectProviderThumbprint operation to highly privileged users. + /// Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are not merged.) Typically, you need to update a thumbprint only when the identity provider certificate changes, which occurs rarely. However, if the provider's certificate does change, any attempt to assume an IAM role that specifies the OIDC provider as a principal fails until the certificate thumbprint is updated. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. Trust for the OIDC provider is derived from the provider certificate and is validated by the thumbprint. Therefore, it is best to limit access to the UpdateOpenIDConnectProviderThumbprint operation to highly privileged users. /// /// - Parameter UpdateOpenIDConnectProviderThumbprintInput : [no documentation found] /// diff --git a/Sources/Services/AWSIAM/IAMClientProtocol.swift b/Sources/Services/AWSIAM/IAMClientProtocol.swift index b217d84ef3b..e295b577854 100644 --- a/Sources/Services/AWSIAM/IAMClientProtocol.swift +++ b/Sources/Services/AWSIAM/IAMClientProtocol.swift @@ -216,7 +216,7 @@ public protocol IAMClientProtocol { /// * A list of thumbprints of one or more server certificates that the IdP uses /// /// - /// You get all of this information from the OIDC IdP you want to use to access Amazon Web Services. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the [CreateOpenIDConnectProvider] operation to highly privileged users. + /// You get all of this information from the OIDC IdP you want to use to access Amazon Web Services. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the [CreateOpenIDConnectProvider] operation to highly privileged users. /// /// - Parameter CreateOpenIDConnectProviderInput : [no documentation found] /// @@ -2453,7 +2453,7 @@ public protocol IAMClientProtocol { func updateLoginProfile(input: UpdateLoginProfileInput) async throws -> UpdateLoginProfileOutput /// Performs the `UpdateOpenIDConnectProviderThumbprint` operation on the `AWSIdentityManagementV20100508` service. /// - /// Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are not merged.) Typically, you need to update a thumbprint only when the identity provider certificate changes, which occurs rarely. However, if the provider's certificate does change, any attempt to assume an IAM role that specifies the OIDC provider as a principal fails until the certificate thumbprint is updated. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. Trust for the OIDC provider is derived from the provider certificate and is validated by the thumbprint. Therefore, it is best to limit access to the UpdateOpenIDConnectProviderThumbprint operation to highly privileged users. + /// Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are not merged.) Typically, you need to update a thumbprint only when the identity provider certificate changes, which occurs rarely. However, if the provider's certificate does change, any attempt to assume an IAM role that specifies the OIDC provider as a principal fails until the certificate thumbprint is updated. Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. Trust for the OIDC provider is derived from the provider certificate and is validated by the thumbprint. Therefore, it is best to limit access to the UpdateOpenIDConnectProviderThumbprint operation to highly privileged users. /// /// - Parameter UpdateOpenIDConnectProviderThumbprintInput : [no documentation found] /// diff --git a/Sources/Services/AWSIoT/IoTClient.swift b/Sources/Services/AWSIoT/IoTClient.swift index 1b817d56b0c..0520aad019b 100644 --- a/Sources/Services/AWSIoT/IoTClient.swift +++ b/Sources/Services/AWSIoT/IoTClient.swift @@ -11881,6 +11881,7 @@ extension IoTClient: IoTClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `ConflictException` : A resource with the same name already exists. /// - `InternalServerException` : Internal error from the service that indicates an unexpected error or that the service is unavailable. /// - `ResourceNotFoundException` : The specified resource does not exist. /// - `ThrottlingException` : The rate exceeds the limit. @@ -11932,6 +11933,7 @@ extension IoTClient: IoTClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `ConflictException` : A resource with the same name already exists. /// - `InternalServerException` : Internal error from the service that indicates an unexpected error or that the service is unavailable. /// - `ThrottlingException` : The rate exceeds the limit. /// - `ValidationException` : The request is not valid. @@ -11982,6 +11984,7 @@ extension IoTClient: IoTClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `ConflictException` : A resource with the same name already exists. /// - `InternalServerException` : Internal error from the service that indicates an unexpected error or that the service is unavailable. /// - `ResourceNotFoundException` : The specified resource does not exist. /// - `ThrottlingException` : The rate exceeds the limit. diff --git a/Sources/Services/AWSIoT/IoTClientProtocol.swift b/Sources/Services/AWSIoT/IoTClientProtocol.swift index 6d5dbd2f3f7..7506566b14c 100644 --- a/Sources/Services/AWSIoT/IoTClientProtocol.swift +++ b/Sources/Services/AWSIoT/IoTClientProtocol.swift @@ -4193,6 +4193,7 @@ public protocol IoTClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `ConflictException` : A resource with the same name already exists. /// - `InternalServerException` : Internal error from the service that indicates an unexpected error or that the service is unavailable. /// - `ResourceNotFoundException` : The specified resource does not exist. /// - `ThrottlingException` : The rate exceeds the limit. @@ -4209,6 +4210,7 @@ public protocol IoTClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `ConflictException` : A resource with the same name already exists. /// - `InternalServerException` : Internal error from the service that indicates an unexpected error or that the service is unavailable. /// - `ThrottlingException` : The rate exceeds the limit. /// - `ValidationException` : The request is not valid. @@ -4224,6 +4226,7 @@ public protocol IoTClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `ConflictException` : A resource with the same name already exists. /// - `InternalServerException` : Internal error from the service that indicates an unexpected error or that the service is unavailable. /// - `ResourceNotFoundException` : The specified resource does not exist. /// - `ThrottlingException` : The rate exceeds the limit. diff --git a/Sources/Services/AWSIoT/models/Models.swift b/Sources/Services/AWSIoT/models/Models.swift index 7bb8e2ecda3..82b0bfd826d 100644 --- a/Sources/Services/AWSIoT/models/Models.swift +++ b/Sources/Services/AWSIoT/models/Models.swift @@ -8308,7 +8308,7 @@ public struct CreateJobInput: Swift.Equatable { public var abortConfig: IoTClientTypes.AbortConfig? /// A short text description of the job. public var description: Swift.String? - /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. + /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle). Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. public var destinationPackageVersions: [Swift.String]? /// The job document. Required if you don't specify a value for documentSource. public var document: Swift.String? @@ -8650,7 +8650,7 @@ public struct CreateJobTemplateInput: Swift.Equatable { /// A description of the job document. /// This member is required. public var description: Swift.String? - /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. + /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle). Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. public var destinationPackageVersions: [Swift.String]? /// The job document. Required if you don't specify a value for documentSource. public var document: Swift.String? @@ -17498,7 +17498,7 @@ public struct DescribeJobTemplateOutput: Swift.Equatable { public var createdAt: ClientRuntime.Date? /// A description of the job template. public var description: Swift.String? - /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. + /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle). Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. public var destinationPackageVersions: [Swift.String]? /// The job document. public var document: Swift.String? @@ -18033,7 +18033,7 @@ extension DescribeProvisioningTemplateOutput: ClientRuntime.HttpResponseBinding self.creationDate = nil self.defaultVersionId = nil self.description = nil - self.enabled = false + self.enabled = nil self.lastModifiedDate = nil self.preProvisioningHook = nil self.provisioningRoleArn = nil @@ -18053,7 +18053,7 @@ public struct DescribeProvisioningTemplateOutput: Swift.Equatable { /// The description of the provisioning template. public var description: Swift.String? /// True if the provisioning template is enabled, otherwise false. - public var enabled: Swift.Bool + public var enabled: Swift.Bool? /// The date when the provisioning template was last modified. public var lastModifiedDate: ClientRuntime.Date? /// Gets information about a pre-provisioned hook. @@ -18073,7 +18073,7 @@ public struct DescribeProvisioningTemplateOutput: Swift.Equatable { creationDate: ClientRuntime.Date? = nil, defaultVersionId: Swift.Int? = nil, description: Swift.String? = nil, - enabled: Swift.Bool = false, + enabled: Swift.Bool? = nil, lastModifiedDate: ClientRuntime.Date? = nil, preProvisioningHook: IoTClientTypes.ProvisioningHook? = nil, provisioningRoleArn: Swift.String? = nil, @@ -18105,7 +18105,7 @@ struct DescribeProvisioningTemplateOutputBody: Swift.Equatable { let lastModifiedDate: ClientRuntime.Date? let defaultVersionId: Swift.Int? let templateBody: Swift.String? - let enabled: Swift.Bool + let enabled: Swift.Bool? let provisioningRoleArn: Swift.String? let preProvisioningHook: IoTClientTypes.ProvisioningHook? let type: IoTClientTypes.TemplateType? @@ -18142,7 +18142,7 @@ extension DescribeProvisioningTemplateOutputBody: Swift.Decodable { defaultVersionId = defaultVersionIdDecoded let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) templateBody = templateBodyDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false + let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) enabled = enabledDecoded let provisioningRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .provisioningRoleArn) provisioningRoleArn = provisioningRoleArnDecoded @@ -25564,7 +25564,7 @@ extension IoTClientTypes { public var createdAt: ClientRuntime.Date? /// A short text description of the job. public var description: Swift.String? - /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. + /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle).The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle). Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed. public var destinationPackageVersions: [Swift.String]? /// A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job. documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them. public var documentParameters: [Swift.String:Swift.String]? @@ -35504,8 +35504,6 @@ extension IoTClientTypes { public enum LogTargetType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case clientId case `default` - case deviceDefender - case eventType case principalId case sourceIp case thingGroup @@ -35515,8 +35513,6 @@ extension IoTClientTypes { return [ .clientId, .default, - .deviceDefender, - .eventType, .principalId, .sourceIp, .thingGroup, @@ -35531,8 +35527,6 @@ extension IoTClientTypes { switch self { case .clientId: return "CLIENT_ID" case .default: return "DEFAULT" - case .deviceDefender: return "DEVICE_DEFENDER" - case .eventType: return "EVENT_TYPE" case .principalId: return "PRINCIPAL_ID" case .sourceIp: return "SOURCE_IP" case .thingGroup: return "THING_GROUP" @@ -37931,7 +37925,7 @@ extension IoTClientTypes.ProvisioningTemplateSummary: Swift.Codable { if let description = self.description { try encodeContainer.encode(description, forKey: .description) } - if enabled != false { + if let enabled = self.enabled { try encodeContainer.encode(enabled, forKey: .enabled) } if let lastModifiedDate = self.lastModifiedDate { @@ -37960,7 +37954,7 @@ extension IoTClientTypes.ProvisioningTemplateSummary: Swift.Codable { creationDate = creationDateDecoded let lastModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastModifiedDate) lastModifiedDate = lastModifiedDateDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false + let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) enabled = enabledDecoded let typeDecoded = try containerValues.decodeIfPresent(IoTClientTypes.TemplateType.self, forKey: .type) type = typeDecoded @@ -37975,7 +37969,7 @@ extension IoTClientTypes { /// The description of the provisioning template. public var description: Swift.String? /// True if the fleet provision template is enabled, otherwise false. - public var enabled: Swift.Bool + public var enabled: Swift.Bool? /// The date when the provisioning template summary was last modified. public var lastModifiedDate: ClientRuntime.Date? /// The ARN of the provisioning template. @@ -37988,7 +37982,7 @@ extension IoTClientTypes { public init( creationDate: ClientRuntime.Date? = nil, description: Swift.String? = nil, - enabled: Swift.Bool = false, + enabled: Swift.Bool? = nil, lastModifiedDate: ClientRuntime.Date? = nil, templateArn: Swift.String? = nil, templateName: Swift.String? = nil, @@ -44147,7 +44141,7 @@ extension IoTClientTypes.ThingConnectivity: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) - if connected != false { + if let connected = self.connected { try encodeContainer.encode(connected, forKey: .connected) } if let disconnectReason = self.disconnectReason { @@ -44160,7 +44154,7 @@ extension IoTClientTypes.ThingConnectivity: Swift.Codable { public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let connectedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .connected) ?? false + let connectedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .connected) connected = connectedDecoded let timestampDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .timestamp) timestamp = timestampDecoded @@ -44173,14 +44167,14 @@ extension IoTClientTypes { /// The connectivity status of the thing. public struct ThingConnectivity: Swift.Equatable { /// True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not connected. - public var connected: Swift.Bool + public var connected: Swift.Bool? /// The reason why the client is disconnected. If the thing has been disconnected for approximately an hour, the disconnectReason value might be missing. public var disconnectReason: Swift.String? /// The epoch time (in milliseconds) when the thing last connected or disconnected. If the thing has been disconnected for approximately an hour, the time value might be missing. public var timestamp: Swift.Int? public init( - connected: Swift.Bool = false, + connected: Swift.Bool? = nil, disconnectReason: Swift.String? = nil, timestamp: Swift.Int? = nil ) @@ -48757,6 +48751,7 @@ enum UpdatePackageConfigurationOutputError: ClientRuntime.HttpResponseErrorBindi let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) let requestID = httpResponse.requestId switch restJSONError.errorType { + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) @@ -48881,6 +48876,7 @@ enum UpdatePackageOutputError: ClientRuntime.HttpResponseErrorBinding { let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) let requestID = httpResponse.requestId switch restJSONError.errorType { + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) @@ -49026,6 +49022,7 @@ enum UpdatePackageVersionOutputError: ClientRuntime.HttpResponseErrorBinding { let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) let requestID = httpResponse.requestId switch restJSONError.errorType { + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) diff --git a/Sources/Services/AWSIoTFleetWise/models/Models.swift b/Sources/Services/AWSIoTFleetWise/models/Models.swift index 7a897d71b0d..525a277ce29 100644 --- a/Sources/Services/AWSIoTFleetWise/models/Models.swift +++ b/Sources/Services/AWSIoTFleetWise/models/Models.swift @@ -1363,7 +1363,7 @@ extension IoTFleetWiseClientTypes { public struct ConditionBasedCollectionScheme: Swift.Equatable { /// Specifies the version of the conditional expression language. public var conditionLanguageVersion: Swift.Int? - /// The logical expression used to recognize what data to collect. For example, $variable.Vehicle.OutsideAirTemperature >= 105.0. + /// The logical expression used to recognize what data to collect. For example, $variable.`Vehicle.OutsideAirTemperature` >= 105.0. /// This member is required. public var expression: Swift.String? /// The minimum duration of time between two triggering events to collect data, in milliseconds. If a signal changes often, you might want to collect data at a slower rate. @@ -7792,16 +7792,20 @@ public struct ListSignalCatalogNodesInput: Swift.Equatable { public var name: Swift.String? /// A pagination token for the next set of results. If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next set of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value. public var nextToken: Swift.String? + /// The type of node in the signal catalog. + public var signalNodeType: IoTFleetWiseClientTypes.SignalNodeType? public init( maxResults: Swift.Int? = nil, name: Swift.String? = nil, - nextToken: Swift.String? = nil + nextToken: Swift.String? = nil, + signalNodeType: IoTFleetWiseClientTypes.SignalNodeType? = nil ) { self.maxResults = maxResults self.name = name self.nextToken = nextToken + self.signalNodeType = signalNodeType } } @@ -8713,7 +8717,6 @@ extension IoTFleetWiseClientTypes { public enum NetworkInterfaceFailureReason: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case canNetworkInterfaceInfoIsNull case conflictingNetworkInterface - case customerDecodedSignalNetworkInterfaceInfoIsNull case duplicateInterface case networkInterfaceToAddAlreadyExists case networkInterfaceToRemoveAssociatedWithSignals @@ -8725,7 +8728,6 @@ extension IoTFleetWiseClientTypes { return [ .canNetworkInterfaceInfoIsNull, .conflictingNetworkInterface, - .customerDecodedSignalNetworkInterfaceInfoIsNull, .duplicateInterface, .networkInterfaceToAddAlreadyExists, .networkInterfaceToRemoveAssociatedWithSignals, @@ -8742,7 +8744,6 @@ extension IoTFleetWiseClientTypes { switch self { case .canNetworkInterfaceInfoIsNull: return "CAN_NETWORK_INTERFACE_INFO_IS_NULL" case .conflictingNetworkInterface: return "CONFLICTING_NETWORK_INTERFACE" - case .customerDecodedSignalNetworkInterfaceInfoIsNull: return "CUSTOMER_DECODED_SIGNAL_NETWORK_INTERFACE_INFO_IS_NULL" case .duplicateInterface: return "DUPLICATE_NETWORK_INTERFACE" case .networkInterfaceToAddAlreadyExists: return "NETWORK_INTERFACE_TO_ADD_ALREADY_EXISTS" case .networkInterfaceToRemoveAssociatedWithSignals: return "NETWORK_INTERFACE_TO_REMOVE_ASSOCIATED_WITH_SIGNALS" @@ -8762,7 +8763,6 @@ extension IoTFleetWiseClientTypes { extension IoTFleetWiseClientTypes { public enum NetworkInterfaceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case canInterface - case customerDecodedInterface case obdInterface case vehicleMiddleware case sdkUnknown(Swift.String) @@ -8770,7 +8770,6 @@ extension IoTFleetWiseClientTypes { public static var allCases: [NetworkInterfaceType] { return [ .canInterface, - .customerDecodedInterface, .obdInterface, .vehicleMiddleware, .sdkUnknown("") @@ -8783,7 +8782,6 @@ extension IoTFleetWiseClientTypes { public var rawValue: Swift.String { switch self { case .canInterface: return "CAN_INTERFACE" - case .customerDecodedInterface: return "CUSTOMER_DECODED_INTERFACE" case .obdInterface: return "OBD_INTERFACE" case .vehicleMiddleware: return "VEHICLE_MIDDLEWARE" case let .sdkUnknown(s): return s @@ -10374,7 +10372,6 @@ extension IoTFleetWiseClientTypes { public enum SignalDecoderFailureReason: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case canSignalInfoIsNull case conflictingSignal - case customerDecodedSignalInfoIsNull case duplicateSignal case emptyMessageSignal case messageSignalInfoIsNull @@ -10394,7 +10391,6 @@ extension IoTFleetWiseClientTypes { return [ .canSignalInfoIsNull, .conflictingSignal, - .customerDecodedSignalInfoIsNull, .duplicateSignal, .emptyMessageSignal, .messageSignalInfoIsNull, @@ -10419,7 +10415,6 @@ extension IoTFleetWiseClientTypes { switch self { case .canSignalInfoIsNull: return "CAN_SIGNAL_INFO_IS_NULL" case .conflictingSignal: return "CONFLICTING_SIGNAL" - case .customerDecodedSignalInfoIsNull: return "CUSTOMER_DECODED_SIGNAL_INFO_IS_NULL" case .duplicateSignal: return "DUPLICATE_SIGNAL" case .emptyMessageSignal: return "EMPTY_MESSAGE_SIGNAL" case .messageSignalInfoIsNull: return "MESSAGE_SIGNAL_INFO_IS_NULL" @@ -10447,7 +10442,6 @@ extension IoTFleetWiseClientTypes { extension IoTFleetWiseClientTypes { public enum SignalDecoderType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case canSignal - case customerDecodedSignal case messageSignal case obdSignal case sdkUnknown(Swift.String) @@ -10455,7 +10449,6 @@ extension IoTFleetWiseClientTypes { public static var allCases: [SignalDecoderType] { return [ .canSignal, - .customerDecodedSignal, .messageSignal, .obdSignal, .sdkUnknown("") @@ -10468,7 +10461,6 @@ extension IoTFleetWiseClientTypes { public var rawValue: Swift.String { switch self { case .canSignal: return "CAN_SIGNAL" - case .customerDecodedSignal: return "CUSTOMER_DECODED_SIGNAL" case .messageSignal: return "MESSAGE_SIGNAL" case .obdSignal: return "OBD_SIGNAL" case let .sdkUnknown(s): return s @@ -10538,6 +10530,50 @@ extension IoTFleetWiseClientTypes { } +extension IoTFleetWiseClientTypes { + public enum SignalNodeType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case actuator + case attribute + case branch + case customProperty + case customStruct + case sensor + case sdkUnknown(Swift.String) + + public static var allCases: [SignalNodeType] { + return [ + .actuator, + .attribute, + .branch, + .customProperty, + .customStruct, + .sensor, + .sdkUnknown("") + ] + } + 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 .actuator: return "ACTUATOR" + case .attribute: return "ATTRIBUTE" + case .branch: return "BRANCH" + case .customProperty: return "CUSTOM_PROPERTY" + case .customStruct: return "CUSTOM_STRUCT" + case .sensor: return "SENSOR" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = SignalNodeType(rawValue: rawValue) ?? SignalNodeType.sdkUnknown(rawValue) + } + } +} + extension IoTFleetWiseClientTypes { public enum SpoolingMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case off @@ -13155,6 +13191,7 @@ extension IoTFleetWiseClientTypes { extension IoTFleetWiseClientTypes.VehicleSummary: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn + case attributes case creationTime case decoderManifestArn case lastModificationTime @@ -13167,6 +13204,12 @@ extension IoTFleetWiseClientTypes.VehicleSummary: Swift.Codable { if let arn = self.arn { try encodeContainer.encode(arn, forKey: .arn) } + if let attributes = attributes { + var attributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .attributes) + for (dictKey0, attributesMap0) in attributes { + try attributesContainer.encode(attributesMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } if let creationTime = self.creationTime { try encodeContainer.encodeTimestamp(creationTime, format: .epochSeconds, forKey: .creationTime) } @@ -13198,6 +13241,17 @@ extension IoTFleetWiseClientTypes.VehicleSummary: Swift.Codable { creationTime = creationTimeDecoded let lastModificationTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .lastModificationTime) lastModificationTime = lastModificationTimeDecoded + let attributesContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .attributes) + var attributesDecoded0: [Swift.String:Swift.String]? = nil + if let attributesContainer = attributesContainer { + attributesDecoded0 = [Swift.String:Swift.String]() + for (key0, attributevalue0) in attributesContainer { + if let attributevalue0 = attributevalue0 { + attributesDecoded0?[key0] = attributevalue0 + } + } + } + attributes = attributesDecoded0 } } @@ -13207,6 +13261,8 @@ extension IoTFleetWiseClientTypes { /// The Amazon Resource Name (ARN) of the vehicle. /// This member is required. public var arn: Swift.String? + /// Static information about a vehicle in a key-value pair. For example: "engineType" : "1.3 L R2" + public var attributes: [Swift.String:Swift.String]? /// The time the vehicle was created in seconds since epoch (January 1, 1970 at midnight UTC time). /// This member is required. public var creationTime: ClientRuntime.Date? @@ -13225,6 +13281,7 @@ extension IoTFleetWiseClientTypes { public init( arn: Swift.String? = nil, + attributes: [Swift.String:Swift.String]? = nil, creationTime: ClientRuntime.Date? = nil, decoderManifestArn: Swift.String? = nil, lastModificationTime: ClientRuntime.Date? = nil, @@ -13233,6 +13290,7 @@ extension IoTFleetWiseClientTypes { ) { self.arn = arn + self.attributes = attributes self.creationTime = creationTime self.decoderManifestArn = decoderManifestArn self.lastModificationTime = lastModificationTime diff --git a/Sources/Services/AWSKMS/KMSClient.swift b/Sources/Services/AWSKMS/KMSClient.swift index d0e7db65c19..38bac53f461 100644 --- a/Sources/Services/AWSKMS/KMSClient.swift +++ b/Sources/Services/AWSKMS/KMSClient.swift @@ -327,13 +327,13 @@ extension KMSClient: KMSClientProtocol { /// - `KMSInternalException` : The request was rejected because an internal exception occurred. The request can be retried. /// - `LimitExceededException` : The request was rejected because a quota was exceeded. For more information, see [Quotas](https://docs.aws.amazon.com/kms/latest/developerguide/limits.html) in the Key Management Service Developer Guide. /// - `XksProxyIncorrectAuthenticationCredentialException` : The request was rejected because the proxy credentials failed to authenticate to the specified external key store proxy. The specified external key store proxy rejected a status request from KMS due to invalid credentials. This can indicate an error in the credentials or in the identification of the external key store proxy. - /// - `XksProxyInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message. + /// - `XksProxyInvalidConfigurationException` : The request was rejected because the external key store proxy is not configured correctly. To identify the cause, see the error message that accompanies the exception. /// - `XksProxyInvalidResponseException` : KMS cannot interpret the response it received from the external key store proxy. The problem might be a poorly constructed response, but it could also be a transient network issue. If you see this error repeatedly, report it to the proxy vendor. - /// - `XksProxyUriEndpointInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy address. - /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy API address. + /// - `XksProxyUriEndpointInUseException` : The request was rejected because the XksProxyUriEndpoint is already associated with another external key store in this Amazon Web Services Region. To identify the cause, see the error message that accompanies the exception. + /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a unique external key store proxy API address. /// - `XksProxyUriUnreachableException` : KMS was unable to reach the specified XksProxyUriPath. The path must be reachable before you create the external key store or update its settings. This exception is also thrown when the external key store proxy response to a GetHealthStatus request indicates that all external key manager instances are unavailable. - /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service. - /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. + /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a different Amazon VPC endpoint service. + /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store. To identify the cause, see the error message that accompanies the exception and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. /// - `XksProxyVpcEndpointServiceNotFoundException` : The request was rejected because KMS could not find the specified VPC endpoint service. Use [DescribeCustomKeyStores] to verify the VPC endpoint service name for the external key store. Also, confirm that the Allow principals list for the VPC endpoint service includes the KMS service principal for the Region, such as cks.kms.us-east-1.amazonaws.com. public func createCustomKeyStore(input: CreateCustomKeyStoreInput) async throws -> CreateCustomKeyStoreOutput { @@ -496,7 +496,7 @@ extension KMSClient: KMSClientProtocol { /// - `MalformedPolicyDocumentException` : The request was rejected because the specified policy is not syntactically or semantically correct. /// - `TagException` : The request was rejected because one or more tags are not valid. /// - `UnsupportedOperationException` : The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation. - /// - `XksKeyAlreadyInUseException` : The request was rejected because the (XksKeyId) is already associated with a KMS key in this external key store. Each KMS key in an external key store must be associated with a different external key. + /// - `XksKeyAlreadyInUseException` : The request was rejected because the (XksKeyId) is already associated with another KMS key in this external key store. Each KMS key in an external key store must be associated with a different external key. /// - `XksKeyInvalidConfigurationException` : The request was rejected because the external key specified by the XksKeyId parameter did not meet the configuration requirements for an external key store. The external key must be an AES-256 symmetric key that is enabled and performs encryption and decryption. /// - `XksKeyNotFoundException` : The request was rejected because the external key store proxy could not find the external key. This exception is thrown when the value of the XksKeyId parameter doesn't identify a key in the external key manager associated with the external key proxy. Verify that the XksKeyId represents an existing key in the external key manager. Use the key identifier that the external key store proxy uses to identify the key. For details, see the documentation provided with your external key store proxy or key manager. public func createKey(input: CreateKeyInput) async throws -> CreateKeyOutput @@ -3360,13 +3360,13 @@ extension KMSClient: KMSClientProtocol { /// - `CustomKeyStoreNotFoundException` : The request was rejected because KMS cannot find a custom key store with the specified key store name or ID. /// - `KMSInternalException` : The request was rejected because an internal exception occurred. The request can be retried. /// - `XksProxyIncorrectAuthenticationCredentialException` : The request was rejected because the proxy credentials failed to authenticate to the specified external key store proxy. The specified external key store proxy rejected a status request from KMS due to invalid credentials. This can indicate an error in the credentials or in the identification of the external key store proxy. - /// - `XksProxyInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message. + /// - `XksProxyInvalidConfigurationException` : The request was rejected because the external key store proxy is not configured correctly. To identify the cause, see the error message that accompanies the exception. /// - `XksProxyInvalidResponseException` : KMS cannot interpret the response it received from the external key store proxy. The problem might be a poorly constructed response, but it could also be a transient network issue. If you see this error repeatedly, report it to the proxy vendor. - /// - `XksProxyUriEndpointInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy address. - /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy API address. + /// - `XksProxyUriEndpointInUseException` : The request was rejected because the XksProxyUriEndpoint is already associated with another external key store in this Amazon Web Services Region. To identify the cause, see the error message that accompanies the exception. + /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a unique external key store proxy API address. /// - `XksProxyUriUnreachableException` : KMS was unable to reach the specified XksProxyUriPath. The path must be reachable before you create the external key store or update its settings. This exception is also thrown when the external key store proxy response to a GetHealthStatus request indicates that all external key manager instances are unavailable. - /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service. - /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. + /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a different Amazon VPC endpoint service. + /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store. To identify the cause, see the error message that accompanies the exception and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. /// - `XksProxyVpcEndpointServiceNotFoundException` : The request was rejected because KMS could not find the specified VPC endpoint service. Use [DescribeCustomKeyStores] to verify the VPC endpoint service name for the external key store. Also, confirm that the Allow principals list for the VPC endpoint service includes the KMS service principal for the Region, such as cks.kms.us-east-1.amazonaws.com. public func updateCustomKeyStore(input: UpdateCustomKeyStoreInput) async throws -> UpdateCustomKeyStoreOutput { diff --git a/Sources/Services/AWSKMS/KMSClientProtocol.swift b/Sources/Services/AWSKMS/KMSClientProtocol.swift index 055571e72de..e3f2bb00203 100644 --- a/Sources/Services/AWSKMS/KMSClientProtocol.swift +++ b/Sources/Services/AWSKMS/KMSClientProtocol.swift @@ -179,13 +179,13 @@ public protocol KMSClientProtocol { /// - `KMSInternalException` : The request was rejected because an internal exception occurred. The request can be retried. /// - `LimitExceededException` : The request was rejected because a quota was exceeded. For more information, see [Quotas](https://docs.aws.amazon.com/kms/latest/developerguide/limits.html) in the Key Management Service Developer Guide. /// - `XksProxyIncorrectAuthenticationCredentialException` : The request was rejected because the proxy credentials failed to authenticate to the specified external key store proxy. The specified external key store proxy rejected a status request from KMS due to invalid credentials. This can indicate an error in the credentials or in the identification of the external key store proxy. - /// - `XksProxyInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message. + /// - `XksProxyInvalidConfigurationException` : The request was rejected because the external key store proxy is not configured correctly. To identify the cause, see the error message that accompanies the exception. /// - `XksProxyInvalidResponseException` : KMS cannot interpret the response it received from the external key store proxy. The problem might be a poorly constructed response, but it could also be a transient network issue. If you see this error repeatedly, report it to the proxy vendor. - /// - `XksProxyUriEndpointInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy address. - /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy API address. + /// - `XksProxyUriEndpointInUseException` : The request was rejected because the XksProxyUriEndpoint is already associated with another external key store in this Amazon Web Services Region. To identify the cause, see the error message that accompanies the exception. + /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a unique external key store proxy API address. /// - `XksProxyUriUnreachableException` : KMS was unable to reach the specified XksProxyUriPath. The path must be reachable before you create the external key store or update its settings. This exception is also thrown when the external key store proxy response to a GetHealthStatus request indicates that all external key manager instances are unavailable. - /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service. - /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. + /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a different Amazon VPC endpoint service. + /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store. To identify the cause, see the error message that accompanies the exception and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. /// - `XksProxyVpcEndpointServiceNotFoundException` : The request was rejected because KMS could not find the specified VPC endpoint service. Use [DescribeCustomKeyStores] to verify the VPC endpoint service name for the external key store. Also, confirm that the Allow principals list for the VPC endpoint service includes the KMS service principal for the Region, such as cks.kms.us-east-1.amazonaws.com. func createCustomKeyStore(input: CreateCustomKeyStoreInput) async throws -> CreateCustomKeyStoreOutput /// Performs the `CreateGrant` operation on the `TrentService` service. @@ -280,7 +280,7 @@ public protocol KMSClientProtocol { /// - `MalformedPolicyDocumentException` : The request was rejected because the specified policy is not syntactically or semantically correct. /// - `TagException` : The request was rejected because one or more tags are not valid. /// - `UnsupportedOperationException` : The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation. - /// - `XksKeyAlreadyInUseException` : The request was rejected because the (XksKeyId) is already associated with a KMS key in this external key store. Each KMS key in an external key store must be associated with a different external key. + /// - `XksKeyAlreadyInUseException` : The request was rejected because the (XksKeyId) is already associated with another KMS key in this external key store. Each KMS key in an external key store must be associated with a different external key. /// - `XksKeyInvalidConfigurationException` : The request was rejected because the external key specified by the XksKeyId parameter did not meet the configuration requirements for an external key store. The external key must be an AES-256 symmetric key that is enabled and performs encryption and decryption. /// - `XksKeyNotFoundException` : The request was rejected because the external key store proxy could not find the external key. This exception is thrown when the value of the XksKeyId parameter doesn't identify a key in the external key manager associated with the external key proxy. Verify that the XksKeyId represents an existing key in the external key manager. Use the key identifier that the external key store proxy uses to identify the key. For details, see the documentation provided with your external key store proxy or key manager. func createKey(input: CreateKeyInput) async throws -> CreateKeyOutput @@ -1784,13 +1784,13 @@ public protocol KMSClientProtocol { /// - `CustomKeyStoreNotFoundException` : The request was rejected because KMS cannot find a custom key store with the specified key store name or ID. /// - `KMSInternalException` : The request was rejected because an internal exception occurred. The request can be retried. /// - `XksProxyIncorrectAuthenticationCredentialException` : The request was rejected because the proxy credentials failed to authenticate to the specified external key store proxy. The specified external key store proxy rejected a status request from KMS due to invalid credentials. This can indicate an error in the credentials or in the identification of the external key store proxy. - /// - `XksProxyInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message. + /// - `XksProxyInvalidConfigurationException` : The request was rejected because the external key store proxy is not configured correctly. To identify the cause, see the error message that accompanies the exception. /// - `XksProxyInvalidResponseException` : KMS cannot interpret the response it received from the external key store proxy. The problem might be a poorly constructed response, but it could also be a transient network issue. If you see this error repeatedly, report it to the proxy vendor. - /// - `XksProxyUriEndpointInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy address. - /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy API address. + /// - `XksProxyUriEndpointInUseException` : The request was rejected because the XksProxyUriEndpoint is already associated with another external key store in this Amazon Web Services Region. To identify the cause, see the error message that accompanies the exception. + /// - `XksProxyUriInUseException` : The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a unique external key store proxy API address. /// - `XksProxyUriUnreachableException` : KMS was unable to reach the specified XksProxyUriPath. The path must be reachable before you create the external key store or update its settings. This exception is also thrown when the external key store proxy response to a GetHealthStatus request indicates that all external key manager instances are unavailable. - /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service. - /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. + /// - `XksProxyVpcEndpointServiceInUseException` : The request was rejected because the specified Amazon VPC endpoint service is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a different Amazon VPC endpoint service. + /// - `XksProxyVpcEndpointServiceInvalidConfigurationException` : The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store. To identify the cause, see the error message that accompanies the exception and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. /// - `XksProxyVpcEndpointServiceNotFoundException` : The request was rejected because KMS could not find the specified VPC endpoint service. Use [DescribeCustomKeyStores] to verify the VPC endpoint service name for the external key store. Also, confirm that the Allow principals list for the VPC endpoint service includes the KMS service principal for the Region, such as cks.kms.us-east-1.amazonaws.com. func updateCustomKeyStore(input: UpdateCustomKeyStoreInput) async throws -> UpdateCustomKeyStoreOutput /// Performs the `UpdateKeyDescription` operation on the `TrentService` service. diff --git a/Sources/Services/AWSKMS/models/Models.swift b/Sources/Services/AWSKMS/models/Models.swift index 58ec5ea0866..afc13de9665 100644 --- a/Sources/Services/AWSKMS/models/Models.swift +++ b/Sources/Services/AWSKMS/models/Models.swift @@ -936,7 +936,7 @@ public struct CreateCustomKeyStoreInput: Swift.Equatable { /// /// * The combined XksProxyUriEndpoint and XksProxyUriPath values must be unique in the Amazon Web Services account and Region. /// - /// * An external key store with PUBLIC_ENDPOINT connectivity cannot use the same XksProxyUriEndpoint value as an external key store with VPC_ENDPOINT_SERVICE connectivity in the same Amazon Web Services Region. + /// * An external key store with PUBLIC_ENDPOINT connectivity cannot use the same XksProxyUriEndpoint value as an external key store with VPC_ENDPOINT_SERVICE connectivity in this Amazon Web Services Region. /// /// * Each external key store with VPC_ENDPOINT_SERVICE connectivity must have its own private DNS name. The XksProxyUriEndpoint value for external key stores with VPC_ENDPOINT_SERVICE connectivity (private DNS name) must be unique in the Amazon Web Services account and Region. public var xksProxyUriEndpoint: Swift.String? @@ -11793,7 +11793,7 @@ extension XksKeyAlreadyInUseException { } } -/// The request was rejected because the (XksKeyId) is already associated with a KMS key in this external key store. Each KMS key in an external key store must be associated with a different external key. +/// The request was rejected because the (XksKeyId) is already associated with another KMS key in this external key store. Each KMS key in an external key store must be associated with a different external key. public struct XksKeyAlreadyInUseException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -12212,7 +12212,7 @@ extension XksProxyInvalidConfigurationException { } } -/// The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message. +/// The request was rejected because the external key store proxy is not configured correctly. To identify the cause, see the error message that accompanies the exception. public struct XksProxyInvalidConfigurationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -12322,7 +12322,7 @@ extension XksProxyUriEndpointInUseException { } } -/// The request was rejected because the concatenation of the XksProxyUriEndpoint is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy address. +/// The request was rejected because the XksProxyUriEndpoint is already associated with another external key store in this Amazon Web Services Region. To identify the cause, see the error message that accompanies the exception. public struct XksProxyUriEndpointInUseException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -12377,7 +12377,7 @@ extension XksProxyUriInUseException { } } -/// The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an account and Region must use a unique external key store proxy API address. +/// The request was rejected because the concatenation of the XksProxyUriEndpoint and XksProxyUriPath is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a unique external key store proxy API address. public struct XksProxyUriInUseException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -12487,7 +12487,7 @@ extension XksProxyVpcEndpointServiceInUseException { } } -/// The request was rejected because the specified Amazon VPC endpoint service is already associated with an external key store in the Amazon Web Services account and Region. Each external key store in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service. +/// The request was rejected because the specified Amazon VPC endpoint service is already associated with another external key store in this Amazon Web Services Region. Each external key store in a Region must use a different Amazon VPC endpoint service. public struct XksProxyVpcEndpointServiceInUseException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -12542,7 +12542,7 @@ extension XksProxyVpcEndpointServiceInvalidConfigurationException { } } -/// The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store proxy. For details, see the exception message and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. +/// The request was rejected because the Amazon VPC endpoint service configuration does not fulfill the requirements for an external key store. To identify the cause, see the error message that accompanies the exception and [review the requirements](https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements) for Amazon VPC endpoint service connectivity for an external key store. public struct XksProxyVpcEndpointServiceInvalidConfigurationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { diff --git a/Sources/Services/AWSKeyspaces/KeyspacesClient.swift b/Sources/Services/AWSKeyspaces/KeyspacesClient.swift index 396b126f72b..08ad6751c81 100644 --- a/Sources/Services/AWSKeyspaces/KeyspacesClient.swift +++ b/Sources/Services/AWSKeyspaces/KeyspacesClient.swift @@ -78,8 +78,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. /// - `ValidationException` : The operation failed due to an invalid or malformed request. @@ -129,8 +129,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -181,8 +181,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -233,8 +233,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -285,7 +285,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -336,7 +336,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -376,6 +376,57 @@ extension KeyspacesClient: KeyspacesClientProtocol { return result } + /// Performs the `GetTableAutoScalingSettings` operation on the `KeyspacesService` service. + /// + /// Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see [Managing throughput capacity automatically with Amazon Keyspaces auto scaling](https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html) in the Amazon Keyspaces Developer Guide. + /// + /// - Parameter GetTableAutoScalingSettingsInput : [no documentation found] + /// + /// - Returns: `GetTableAutoScalingSettingsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. + /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. + /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. + /// - `ValidationException` : The operation failed due to an invalid or malformed request. + public func getTableAutoScalingSettings(input: GetTableAutoScalingSettingsInput) async throws -> GetTableAutoScalingSettingsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "getTableAutoScalingSettings") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "cassandra") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "getTableAutoScalingSettings") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "KeyspacesService.GetTableAutoScalingSettings")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTableAutoScalingSettingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `ListKeyspaces` operation on the `KeyspacesService` service. /// /// Returns a list of keyspaces. @@ -387,7 +438,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -438,7 +489,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -489,7 +540,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -531,11 +582,13 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// Performs the `RestoreTable` operation on the `KeyspacesService` service. /// - /// Restores the specified table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see [ Time window for PITR continuous backups](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window) in the Amazon Keyspaces Developer Guide. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. When you restore using point in time recovery, Amazon Keyspaces restores your source table's schema and data to the state based on the selected timestamp (day:hour:minute:second) to a new table. The Time to Live (TTL) settings are also restored to the state based on the selected timestamp. In addition to the table's schema, data, and TTL settings, RestoreTable restores the capacity mode, encryption, and point-in-time recovery settings from the source table. Unlike the table's schema data and TTL settings, which are restored based on the selected timestamp, these settings are always restored based on the table's settings as of the current time or when the table was deleted. You can also overwrite these settings during restore: + /// Restores the table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see [ Time window for PITR continuous backups](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window) in the Amazon Keyspaces Developer Guide. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. When you restore using point in time recovery, Amazon Keyspaces restores your source table's schema and data to the state based on the selected timestamp (day:hour:minute:second) to a new table. The Time to Live (TTL) settings are also restored to the state based on the selected timestamp. In addition to the table's schema, data, and TTL settings, RestoreTable restores the capacity mode, auto scaling settings, encryption settings, and point-in-time recovery settings from the source table. Unlike the table's schema data and TTL settings, which are restored based on the selected timestamp, these settings are always restored based on the table's settings as of the current time or when the table was deleted. You can also overwrite these settings during restore: /// /// * Read/write capacity mode /// - /// * Provisioned throughput capacity settings + /// * Provisioned throughput capacity units + /// + /// * Auto scaling settings /// /// * Point-in-time (PITR) settings /// @@ -544,8 +597,6 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// /// For more information, see [PITR restore settings](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings) in the Amazon Keyspaces Developer Guide. Note that the following settings are not restored, and you must configure them manually for the new table: /// - /// * Automatic scaling policies (for tables that use provisioned capacity mode) - /// /// * Identity and Access Management (IAM) policies /// /// * Amazon CloudWatch metrics and alarms @@ -557,8 +608,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -609,7 +660,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -660,8 +711,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -703,7 +754,7 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// Performs the `UpdateTable` operation on the `KeyspacesService` service. /// - /// Adds new columns to the table or updates one of the table's settings, for example capacity mode, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation. + /// Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation. /// /// - Parameter UpdateTableInput : [no documentation found] /// @@ -712,8 +763,8 @@ extension KeyspacesClient: KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. diff --git a/Sources/Services/AWSKeyspaces/KeyspacesClientProtocol.swift b/Sources/Services/AWSKeyspaces/KeyspacesClientProtocol.swift index ea6a20292c7..33f0d5cc595 100644 --- a/Sources/Services/AWSKeyspaces/KeyspacesClientProtocol.swift +++ b/Sources/Services/AWSKeyspaces/KeyspacesClientProtocol.swift @@ -15,8 +15,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. /// - `ValidationException` : The operation failed due to an invalid or malformed request. @@ -32,8 +32,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -50,8 +50,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -68,8 +68,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -86,7 +86,7 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -103,12 +103,29 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. /// - `ValidationException` : The operation failed due to an invalid or malformed request. func getTable(input: GetTableInput) async throws -> GetTableOutput + /// Performs the `GetTableAutoScalingSettings` operation on the `KeyspacesService` service. + /// + /// Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see [Managing throughput capacity automatically with Amazon Keyspaces auto scaling](https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html) in the Amazon Keyspaces Developer Guide. + /// + /// - Parameter GetTableAutoScalingSettingsInput : [no documentation found] + /// + /// - Returns: `GetTableAutoScalingSettingsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. + /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. + /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. + /// - `ValidationException` : The operation failed due to an invalid or malformed request. + func getTableAutoScalingSettings(input: GetTableAutoScalingSettingsInput) async throws -> GetTableAutoScalingSettingsOutput /// Performs the `ListKeyspaces` operation on the `KeyspacesService` service. /// /// Returns a list of keyspaces. @@ -120,7 +137,7 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -137,7 +154,7 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -154,7 +171,7 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -162,11 +179,13 @@ public protocol KeyspacesClientProtocol { func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput /// Performs the `RestoreTable` operation on the `KeyspacesService` service. /// - /// Restores the specified table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see [ Time window for PITR continuous backups](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window) in the Amazon Keyspaces Developer Guide. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. When you restore using point in time recovery, Amazon Keyspaces restores your source table's schema and data to the state based on the selected timestamp (day:hour:minute:second) to a new table. The Time to Live (TTL) settings are also restored to the state based on the selected timestamp. In addition to the table's schema, data, and TTL settings, RestoreTable restores the capacity mode, encryption, and point-in-time recovery settings from the source table. Unlike the table's schema data and TTL settings, which are restored based on the selected timestamp, these settings are always restored based on the table's settings as of the current time or when the table was deleted. You can also overwrite these settings during restore: + /// Restores the table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see [ Time window for PITR continuous backups](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window) in the Amazon Keyspaces Developer Guide. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. When you restore using point in time recovery, Amazon Keyspaces restores your source table's schema and data to the state based on the selected timestamp (day:hour:minute:second) to a new table. The Time to Live (TTL) settings are also restored to the state based on the selected timestamp. In addition to the table's schema, data, and TTL settings, RestoreTable restores the capacity mode, auto scaling settings, encryption settings, and point-in-time recovery settings from the source table. Unlike the table's schema data and TTL settings, which are restored based on the selected timestamp, these settings are always restored based on the table's settings as of the current time or when the table was deleted. You can also overwrite these settings during restore: /// /// * Read/write capacity mode /// - /// * Provisioned throughput capacity settings + /// * Provisioned throughput capacity units + /// + /// * Auto scaling settings /// /// * Point-in-time (PITR) settings /// @@ -175,8 +194,6 @@ public protocol KeyspacesClientProtocol { /// /// For more information, see [PITR restore settings](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings) in the Amazon Keyspaces Developer Guide. Note that the following settings are not restored, and you must configure them manually for the new table: /// - /// * Automatic scaling policies (for tables that use provisioned capacity mode) - /// /// * Identity and Access Management (IAM) policies /// /// * Amazon CloudWatch metrics and alarms @@ -188,8 +205,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -206,7 +223,7 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -223,8 +240,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. @@ -232,7 +249,7 @@ public protocol KeyspacesClientProtocol { func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput /// Performs the `UpdateTable` operation on the `KeyspacesService` service. /// - /// Adds new columns to the table or updates one of the table's settings, for example capacity mode, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation. + /// Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation. /// /// - Parameter UpdateTableInput : [no documentation found] /// @@ -241,8 +258,8 @@ public protocol KeyspacesClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `ConflictException` : Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. + /// - `AccessDeniedException` : You don't have sufficient access permissions to perform this action. + /// - `ConflictException` : Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. /// - `InternalServerException` : Amazon Keyspaces was unable to fully process this request because of an internal server error. /// - `ResourceNotFoundException` : The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE. /// - `ServiceQuotaExceededException` : The operation exceeded the service quota for this resource. For more information on service quotas, see [Quotas](https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) in the Amazon Keyspaces Developer Guide. diff --git a/Sources/Services/AWSKeyspaces/models/Models.swift b/Sources/Services/AWSKeyspaces/models/Models.swift index df613f005cf..cd8d5852424 100644 --- a/Sources/Services/AWSKeyspaces/models/Models.swift +++ b/Sources/Services/AWSKeyspaces/models/Models.swift @@ -17,10 +17,11 @@ extension AccessDeniedException { } } -/// You do not have sufficient access to perform this action. +/// You don't have sufficient access permissions to perform this action. public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Description of the error. public internal(set) var message: Swift.String? = nil } @@ -57,6 +58,176 @@ extension AccessDeniedExceptionBody: Swift.Decodable { } } +extension KeyspacesClientTypes.AutoScalingPolicy: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case targetTrackingScalingPolicyConfiguration + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let targetTrackingScalingPolicyConfiguration = self.targetTrackingScalingPolicyConfiguration { + try encodeContainer.encode(targetTrackingScalingPolicyConfiguration, forKey: .targetTrackingScalingPolicyConfiguration) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let targetTrackingScalingPolicyConfigurationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.TargetTrackingScalingPolicyConfiguration.self, forKey: .targetTrackingScalingPolicyConfiguration) + targetTrackingScalingPolicyConfiguration = targetTrackingScalingPolicyConfigurationDecoded + } +} + +extension KeyspacesClientTypes { + /// Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90. + public struct AutoScalingPolicy: Swift.Equatable { + /// Auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. A double between 20 and 90. + public var targetTrackingScalingPolicyConfiguration: KeyspacesClientTypes.TargetTrackingScalingPolicyConfiguration? + + public init( + targetTrackingScalingPolicyConfiguration: KeyspacesClientTypes.TargetTrackingScalingPolicyConfiguration? = nil + ) + { + self.targetTrackingScalingPolicyConfiguration = targetTrackingScalingPolicyConfiguration + } + } + +} + +extension KeyspacesClientTypes.AutoScalingSettings: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingDisabled + case maximumUnits + case minimumUnits + case scalingPolicy + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if autoScalingDisabled != false { + try encodeContainer.encode(autoScalingDisabled, forKey: .autoScalingDisabled) + } + if let maximumUnits = self.maximumUnits { + try encodeContainer.encode(maximumUnits, forKey: .maximumUnits) + } + if let minimumUnits = self.minimumUnits { + try encodeContainer.encode(minimumUnits, forKey: .minimumUnits) + } + if let scalingPolicy = self.scalingPolicy { + try encodeContainer.encode(scalingPolicy, forKey: .scalingPolicy) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let autoScalingDisabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoScalingDisabled) ?? false + autoScalingDisabled = autoScalingDisabledDecoded + let minimumUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minimumUnits) + minimumUnits = minimumUnitsDecoded + let maximumUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumUnits) + maximumUnits = maximumUnitsDecoded + let scalingPolicyDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingPolicy.self, forKey: .scalingPolicy) + scalingPolicy = scalingPolicyDecoded + } +} + +extension KeyspacesClientTypes { + /// The optional auto scaling settings for a table with provisioned throughput capacity. To turn on auto scaling for a table in throughputMode:PROVISIONED, you must specify the following parameters. Configure the minimum and maximum units for write and read capacity. The auto scaling policy ensures that capacity never goes below the minimum or above the maximum range. + /// + /// * minimumUnits: The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default). + /// + /// * maximumUnits: The maximum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default). + /// + /// * scalingPolicy: Amazon Keyspaces supports the target tracking scaling policy. The auto scaling target is the provisioned read and write capacity of the table. + /// + /// * targetTrackingScalingPolicyConfiguration: To define the target tracking policy, you must define the target value. + /// + /// * targetValue: The target utilization rate of the table. Amazon Keyspaces auto scaling ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. A double between 20 and 90. (Required) + /// + /// * disableScaleIn: A boolean that specifies if scale-in is disabled or enabled for the table. This parameter is disabled by default. To turn on scale-in, set the boolean value to FALSE. This means that capacity for a table can be automatically scaled down on your behalf. (Optional) + /// + /// * scaleInCooldown: A cooldown period in seconds between scaling activities that lets the table stabilize before another scale in activity starts. If no value is provided, the default is 0. (Optional) + /// + /// * scaleOutCooldown: A cooldown period in seconds between scaling activities that lets the table stabilize before another scale out activity starts. If no value is provided, the default is 0. (Optional) + /// + /// + /// + /// + /// + /// + /// + /// + /// For more information, see [Managing throughput capacity automatically with Amazon Keyspaces auto scaling](https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html) in the Amazon Keyspaces Developer Guide. + public struct AutoScalingSettings: Swift.Equatable { + /// This optional parameter enables auto scaling for the table if set to false. + public var autoScalingDisabled: Swift.Bool + /// Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max throughput per second quota for your account (40,000 by default). + public var maximumUnits: Swift.Int? + /// The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default). + public var minimumUnits: Swift.Int? + /// Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90. + public var scalingPolicy: KeyspacesClientTypes.AutoScalingPolicy? + + public init( + autoScalingDisabled: Swift.Bool = false, + maximumUnits: Swift.Int? = nil, + minimumUnits: Swift.Int? = nil, + scalingPolicy: KeyspacesClientTypes.AutoScalingPolicy? = nil + ) + { + self.autoScalingDisabled = autoScalingDisabled + self.maximumUnits = maximumUnits + self.minimumUnits = minimumUnits + self.scalingPolicy = scalingPolicy + } + } + +} + +extension KeyspacesClientTypes.AutoScalingSpecification: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case readCapacityAutoScaling + case writeCapacityAutoScaling + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let readCapacityAutoScaling = self.readCapacityAutoScaling { + try encodeContainer.encode(readCapacityAutoScaling, forKey: .readCapacityAutoScaling) + } + if let writeCapacityAutoScaling = self.writeCapacityAutoScaling { + try encodeContainer.encode(writeCapacityAutoScaling, forKey: .writeCapacityAutoScaling) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let writeCapacityAutoScalingDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSettings.self, forKey: .writeCapacityAutoScaling) + writeCapacityAutoScaling = writeCapacityAutoScalingDecoded + let readCapacityAutoScalingDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSettings.self, forKey: .readCapacityAutoScaling) + readCapacityAutoScaling = readCapacityAutoScalingDecoded + } +} + +extension KeyspacesClientTypes { + /// The optional auto scaling settings for read and write capacity of a table in provisioned capacity mode. + public struct AutoScalingSpecification: Swift.Equatable { + /// The auto scaling settings for the table's read capacity. + public var readCapacityAutoScaling: KeyspacesClientTypes.AutoScalingSettings? + /// The auto scaling settings for the table's write capacity. + public var writeCapacityAutoScaling: KeyspacesClientTypes.AutoScalingSettings? + + public init( + readCapacityAutoScaling: KeyspacesClientTypes.AutoScalingSettings? = nil, + writeCapacityAutoScaling: KeyspacesClientTypes.AutoScalingSettings? = nil + ) + { + self.readCapacityAutoScaling = readCapacityAutoScaling + self.writeCapacityAutoScaling = writeCapacityAutoScaling + } + } + +} + extension KeyspacesClientTypes.CapacitySpecification: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case readCapacityUnits @@ -417,10 +588,11 @@ extension ConflictException { } } -/// Amazon Keyspaces could not complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. +/// Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Description of the error. public internal(set) var message: Swift.String? = nil } @@ -603,6 +775,7 @@ enum CreateKeyspaceOutputError: ClientRuntime.HttpResponseErrorBinding { extension CreateTableInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingSpecification case capacitySpecification case clientSideTimestamps case comment @@ -610,6 +783,7 @@ extension CreateTableInput: Swift.Encodable { case encryptionSpecification case keyspaceName case pointInTimeRecovery + case replicaSpecifications case schemaDefinition case tableName case tags @@ -618,6 +792,9 @@ extension CreateTableInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let autoScalingSpecification = self.autoScalingSpecification { + try encodeContainer.encode(autoScalingSpecification, forKey: .autoScalingSpecification) + } if let capacitySpecification = self.capacitySpecification { try encodeContainer.encode(capacitySpecification, forKey: .capacitySpecification) } @@ -639,6 +816,12 @@ extension CreateTableInput: Swift.Encodable { if let pointInTimeRecovery = self.pointInTimeRecovery { try encodeContainer.encode(pointInTimeRecovery, forKey: .pointInTimeRecovery) } + if let replicaSpecifications = replicaSpecifications { + var replicaSpecificationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .replicaSpecifications) + for replicaspecification0 in replicaSpecifications { + try replicaSpecificationsContainer.encode(replicaspecification0) + } + } if let schemaDefinition = self.schemaDefinition { try encodeContainer.encode(schemaDefinition, forKey: .schemaDefinition) } @@ -664,6 +847,8 @@ extension CreateTableInput: ClientRuntime.URLPathProvider { } public struct CreateTableInput: Swift.Equatable { + /// The optional auto scaling settings for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity automatically on your behalf. Auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see [Managing throughput capacity automatically with Amazon Keyspaces auto scaling](https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html) in the Amazon Keyspaces Developer Guide. By default, auto scaling is disabled for a table. + public var autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? /// Specifies the read/write throughput capacity mode for the table. The options are: /// /// * throughputMode:PAY_PER_REQUEST and @@ -705,6 +890,14 @@ public struct CreateTableInput: Swift.Equatable { /// /// If it's not specified, the default is status=DISABLED. For more information, see [Point-in-time recovery](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) in the Amazon Keyspaces Developer Guide. public var pointInTimeRecovery: KeyspacesClientTypes.PointInTimeRecovery? + /// The optional Amazon Web Services Region specific settings of a multi-Region table. These settings overwrite the general settings of the table for the specified Region. For a multi-Region table in provisioned capacity mode, you can configure the table's read capacity differently for each Region's replica. The write capacity, however, remains synchronized between all replicas to ensure that there's enough capacity to replicate writes across all Regions. To define the read capacity for a table replica in a specific Region, you can do so by configuring the following parameters. + /// + /// * region: The Region where these settings are applied. (Required) + /// + /// * readCapacityUnits: The provisioned read capacity units. (Optional) + /// + /// * readCapacityAutoScaling: The read capacity auto scaling settings for the table. (Optional) + public var replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? /// The schemaDefinition consists of the following parameters. For each column to be created: /// /// * name - The name of the column. @@ -745,6 +938,7 @@ public struct CreateTableInput: Swift.Equatable { public var ttl: KeyspacesClientTypes.TimeToLive? public init( + autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? = nil, capacitySpecification: KeyspacesClientTypes.CapacitySpecification? = nil, clientSideTimestamps: KeyspacesClientTypes.ClientSideTimestamps? = nil, comment: KeyspacesClientTypes.Comment? = nil, @@ -752,12 +946,14 @@ public struct CreateTableInput: Swift.Equatable { encryptionSpecification: KeyspacesClientTypes.EncryptionSpecification? = nil, keyspaceName: Swift.String? = nil, pointInTimeRecovery: KeyspacesClientTypes.PointInTimeRecovery? = nil, + replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? = nil, schemaDefinition: KeyspacesClientTypes.SchemaDefinition? = nil, tableName: Swift.String? = nil, tags: [KeyspacesClientTypes.Tag]? = nil, ttl: KeyspacesClientTypes.TimeToLive? = nil ) { + self.autoScalingSpecification = autoScalingSpecification self.capacitySpecification = capacitySpecification self.clientSideTimestamps = clientSideTimestamps self.comment = comment @@ -765,6 +961,7 @@ public struct CreateTableInput: Swift.Equatable { self.encryptionSpecification = encryptionSpecification self.keyspaceName = keyspaceName self.pointInTimeRecovery = pointInTimeRecovery + self.replicaSpecifications = replicaSpecifications self.schemaDefinition = schemaDefinition self.tableName = tableName self.tags = tags @@ -784,10 +981,13 @@ struct CreateTableInputBody: Swift.Equatable { let defaultTimeToLive: Swift.Int? let tags: [KeyspacesClientTypes.Tag]? let clientSideTimestamps: KeyspacesClientTypes.ClientSideTimestamps? + let autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? + let replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? } extension CreateTableInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingSpecification case capacitySpecification case clientSideTimestamps case comment @@ -795,6 +995,7 @@ extension CreateTableInputBody: Swift.Decodable { case encryptionSpecification case keyspaceName case pointInTimeRecovery + case replicaSpecifications case schemaDefinition case tableName case tags @@ -834,6 +1035,19 @@ extension CreateTableInputBody: Swift.Decodable { tags = tagsDecoded0 let clientSideTimestampsDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.ClientSideTimestamps.self, forKey: .clientSideTimestamps) clientSideTimestamps = clientSideTimestampsDecoded + let autoScalingSpecificationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSpecification.self, forKey: .autoScalingSpecification) + autoScalingSpecification = autoScalingSpecificationDecoded + let replicaSpecificationsContainer = try containerValues.decodeIfPresent([KeyspacesClientTypes.ReplicaSpecification?].self, forKey: .replicaSpecifications) + var replicaSpecificationsDecoded0:[KeyspacesClientTypes.ReplicaSpecification]? = nil + if let replicaSpecificationsContainer = replicaSpecificationsContainer { + replicaSpecificationsDecoded0 = [KeyspacesClientTypes.ReplicaSpecification]() + for structure0 in replicaSpecificationsContainer { + if let structure0 = structure0 { + replicaSpecificationsDecoded0?.append(structure0) + } + } + } + replicaSpecifications = replicaSpecificationsDecoded0 } } @@ -1292,6 +1506,174 @@ enum GetKeyspaceOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension GetTableAutoScalingSettingsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case keyspaceName + case tableName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let keyspaceName = self.keyspaceName { + try encodeContainer.encode(keyspaceName, forKey: .keyspaceName) + } + if let tableName = self.tableName { + try encodeContainer.encode(tableName, forKey: .tableName) + } + } +} + +extension GetTableAutoScalingSettingsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct GetTableAutoScalingSettingsInput: Swift.Equatable { + /// The name of the keyspace. + /// This member is required. + public var keyspaceName: Swift.String? + /// The name of the table. + /// This member is required. + public var tableName: Swift.String? + + public init( + keyspaceName: Swift.String? = nil, + tableName: Swift.String? = nil + ) + { + self.keyspaceName = keyspaceName + self.tableName = tableName + } +} + +struct GetTableAutoScalingSettingsInputBody: Swift.Equatable { + let keyspaceName: Swift.String? + let tableName: Swift.String? +} + +extension GetTableAutoScalingSettingsInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case keyspaceName + case tableName + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let keyspaceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyspaceName) + keyspaceName = keyspaceNameDecoded + let tableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tableName) + tableName = tableNameDecoded + } +} + +extension GetTableAutoScalingSettingsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: GetTableAutoScalingSettingsOutputBody = try responseDecoder.decode(responseBody: data) + self.autoScalingSpecification = output.autoScalingSpecification + self.keyspaceName = output.keyspaceName + self.replicaSpecifications = output.replicaSpecifications + self.resourceArn = output.resourceArn + self.tableName = output.tableName + } else { + self.autoScalingSpecification = nil + self.keyspaceName = nil + self.replicaSpecifications = nil + self.resourceArn = nil + self.tableName = nil + } + } +} + +public struct GetTableAutoScalingSettingsOutput: Swift.Equatable { + /// The auto scaling settings of the table. + public var autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? + /// The name of the keyspace. + /// This member is required. + public var keyspaceName: Swift.String? + /// The Amazon Web Services Region specific settings of a multi-Region table. Returns the settings for all Regions the table is replicated in. + public var replicaSpecifications: [KeyspacesClientTypes.ReplicaAutoScalingSpecification]? + /// The Amazon Resource Name (ARN) of the table. + /// This member is required. + public var resourceArn: Swift.String? + /// The name of the table. + /// This member is required. + public var tableName: Swift.String? + + public init( + autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? = nil, + keyspaceName: Swift.String? = nil, + replicaSpecifications: [KeyspacesClientTypes.ReplicaAutoScalingSpecification]? = nil, + resourceArn: Swift.String? = nil, + tableName: Swift.String? = nil + ) + { + self.autoScalingSpecification = autoScalingSpecification + self.keyspaceName = keyspaceName + self.replicaSpecifications = replicaSpecifications + self.resourceArn = resourceArn + self.tableName = tableName + } +} + +struct GetTableAutoScalingSettingsOutputBody: Swift.Equatable { + let keyspaceName: Swift.String? + let tableName: Swift.String? + let resourceArn: Swift.String? + let autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? + let replicaSpecifications: [KeyspacesClientTypes.ReplicaAutoScalingSpecification]? +} + +extension GetTableAutoScalingSettingsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingSpecification + case keyspaceName + case replicaSpecifications + case resourceArn + case tableName + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let keyspaceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyspaceName) + keyspaceName = keyspaceNameDecoded + let tableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tableName) + tableName = tableNameDecoded + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + let autoScalingSpecificationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSpecification.self, forKey: .autoScalingSpecification) + autoScalingSpecification = autoScalingSpecificationDecoded + let replicaSpecificationsContainer = try containerValues.decodeIfPresent([KeyspacesClientTypes.ReplicaAutoScalingSpecification?].self, forKey: .replicaSpecifications) + var replicaSpecificationsDecoded0:[KeyspacesClientTypes.ReplicaAutoScalingSpecification]? = nil + if let replicaSpecificationsContainer = replicaSpecificationsContainer { + replicaSpecificationsDecoded0 = [KeyspacesClientTypes.ReplicaAutoScalingSpecification]() + for structure0 in replicaSpecificationsContainer { + if let structure0 = structure0 { + replicaSpecificationsDecoded0?.append(structure0) + } + } + } + replicaSpecifications = replicaSpecificationsDecoded0 + } +} + +enum GetTableAutoScalingSettingsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension GetTableInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case keyspaceName @@ -1366,6 +1748,7 @@ extension GetTableOutput: ClientRuntime.HttpResponseBinding { self.encryptionSpecification = output.encryptionSpecification self.keyspaceName = output.keyspaceName self.pointInTimeRecovery = output.pointInTimeRecovery + self.replicaSpecifications = output.replicaSpecifications self.resourceArn = output.resourceArn self.schemaDefinition = output.schemaDefinition self.status = output.status @@ -1380,6 +1763,7 @@ extension GetTableOutput: ClientRuntime.HttpResponseBinding { self.encryptionSpecification = nil self.keyspaceName = nil self.pointInTimeRecovery = nil + self.replicaSpecifications = nil self.resourceArn = nil self.schemaDefinition = nil self.status = nil @@ -1411,6 +1795,8 @@ public struct GetTableOutput: Swift.Equatable { public var keyspaceName: Swift.String? /// The point-in-time recovery status of the specified table. public var pointInTimeRecovery: KeyspacesClientTypes.PointInTimeRecoverySummary? + /// Returns the Amazon Web Services Region specific settings of all Regions a multi-Region table is replicated in. + public var replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecificationSummary]? /// The Amazon Resource Name (ARN) of the specified table. /// This member is required. public var resourceArn: Swift.String? @@ -1433,6 +1819,7 @@ public struct GetTableOutput: Swift.Equatable { encryptionSpecification: KeyspacesClientTypes.EncryptionSpecification? = nil, keyspaceName: Swift.String? = nil, pointInTimeRecovery: KeyspacesClientTypes.PointInTimeRecoverySummary? = nil, + replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecificationSummary]? = nil, resourceArn: Swift.String? = nil, schemaDefinition: KeyspacesClientTypes.SchemaDefinition? = nil, status: KeyspacesClientTypes.TableStatus? = nil, @@ -1448,6 +1835,7 @@ public struct GetTableOutput: Swift.Equatable { self.encryptionSpecification = encryptionSpecification self.keyspaceName = keyspaceName self.pointInTimeRecovery = pointInTimeRecovery + self.replicaSpecifications = replicaSpecifications self.resourceArn = resourceArn self.schemaDefinition = schemaDefinition self.status = status @@ -1470,6 +1858,7 @@ struct GetTableOutputBody: Swift.Equatable { let defaultTimeToLive: Swift.Int? let comment: KeyspacesClientTypes.Comment? let clientSideTimestamps: KeyspacesClientTypes.ClientSideTimestamps? + let replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecificationSummary]? } extension GetTableOutputBody: Swift.Decodable { @@ -1482,6 +1871,7 @@ extension GetTableOutputBody: Swift.Decodable { case encryptionSpecification case keyspaceName case pointInTimeRecovery + case replicaSpecifications case resourceArn case schemaDefinition case status @@ -1517,6 +1907,17 @@ extension GetTableOutputBody: Swift.Decodable { comment = commentDecoded let clientSideTimestampsDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.ClientSideTimestamps.self, forKey: .clientSideTimestamps) clientSideTimestamps = clientSideTimestampsDecoded + let replicaSpecificationsContainer = try containerValues.decodeIfPresent([KeyspacesClientTypes.ReplicaSpecificationSummary?].self, forKey: .replicaSpecifications) + var replicaSpecificationsDecoded0:[KeyspacesClientTypes.ReplicaSpecificationSummary]? = nil + if let replicaSpecificationsContainer = replicaSpecificationsContainer { + replicaSpecificationsDecoded0 = [KeyspacesClientTypes.ReplicaSpecificationSummary]() + for structure0 in replicaSpecificationsContainer { + if let structure0 = structure0 { + replicaSpecificationsDecoded0?.append(structure0) + } + } + } + replicaSpecifications = replicaSpecificationsDecoded0 } } @@ -1554,6 +1955,7 @@ extension InternalServerException { public struct InternalServerException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Description of the error. public internal(set) var message: Swift.String? = nil } @@ -2250,6 +2652,175 @@ extension KeyspacesClientTypes { } +extension KeyspacesClientTypes.ReplicaAutoScalingSpecification: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingSpecification + case region + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let autoScalingSpecification = self.autoScalingSpecification { + try encodeContainer.encode(autoScalingSpecification, forKey: .autoScalingSpecification) + } + if let region = self.region { + try encodeContainer.encode(region, forKey: .region) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) + region = regionDecoded + let autoScalingSpecificationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSpecification.self, forKey: .autoScalingSpecification) + autoScalingSpecification = autoScalingSpecificationDecoded + } +} + +extension KeyspacesClientTypes { + /// The auto scaling settings of a multi-Region table in the specified Amazon Web Services Region. + public struct ReplicaAutoScalingSpecification: Swift.Equatable { + /// The auto scaling settings for a multi-Region table in the specified Amazon Web Services Region. + public var autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? + /// The Amazon Web Services Region. + public var region: Swift.String? + + public init( + autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? = nil, + region: Swift.String? = nil + ) + { + self.autoScalingSpecification = autoScalingSpecification + self.region = region + } + } + +} + +extension KeyspacesClientTypes.ReplicaSpecification: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case readCapacityAutoScaling + case readCapacityUnits + case region + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let readCapacityAutoScaling = self.readCapacityAutoScaling { + try encodeContainer.encode(readCapacityAutoScaling, forKey: .readCapacityAutoScaling) + } + if let readCapacityUnits = self.readCapacityUnits { + try encodeContainer.encode(readCapacityUnits, forKey: .readCapacityUnits) + } + if let region = self.region { + try encodeContainer.encode(region, forKey: .region) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) + region = regionDecoded + let readCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .readCapacityUnits) + readCapacityUnits = readCapacityUnitsDecoded + let readCapacityAutoScalingDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSettings.self, forKey: .readCapacityAutoScaling) + readCapacityAutoScaling = readCapacityAutoScalingDecoded + } +} + +extension KeyspacesClientTypes { + /// The Amazon Web Services Region specific settings of a multi-Region table. For a multi-Region table, you can configure the table's read capacity differently per Amazon Web Services Region. You can do this by configuring the following parameters. + /// + /// * region: The Region where these settings are applied. (Required) + /// + /// * readCapacityUnits: The provisioned read capacity units. (Optional) + /// + /// * readCapacityAutoScaling: The read capacity auto scaling settings for the table. (Optional) + public struct ReplicaSpecification: Swift.Equatable { + /// The read capacity auto scaling settings for the multi-Region table in the specified Amazon Web Services Region. + public var readCapacityAutoScaling: KeyspacesClientTypes.AutoScalingSettings? + /// The provisioned read capacity units for the multi-Region table in the specified Amazon Web Services Region. + public var readCapacityUnits: Swift.Int? + /// The Amazon Web Services Region. + /// This member is required. + public var region: Swift.String? + + public init( + readCapacityAutoScaling: KeyspacesClientTypes.AutoScalingSettings? = nil, + readCapacityUnits: Swift.Int? = nil, + region: Swift.String? = nil + ) + { + self.readCapacityAutoScaling = readCapacityAutoScaling + self.readCapacityUnits = readCapacityUnits + self.region = region + } + } + +} + +extension KeyspacesClientTypes.ReplicaSpecificationSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case capacitySpecification + case region + case status + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let capacitySpecification = self.capacitySpecification { + try encodeContainer.encode(capacitySpecification, forKey: .capacitySpecification) + } + if let region = self.region { + try encodeContainer.encode(region, forKey: .region) + } + if let status = self.status { + try encodeContainer.encode(status.rawValue, forKey: .status) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) + region = regionDecoded + let statusDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.TableStatus.self, forKey: .status) + status = statusDecoded + let capacitySpecificationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.CapacitySpecificationSummary.self, forKey: .capacitySpecification) + capacitySpecification = capacitySpecificationDecoded + } +} + +extension KeyspacesClientTypes { + /// The Region-specific settings of a multi-Region table in the specified Amazon Web Services Region. If the multi-Region table is using provisioned capacity and has optional auto scaling policies configured, note that the Region specific summary returns both read and write capacity settings. But only Region specific read capacity settings can be configured for a multi-Region table. In a multi-Region table, your write capacity units will be synced across all Amazon Web Services Regions to ensure that there is enough capacity to replicate write events across Regions. + public struct ReplicaSpecificationSummary: Swift.Equatable { + /// The read/write throughput capacity mode for a table. The options are: + /// + /// * throughputMode:PAY_PER_REQUEST and + /// + /// * throughputMode:PROVISIONED. + /// + /// + /// For more information, see [Read/write capacity modes](https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) in the Amazon Keyspaces Developer Guide. + public var capacitySpecification: KeyspacesClientTypes.CapacitySpecificationSummary? + /// The Amazon Web Services Region. + public var region: Swift.String? + /// The status of the multi-Region table in the specified Amazon Web Services Region. + public var status: KeyspacesClientTypes.TableStatus? + + public init( + capacitySpecification: KeyspacesClientTypes.CapacitySpecificationSummary? = nil, + region: Swift.String? = nil, + status: KeyspacesClientTypes.TableStatus? = nil + ) + { + self.capacitySpecification = capacitySpecification + self.region = region + self.status = status + } + } + +} + extension KeyspacesClientTypes.ReplicationSpecification: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case regionList @@ -2333,6 +2904,7 @@ extension ResourceNotFoundException { public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Description of the error. public internal(set) var message: Swift.String? = nil /// The unique identifier in the format of Amazon Resource Name (ARN), for the resource not found. public internal(set) var resourceArn: Swift.String? = nil @@ -2379,9 +2951,11 @@ extension ResourceNotFoundExceptionBody: Swift.Decodable { extension RestoreTableInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingSpecification case capacitySpecificationOverride case encryptionSpecificationOverride case pointInTimeRecoveryOverride + case replicaSpecifications case restoreTimestamp case sourceKeyspaceName case sourceTableName @@ -2392,6 +2966,9 @@ extension RestoreTableInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let autoScalingSpecification = self.autoScalingSpecification { + try encodeContainer.encode(autoScalingSpecification, forKey: .autoScalingSpecification) + } if let capacitySpecificationOverride = self.capacitySpecificationOverride { try encodeContainer.encode(capacitySpecificationOverride, forKey: .capacitySpecificationOverride) } @@ -2401,6 +2978,12 @@ extension RestoreTableInput: Swift.Encodable { if let pointInTimeRecoveryOverride = self.pointInTimeRecoveryOverride { try encodeContainer.encode(pointInTimeRecoveryOverride, forKey: .pointInTimeRecoveryOverride) } + if let replicaSpecifications = replicaSpecifications { + var replicaSpecificationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .replicaSpecifications) + for replicaspecification0 in replicaSpecifications { + try replicaSpecificationsContainer.encode(replicaspecification0) + } + } if let restoreTimestamp = self.restoreTimestamp { try encodeContainer.encodeTimestamp(restoreTimestamp, format: .epochSeconds, forKey: .restoreTimestamp) } @@ -2432,6 +3015,8 @@ extension RestoreTableInput: ClientRuntime.URLPathProvider { } public struct RestoreTableInput: Swift.Equatable { + /// The optional auto scaling settings for the restored table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see [Managing throughput capacity automatically with Amazon Keyspaces auto scaling](https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html) in the Amazon Keyspaces Developer Guide. + public var autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? /// Specifies the read/write throughput capacity mode for the target table. The options are: /// /// * throughputMode:PAY_PER_REQUEST @@ -2459,6 +3044,8 @@ public struct RestoreTableInput: Swift.Equatable { /// /// If it's not specified, the default is status=DISABLED. For more information, see [Point-in-time recovery](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) in the Amazon Keyspaces Developer Guide. public var pointInTimeRecoveryOverride: KeyspacesClientTypes.PointInTimeRecovery? + /// The optional Region specific settings of a multi-Regional table. + public var replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? /// The restore timestamp in ISO 8601 format. public var restoreTimestamp: ClientRuntime.Date? /// The keyspace name of the source table. @@ -2477,9 +3064,11 @@ public struct RestoreTableInput: Swift.Equatable { public var targetTableName: Swift.String? public init( + autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? = nil, capacitySpecificationOverride: KeyspacesClientTypes.CapacitySpecification? = nil, encryptionSpecificationOverride: KeyspacesClientTypes.EncryptionSpecification? = nil, pointInTimeRecoveryOverride: KeyspacesClientTypes.PointInTimeRecovery? = nil, + replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? = nil, restoreTimestamp: ClientRuntime.Date? = nil, sourceKeyspaceName: Swift.String? = nil, sourceTableName: Swift.String? = nil, @@ -2488,9 +3077,11 @@ public struct RestoreTableInput: Swift.Equatable { targetTableName: Swift.String? = nil ) { + self.autoScalingSpecification = autoScalingSpecification self.capacitySpecificationOverride = capacitySpecificationOverride self.encryptionSpecificationOverride = encryptionSpecificationOverride self.pointInTimeRecoveryOverride = pointInTimeRecoveryOverride + self.replicaSpecifications = replicaSpecifications self.restoreTimestamp = restoreTimestamp self.sourceKeyspaceName = sourceKeyspaceName self.sourceTableName = sourceTableName @@ -2510,13 +3101,17 @@ struct RestoreTableInputBody: Swift.Equatable { let encryptionSpecificationOverride: KeyspacesClientTypes.EncryptionSpecification? let pointInTimeRecoveryOverride: KeyspacesClientTypes.PointInTimeRecovery? let tagsOverride: [KeyspacesClientTypes.Tag]? + let autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? + let replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? } extension RestoreTableInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingSpecification case capacitySpecificationOverride case encryptionSpecificationOverride case pointInTimeRecoveryOverride + case replicaSpecifications case restoreTimestamp case sourceKeyspaceName case sourceTableName @@ -2554,6 +3149,19 @@ extension RestoreTableInputBody: Swift.Decodable { } } tagsOverride = tagsOverrideDecoded0 + let autoScalingSpecificationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSpecification.self, forKey: .autoScalingSpecification) + autoScalingSpecification = autoScalingSpecificationDecoded + let replicaSpecificationsContainer = try containerValues.decodeIfPresent([KeyspacesClientTypes.ReplicaSpecification?].self, forKey: .replicaSpecifications) + var replicaSpecificationsDecoded0:[KeyspacesClientTypes.ReplicaSpecification]? = nil + if let replicaSpecificationsContainer = replicaSpecificationsContainer { + replicaSpecificationsDecoded0 = [KeyspacesClientTypes.ReplicaSpecification]() + for structure0 in replicaSpecificationsContainer { + if let structure0 = structure0 { + replicaSpecificationsDecoded0?.append(structure0) + } + } + } + replicaSpecifications = replicaSpecificationsDecoded0 } } @@ -2780,6 +3388,7 @@ extension ServiceQuotaExceededException { public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Description of the error. public internal(set) var message: Swift.String? = nil } @@ -3134,6 +3743,72 @@ enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension KeyspacesClientTypes.TargetTrackingScalingPolicyConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case disableScaleIn + case scaleInCooldown + case scaleOutCooldown + case targetValue + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if disableScaleIn != false { + try encodeContainer.encode(disableScaleIn, forKey: .disableScaleIn) + } + if scaleInCooldown != 0 { + try encodeContainer.encode(scaleInCooldown, forKey: .scaleInCooldown) + } + if scaleOutCooldown != 0 { + try encodeContainer.encode(scaleOutCooldown, forKey: .scaleOutCooldown) + } + if targetValue != 0.0 { + try encodeContainer.encode(targetValue, forKey: .targetValue) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let disableScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableScaleIn) ?? false + disableScaleIn = disableScaleInDecoded + let scaleInCooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .scaleInCooldown) ?? 0 + scaleInCooldown = scaleInCooldownDecoded + let scaleOutCooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .scaleOutCooldown) ?? 0 + scaleOutCooldown = scaleOutCooldownDecoded + let targetValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .targetValue) ?? 0.0 + targetValue = targetValueDecoded + } +} + +extension KeyspacesClientTypes { + /// The auto scaling policy that scales a table based on the ratio of consumed to provisioned capacity. + public struct TargetTrackingScalingPolicyConfiguration: Swift.Equatable { + /// Specifies if scale-in is enabled. When auto scaling automatically decreases capacity for a table, the table scales in. When scaling policies are set, they can't scale in the table lower than its minimum capacity. + public var disableScaleIn: Swift.Bool + /// Specifies a scale-in cool down period. A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts. + public var scaleInCooldown: Swift.Int + /// Specifies a scale out cool down period. A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts. + public var scaleOutCooldown: Swift.Int + /// Specifies the target value for the target tracking auto scaling policy. Amazon Keyspaces auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. This ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. A double between 20 and 90. + /// This member is required. + public var targetValue: Swift.Double + + public init( + disableScaleIn: Swift.Bool = false, + scaleInCooldown: Swift.Int = 0, + scaleOutCooldown: Swift.Int = 0, + targetValue: Swift.Double = 0.0 + ) + { + self.disableScaleIn = disableScaleIn + self.scaleInCooldown = scaleInCooldown + self.scaleOutCooldown = scaleOutCooldown + self.targetValue = targetValue + } + } + +} + extension KeyspacesClientTypes { public enum ThroughputMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case payPerRequest @@ -3333,12 +4008,14 @@ enum UntagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { extension UpdateTableInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case addColumns + case autoScalingSpecification case capacitySpecification case clientSideTimestamps case defaultTimeToLive case encryptionSpecification case keyspaceName case pointInTimeRecovery + case replicaSpecifications case tableName case ttl } @@ -3351,6 +4028,9 @@ extension UpdateTableInput: Swift.Encodable { try addColumnsContainer.encode(columndefinition0) } } + if let autoScalingSpecification = self.autoScalingSpecification { + try encodeContainer.encode(autoScalingSpecification, forKey: .autoScalingSpecification) + } if let capacitySpecification = self.capacitySpecification { try encodeContainer.encode(capacitySpecification, forKey: .capacitySpecification) } @@ -3369,6 +4049,12 @@ extension UpdateTableInput: Swift.Encodable { if let pointInTimeRecovery = self.pointInTimeRecovery { try encodeContainer.encode(pointInTimeRecovery, forKey: .pointInTimeRecovery) } + if let replicaSpecifications = replicaSpecifications { + var replicaSpecificationsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .replicaSpecifications) + for replicaspecification0 in replicaSpecifications { + try replicaSpecificationsContainer.encode(replicaspecification0) + } + } if let tableName = self.tableName { try encodeContainer.encode(tableName, forKey: .tableName) } @@ -3391,6 +4077,8 @@ public struct UpdateTableInput: Swift.Equatable { /// /// * type - An Amazon Keyspaces data type. For more information, see [Data types](https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types) in the Amazon Keyspaces Developer Guide. public var addColumns: [KeyspacesClientTypes.ColumnDefinition]? + /// The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. If auto scaling is already enabled for the table, you can use UpdateTable to update the minimum and maximum values or the auto scaling policy settings independently. For more information, see [Managing throughput capacity automatically with Amazon Keyspaces auto scaling](https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html) in the Amazon Keyspaces Developer Guide. + public var autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? /// Modifies the read/write throughput capacity mode for the table. The options are: /// /// * throughputMode:PAY_PER_REQUEST and @@ -3430,6 +4118,8 @@ public struct UpdateTableInput: Swift.Equatable { /// /// If it's not specified, the default is status=DISABLED. For more information, see [Point-in-time recovery](https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) in the Amazon Keyspaces Developer Guide. public var pointInTimeRecovery: KeyspacesClientTypes.PointInTimeRecovery? + /// The Region specific settings of a multi-Regional table. + public var replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? /// The name of the table. /// This member is required. public var tableName: Swift.String? @@ -3445,23 +4135,27 @@ public struct UpdateTableInput: Swift.Equatable { public init( addColumns: [KeyspacesClientTypes.ColumnDefinition]? = nil, + autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? = nil, capacitySpecification: KeyspacesClientTypes.CapacitySpecification? = nil, clientSideTimestamps: KeyspacesClientTypes.ClientSideTimestamps? = nil, defaultTimeToLive: Swift.Int? = nil, encryptionSpecification: KeyspacesClientTypes.EncryptionSpecification? = nil, keyspaceName: Swift.String? = nil, pointInTimeRecovery: KeyspacesClientTypes.PointInTimeRecovery? = nil, + replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? = nil, tableName: Swift.String? = nil, ttl: KeyspacesClientTypes.TimeToLive? = nil ) { self.addColumns = addColumns + self.autoScalingSpecification = autoScalingSpecification self.capacitySpecification = capacitySpecification self.clientSideTimestamps = clientSideTimestamps self.defaultTimeToLive = defaultTimeToLive self.encryptionSpecification = encryptionSpecification self.keyspaceName = keyspaceName self.pointInTimeRecovery = pointInTimeRecovery + self.replicaSpecifications = replicaSpecifications self.tableName = tableName self.ttl = ttl } @@ -3477,17 +4171,21 @@ struct UpdateTableInputBody: Swift.Equatable { let ttl: KeyspacesClientTypes.TimeToLive? let defaultTimeToLive: Swift.Int? let clientSideTimestamps: KeyspacesClientTypes.ClientSideTimestamps? + let autoScalingSpecification: KeyspacesClientTypes.AutoScalingSpecification? + let replicaSpecifications: [KeyspacesClientTypes.ReplicaSpecification]? } extension UpdateTableInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case addColumns + case autoScalingSpecification case capacitySpecification case clientSideTimestamps case defaultTimeToLive case encryptionSpecification case keyspaceName case pointInTimeRecovery + case replicaSpecifications case tableName case ttl } @@ -3521,6 +4219,19 @@ extension UpdateTableInputBody: Swift.Decodable { defaultTimeToLive = defaultTimeToLiveDecoded let clientSideTimestampsDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.ClientSideTimestamps.self, forKey: .clientSideTimestamps) clientSideTimestamps = clientSideTimestampsDecoded + let autoScalingSpecificationDecoded = try containerValues.decodeIfPresent(KeyspacesClientTypes.AutoScalingSpecification.self, forKey: .autoScalingSpecification) + autoScalingSpecification = autoScalingSpecificationDecoded + let replicaSpecificationsContainer = try containerValues.decodeIfPresent([KeyspacesClientTypes.ReplicaSpecification?].self, forKey: .replicaSpecifications) + var replicaSpecificationsDecoded0:[KeyspacesClientTypes.ReplicaSpecification]? = nil + if let replicaSpecificationsContainer = replicaSpecificationsContainer { + replicaSpecificationsDecoded0 = [KeyspacesClientTypes.ReplicaSpecification]() + for structure0 in replicaSpecificationsContainer { + if let structure0 = structure0 { + replicaSpecificationsDecoded0?.append(structure0) + } + } + } + replicaSpecifications = replicaSpecificationsDecoded0 } } @@ -3600,6 +4311,7 @@ extension ValidationException { public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { + /// Description of the error. public internal(set) var message: Swift.String? = nil } diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift index e5c1d810e94..fc4c48302ec 100644 --- a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift @@ -94,7 +94,7 @@ extension KinesisVideoArchivedMediaClient: KinesisVideoArchivedMediaClientProtoc /// - `InvalidCodecPrivateDataException` : The codec private data in at least one of the tracks of the video stream is not valid for this operation. /// - `InvalidMediaFrameException` : One or more frames in the requested clip could not be parsed based on the specified codec. /// - `MissingCodecPrivateDataException` : No codec private data was found in at least one of tracks of the video stream. - /// - `NoDataRetentionException` : A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. /// - `UnsupportedStreamMediaTypeException` : The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) could not be determined from the codec IDs of the tracks in the first fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, optionally, the codec ID for track 2 should be A_AAC. @@ -185,7 +185,7 @@ extension KinesisVideoArchivedMediaClient: KinesisVideoArchivedMediaClientProtoc /// - `InvalidArgumentException` : A specified parameter exceeds its restrictions, is not supported, or can't be used. /// - `InvalidCodecPrivateDataException` : The codec private data in at least one of the tracks of the video stream is not valid for this operation. /// - `MissingCodecPrivateDataException` : No codec private data was found in at least one of tracks of the video stream. - /// - `NoDataRetentionException` : A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. /// - `UnsupportedStreamMediaTypeException` : The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) could not be determined from the codec IDs of the tracks in the first fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, optionally, the codec ID for track 2 should be A_AAC. @@ -280,7 +280,7 @@ extension KinesisVideoArchivedMediaClient: KinesisVideoArchivedMediaClientProtoc /// - `InvalidArgumentException` : A specified parameter exceeds its restrictions, is not supported, or can't be used. /// - `InvalidCodecPrivateDataException` : The codec private data in at least one of the tracks of the video stream is not valid for this operation. /// - `MissingCodecPrivateDataException` : No codec private data was found in at least one of tracks of the video stream. - /// - `NoDataRetentionException` : A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. /// - `UnsupportedStreamMediaTypeException` : The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) could not be determined from the codec IDs of the tracks in the first fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, optionally, the codec ID for track 2 should be A_AAC. @@ -320,7 +320,7 @@ extension KinesisVideoArchivedMediaClient: KinesisVideoArchivedMediaClientProtoc /// Performs the `GetImages` operation on the `AWSAcuityReader` service. /// - /// Retrieves a list of Images corresponding to each timestamp for a given time range, sampling interval, and image format configuration. + /// Retrieves a list of images corresponding to each timestamp for a given time range, sampling interval, and image format configuration. /// /// - Parameter GetImagesInput : [no documentation found] /// @@ -331,6 +331,7 @@ extension KinesisVideoArchivedMediaClient: KinesisVideoArchivedMediaClientProtoc /// __Possible Exceptions:__ /// - `ClientLimitExceededException` : Kinesis Video Streams has throttled the request because you have exceeded a limit. Try making the call later. For information about limits, see [Kinesis Video Streams Limits](http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). /// - `InvalidArgumentException` : A specified parameter exceeds its restrictions, is not supported, or can't be used. + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. public func getImages(input: GetImagesInput) async throws -> GetImagesOutput diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClientProtocol.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClientProtocol.swift index 45b89309adb..e85ca8885d1 100644 --- a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClientProtocol.swift +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClientProtocol.swift @@ -31,7 +31,7 @@ public protocol KinesisVideoArchivedMediaClientProtocol { /// - `InvalidCodecPrivateDataException` : The codec private data in at least one of the tracks of the video stream is not valid for this operation. /// - `InvalidMediaFrameException` : One or more frames in the requested clip could not be parsed based on the specified codec. /// - `MissingCodecPrivateDataException` : No codec private data was found in at least one of tracks of the video stream. - /// - `NoDataRetentionException` : A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. /// - `UnsupportedStreamMediaTypeException` : The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) could not be determined from the codec IDs of the tracks in the first fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, optionally, the codec ID for track 2 should be A_AAC. @@ -89,7 +89,7 @@ public protocol KinesisVideoArchivedMediaClientProtocol { /// - `InvalidArgumentException` : A specified parameter exceeds its restrictions, is not supported, or can't be used. /// - `InvalidCodecPrivateDataException` : The codec private data in at least one of the tracks of the video stream is not valid for this operation. /// - `MissingCodecPrivateDataException` : No codec private data was found in at least one of tracks of the video stream. - /// - `NoDataRetentionException` : A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. /// - `UnsupportedStreamMediaTypeException` : The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) could not be determined from the codec IDs of the tracks in the first fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, optionally, the codec ID for track 2 should be A_AAC. @@ -151,14 +151,14 @@ public protocol KinesisVideoArchivedMediaClientProtocol { /// - `InvalidArgumentException` : A specified parameter exceeds its restrictions, is not supported, or can't be used. /// - `InvalidCodecPrivateDataException` : The codec private data in at least one of the tracks of the video stream is not valid for this operation. /// - `MissingCodecPrivateDataException` : No codec private data was found in at least one of tracks of the video stream. - /// - `NoDataRetentionException` : A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. /// - `UnsupportedStreamMediaTypeException` : The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) could not be determined from the codec IDs of the tracks in the first fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, optionally, the codec ID for track 2 should be A_AAC. func getHLSStreamingSessionURL(input: GetHLSStreamingSessionURLInput) async throws -> GetHLSStreamingSessionURLOutput /// Performs the `GetImages` operation on the `AWSAcuityReader` service. /// - /// Retrieves a list of Images corresponding to each timestamp for a given time range, sampling interval, and image format configuration. + /// Retrieves a list of images corresponding to each timestamp for a given time range, sampling interval, and image format configuration. /// /// - Parameter GetImagesInput : [no documentation found] /// @@ -169,6 +169,7 @@ public protocol KinesisVideoArchivedMediaClientProtocol { /// __Possible Exceptions:__ /// - `ClientLimitExceededException` : Kinesis Video Streams has throttled the request because you have exceeded a limit. Try making the call later. For information about limits, see [Kinesis Video Streams Limits](http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). /// - `InvalidArgumentException` : A specified parameter exceeds its restrictions, is not supported, or can't be used. + /// - `NoDataRetentionException` : GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). /// - `NotAuthorizedException` : Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired. /// - `ResourceNotFoundException` : GetImages will throw this error when Kinesis Video Streams can't find the stream that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested for a stream that has no fragments within the requested time range, or if a session with a PlaybackMode of LIVE is requested for a stream that has no fragments within the last 30 seconds. func getImages(input: GetImagesInput) async throws -> GetImagesOutput diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/models/Models.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/models/Models.swift index f7762ea9326..a2a1de980f3 100644 --- a/Sources/Services/AWSKinesisVideoArchivedMedia/models/Models.swift +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/models/Models.swift @@ -1304,7 +1304,7 @@ public struct GetImagesInput: Swift.Equatable { public var maxResults: Swift.Int? /// A token that specifies where to start paginating the next set of Images. This is the GetImages:NextToken from a previously truncated response. public var nextToken: Swift.String? - /// The time interval in milliseconds (ms) at which the images need to be generated from the stream, with a default of 3000 ms. The minimum value that can be provided is 200 ms. If the timestamp range is less than the sampling interval, the Image from the startTimestamp will be returned if available. The minimum value of 200 ms is a hard limit. + /// The time interval in milliseconds (ms) at which the images need to be generated from the stream. The minimum value that can be provided is 200 ms (5 images per second). If the timestamp range is less than the sampling interval, the image from the startTimestamp will be returned if available. public var samplingInterval: Swift.Int? /// The starting point from which the images should be generated. This StartTimestamp must be within an inclusive range of timestamps for an image to be returned. /// This member is required. @@ -1481,6 +1481,7 @@ enum GetImagesOutputError: ClientRuntime.HttpResponseErrorBinding { switch restJSONError.errorType { case "ClientLimitExceededException": return try await ClientLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InvalidArgumentException": return try await InvalidArgumentException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "NoDataRetentionException": return try await NoDataRetentionException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "NotAuthorizedException": return try await NotAuthorizedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) @@ -2202,7 +2203,7 @@ extension ListFragmentsInput: ClientRuntime.URLPathProvider { } public struct ListFragmentsInput: Swift.Equatable { - /// Describes the timestamp range and timestamp origin for the range of fragments to return. + /// Describes the timestamp range and timestamp origin for the range of fragments to return. This is only required when the NextToken isn't passed in the API. public var fragmentSelector: KinesisVideoArchivedMediaClientTypes.FragmentSelector? /// The total number of fragments to return. If the total number of fragments available is more than the value specified in max-results, then a [ListFragmentsOutput$NextToken] is provided in the output that you can use to resume pagination. public var maxResults: Swift.Int? @@ -2404,7 +2405,7 @@ extension NoDataRetentionException { } } -/// A streaming session was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). +/// GetImages was requested for a stream that does not retain data (that is, has a DataRetentionInHours of 0). public struct NoDataRetentionException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { diff --git a/Sources/Services/AWSLakeFormation/models/Models.swift b/Sources/Services/AWSLakeFormation/models/Models.swift index 6a8b3465887..3199d5d1da6 100644 --- a/Sources/Services/AWSLakeFormation/models/Models.swift +++ b/Sources/Services/AWSLakeFormation/models/Models.swift @@ -1647,7 +1647,7 @@ extension CreateLakeFormationIdentityCenterConfigurationInput: ClientRuntime.URL public struct CreateLakeFormationIdentityCenterConfigurationInput: Swift.Equatable { /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, view definitions, and other control information to manage your Lake Formation environment. public var catalogId: Swift.String? - /// A list of the account IDs of Amazon Web Services accounts of third-party applications that are allowed to to access data managed by Lake Formation. + /// A list of the account IDs of Amazon Web Services accounts of third-party applications that are allowed to access data managed by Lake Formation. public var externalFiltering: LakeFormationClientTypes.ExternalFilteringConfiguration? /// The ARN of the IAM Identity Center instance for which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference. public var instanceArn: Swift.String? @@ -5311,6 +5311,8 @@ extension GetTemporaryGlueTableCredentialsInput: Swift.Encodable { case auditContext = "AuditContext" case durationSeconds = "DurationSeconds" case permissions = "Permissions" + case querySessionContext = "QuerySessionContext" + case s3Path = "S3Path" case supportedPermissionTypes = "SupportedPermissionTypes" case tableArn = "TableArn" } @@ -5329,6 +5331,12 @@ extension GetTemporaryGlueTableCredentialsInput: Swift.Encodable { try permissionsContainer.encode(permission0.rawValue) } } + if let querySessionContext = self.querySessionContext { + try encodeContainer.encode(querySessionContext, forKey: .querySessionContext) + } + if let s3Path = self.s3Path { + try encodeContainer.encode(s3Path, forKey: .s3Path) + } if let supportedPermissionTypes = supportedPermissionTypes { var supportedPermissionTypesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .supportedPermissionTypes) for permissiontype0 in supportedPermissionTypes { @@ -5354,6 +5362,10 @@ public struct GetTemporaryGlueTableCredentialsInput: Swift.Equatable { public var durationSeconds: Swift.Int? /// Filters the request based on the user having been granted a list of specified permissions on the requested resource(s). public var permissions: [LakeFormationClientTypes.Permission]? + /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context. + public var querySessionContext: LakeFormationClientTypes.QuerySessionContext? + /// The Amazon S3 path for the table. + public var s3Path: Swift.String? /// A list of supported permission types for the table. Valid values are COLUMN_PERMISSION and CELL_FILTER_PERMISSION. public var supportedPermissionTypes: [LakeFormationClientTypes.PermissionType]? /// The ARN identifying a table in the Data Catalog for the temporary credentials request. @@ -5364,6 +5376,8 @@ public struct GetTemporaryGlueTableCredentialsInput: Swift.Equatable { auditContext: LakeFormationClientTypes.AuditContext? = nil, durationSeconds: Swift.Int? = nil, permissions: [LakeFormationClientTypes.Permission]? = nil, + querySessionContext: LakeFormationClientTypes.QuerySessionContext? = nil, + s3Path: Swift.String? = nil, supportedPermissionTypes: [LakeFormationClientTypes.PermissionType]? = nil, tableArn: Swift.String? = nil ) @@ -5371,6 +5385,8 @@ public struct GetTemporaryGlueTableCredentialsInput: Swift.Equatable { self.auditContext = auditContext self.durationSeconds = durationSeconds self.permissions = permissions + self.querySessionContext = querySessionContext + self.s3Path = s3Path self.supportedPermissionTypes = supportedPermissionTypes self.tableArn = tableArn } @@ -5382,6 +5398,8 @@ struct GetTemporaryGlueTableCredentialsInputBody: Swift.Equatable { let durationSeconds: Swift.Int? let auditContext: LakeFormationClientTypes.AuditContext? let supportedPermissionTypes: [LakeFormationClientTypes.PermissionType]? + let s3Path: Swift.String? + let querySessionContext: LakeFormationClientTypes.QuerySessionContext? } extension GetTemporaryGlueTableCredentialsInputBody: Swift.Decodable { @@ -5389,6 +5407,8 @@ extension GetTemporaryGlueTableCredentialsInputBody: Swift.Decodable { case auditContext = "AuditContext" case durationSeconds = "DurationSeconds" case permissions = "Permissions" + case querySessionContext = "QuerySessionContext" + case s3Path = "S3Path" case supportedPermissionTypes = "SupportedPermissionTypes" case tableArn = "TableArn" } @@ -5423,6 +5443,10 @@ extension GetTemporaryGlueTableCredentialsInputBody: Swift.Decodable { } } supportedPermissionTypes = supportedPermissionTypesDecoded0 + let s3PathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Path) + s3Path = s3PathDecoded + let querySessionContextDecoded = try containerValues.decodeIfPresent(LakeFormationClientTypes.QuerySessionContext.self, forKey: .querySessionContext) + querySessionContext = querySessionContextDecoded } } @@ -5435,11 +5459,13 @@ extension GetTemporaryGlueTableCredentialsOutput: ClientRuntime.HttpResponseBind self.expiration = output.expiration self.secretAccessKey = output.secretAccessKey self.sessionToken = output.sessionToken + self.vendedS3Path = output.vendedS3Path } else { self.accessKeyId = nil self.expiration = nil self.secretAccessKey = nil self.sessionToken = nil + self.vendedS3Path = nil } } } @@ -5453,18 +5479,22 @@ public struct GetTemporaryGlueTableCredentialsOutput: Swift.Equatable { public var secretAccessKey: Swift.String? /// The session token for the temporary credentials. public var sessionToken: Swift.String? + /// The Amazon S3 path for the temporary credentials. + public var vendedS3Path: [Swift.String]? public init( accessKeyId: Swift.String? = nil, expiration: ClientRuntime.Date? = nil, secretAccessKey: Swift.String? = nil, - sessionToken: Swift.String? = nil + sessionToken: Swift.String? = nil, + vendedS3Path: [Swift.String]? = nil ) { self.accessKeyId = accessKeyId self.expiration = expiration self.secretAccessKey = secretAccessKey self.sessionToken = sessionToken + self.vendedS3Path = vendedS3Path } } @@ -5473,6 +5503,7 @@ struct GetTemporaryGlueTableCredentialsOutputBody: Swift.Equatable { let secretAccessKey: Swift.String? let sessionToken: Swift.String? let expiration: ClientRuntime.Date? + let vendedS3Path: [Swift.String]? } extension GetTemporaryGlueTableCredentialsOutputBody: Swift.Decodable { @@ -5481,6 +5512,7 @@ extension GetTemporaryGlueTableCredentialsOutputBody: Swift.Decodable { case expiration = "Expiration" case secretAccessKey = "SecretAccessKey" case sessionToken = "SessionToken" + case vendedS3Path = "VendedS3Path" } public init(from decoder: Swift.Decoder) throws { @@ -5493,6 +5525,17 @@ extension GetTemporaryGlueTableCredentialsOutputBody: Swift.Decodable { sessionToken = sessionTokenDecoded let expirationDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .expiration) expiration = expirationDecoded + let vendedS3PathContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .vendedS3Path) + var vendedS3PathDecoded0:[Swift.String]? = nil + if let vendedS3PathContainer = vendedS3PathContainer { + vendedS3PathDecoded0 = [Swift.String]() + for string0 in vendedS3PathContainer { + if let string0 = string0 { + vendedS3PathDecoded0?.append(string0) + } + } + } + vendedS3Path = vendedS3PathDecoded0 } } @@ -8414,6 +8457,93 @@ extension LakeFormationClientTypes { } +extension LakeFormationClientTypes.QuerySessionContext: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalContext = "AdditionalContext" + case clusterId = "ClusterId" + case queryAuthorizationId = "QueryAuthorizationId" + case queryId = "QueryId" + case queryStartTime = "QueryStartTime" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let additionalContext = additionalContext { + var additionalContextContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .additionalContext) + for (dictKey0, additionalContextMap0) in additionalContext { + try additionalContextContainer.encode(additionalContextMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + if let clusterId = self.clusterId { + try encodeContainer.encode(clusterId, forKey: .clusterId) + } + if let queryAuthorizationId = self.queryAuthorizationId { + try encodeContainer.encode(queryAuthorizationId, forKey: .queryAuthorizationId) + } + if let queryId = self.queryId { + try encodeContainer.encode(queryId, forKey: .queryId) + } + if let queryStartTime = self.queryStartTime { + try encodeContainer.encodeTimestamp(queryStartTime, format: .epochSeconds, forKey: .queryStartTime) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let queryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queryId) + queryId = queryIdDecoded + let queryStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .queryStartTime) + queryStartTime = queryStartTimeDecoded + let clusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterId) + clusterId = clusterIdDecoded + let queryAuthorizationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queryAuthorizationId) + queryAuthorizationId = queryAuthorizationIdDecoded + let additionalContextContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .additionalContext) + var additionalContextDecoded0: [Swift.String:Swift.String]? = nil + if let additionalContextContainer = additionalContextContainer { + additionalContextDecoded0 = [Swift.String:Swift.String]() + for (key0, contextvalue0) in additionalContextContainer { + if let contextvalue0 = contextvalue0 { + additionalContextDecoded0?[key0] = contextvalue0 + } + } + } + additionalContext = additionalContextDecoded0 + } +} + +extension LakeFormationClientTypes { + /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context. + public struct QuerySessionContext: Swift.Equatable { + /// An opaque string-string map passed by the query engine. + public var additionalContext: [Swift.String:Swift.String]? + /// An identifier string for the consumer cluster. + public var clusterId: Swift.String? + /// A cryptographically generated query identifier generated by Glue or Lake Formation. + public var queryAuthorizationId: Swift.String? + /// A unique identifier generated by the query engine for the query. + public var queryId: Swift.String? + /// A timestamp provided by the query engine for when the query started. + public var queryStartTime: ClientRuntime.Date? + + public init( + additionalContext: [Swift.String:Swift.String]? = nil, + clusterId: Swift.String? = nil, + queryAuthorizationId: Swift.String? = nil, + queryId: Swift.String? = nil, + queryStartTime: ClientRuntime.Date? = nil + ) + { + self.additionalContext = additionalContext + self.clusterId = clusterId + self.queryAuthorizationId = queryAuthorizationId + self.queryId = queryId + self.queryStartTime = queryStartTime + } + } + +} + extension LakeFormationClientTypes { public enum QueryStateString: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case error diff --git a/Sources/Services/AWSLightsail/LightsailClient.swift b/Sources/Services/AWSLightsail/LightsailClient.swift index 4207c0e3cbc..97f087d1302 100644 --- a/Sources/Services/AWSLightsail/LightsailClient.swift +++ b/Sources/Services/AWSLightsail/LightsailClient.swift @@ -902,7 +902,7 @@ extension LightsailClient: LightsailClientProtocol { /// Performs the `CreateDisk` operation on the `Lightsail_20161128` service. /// - /// Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a). The create disk operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). + /// Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (us-east-2a). The create disk operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). /// /// - Parameter CreateDiskInput : [no documentation found] /// @@ -955,7 +955,7 @@ extension LightsailClient: LightsailClientProtocol { /// Performs the `CreateDiskFromSnapshot` operation on the `Lightsail_20161128` service. /// - /// Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a). The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). + /// Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (us-east-2a). The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). /// /// - Parameter CreateDiskFromSnapshotInput : [no documentation found] /// @@ -1113,7 +1113,7 @@ extension LightsailClient: LightsailClientProtocol { /// Performs the `CreateDomain` operation on the `Lightsail_20161128` service. /// - /// Creates a domain resource for the specified domain (e.g., example.com). The create domain operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). + /// Creates a domain resource for the specified domain (example.com). The create domain operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). /// /// - Parameter CreateDomainInput : [no documentation found] /// @@ -5776,7 +5776,7 @@ extension LightsailClient: LightsailClientProtocol { /// Performs the `GetOperationsForResource` operation on the `Lightsail_20161128` service. /// - /// Gets operations for a specific resource (e.g., an instance or a static IP). + /// Gets operations for a specific resource (an instance or a static IP). /// /// - Parameter GetOperationsForResourceInput : [no documentation found] /// @@ -6516,6 +6516,57 @@ extension LightsailClient: LightsailClientProtocol { return result } + /// Performs the `GetSetupHistory` operation on the `Lightsail_20161128` service. + /// + /// Returns detailed information for five of the most recent SetupInstanceHttps requests that were ran on the target instance. + /// + /// - Parameter GetSetupHistoryInput : [no documentation found] + /// + /// - Returns: `GetSetupHistoryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource. + /// - `InvalidInputException` : Lightsail throws this exception when user input does not conform to the validation rules of an input field. Domain and distribution APIs are only available in the N. Virginia (us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources. + /// - `NotFoundException` : Lightsail throws this exception when it cannot find a resource. + /// - `ServiceException` : A general service exception. + /// - `UnauthenticatedException` : Lightsail throws this exception when the user has not been authenticated. + public func getSetupHistory(input: GetSetupHistoryInput) async throws -> GetSetupHistoryOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "getSetupHistory") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "lightsail") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "getSetupHistory") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "Lightsail_20161128.GetSetupHistory")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.1")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSetupHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `GetStaticIp` operation on the `Lightsail_20161128` service. /// /// Returns information about an Amazon Lightsail static IP. @@ -7357,6 +7408,57 @@ extension LightsailClient: LightsailClientProtocol { return result } + /// Performs the `SetupInstanceHttps` operation on the `Lightsail_20161128` service. + /// + /// Creates an SSL/TLS certificate that secures traffic for your website. After the certificate is created, it is installed on the specified Lightsail instance. If you provide more than one domain name in the request, at least one name must be less than or equal to 63 characters in length. + /// + /// - Parameter SetupInstanceHttpsInput : [no documentation found] + /// + /// - Returns: `SetupInstanceHttpsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource. + /// - `InvalidInputException` : Lightsail throws this exception when user input does not conform to the validation rules of an input field. Domain and distribution APIs are only available in the N. Virginia (us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources. + /// - `NotFoundException` : Lightsail throws this exception when it cannot find a resource. + /// - `ServiceException` : A general service exception. + /// - `UnauthenticatedException` : Lightsail throws this exception when the user has not been authenticated. + public func setupInstanceHttps(input: SetupInstanceHttpsInput) async throws -> SetupInstanceHttpsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "setupInstanceHttps") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "lightsail") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "setupInstanceHttps") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "Lightsail_20161128.SetupInstanceHttps")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.1")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetupInstanceHttpsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `StartGUISession` operation on the `Lightsail_20161128` service. /// /// Initiates a graphical user interface (GUI) session that’s used to access a virtual computer’s operating system and application. The session will be active for 1 hour. Use this action to resume the session after it expires. diff --git a/Sources/Services/AWSLightsail/LightsailClientProtocol.swift b/Sources/Services/AWSLightsail/LightsailClientProtocol.swift index 27de92c9918..501ce3469b3 100644 --- a/Sources/Services/AWSLightsail/LightsailClientProtocol.swift +++ b/Sources/Services/AWSLightsail/LightsailClientProtocol.swift @@ -295,7 +295,7 @@ public protocol LightsailClientProtocol { func createContainerServiceRegistryLogin(input: CreateContainerServiceRegistryLoginInput) async throws -> CreateContainerServiceRegistryLoginOutput /// Performs the `CreateDisk` operation on the `Lightsail_20161128` service. /// - /// Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a). The create disk operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). + /// Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (us-east-2a). The create disk operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). /// /// - Parameter CreateDiskInput : [no documentation found] /// @@ -314,7 +314,7 @@ public protocol LightsailClientProtocol { func createDisk(input: CreateDiskInput) async throws -> CreateDiskOutput /// Performs the `CreateDiskFromSnapshot` operation on the `Lightsail_20161128` service. /// - /// Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a). The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). + /// Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (us-east-2a). The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). /// /// - Parameter CreateDiskFromSnapshotInput : [no documentation found] /// @@ -370,7 +370,7 @@ public protocol LightsailClientProtocol { func createDistribution(input: CreateDistributionInput) async throws -> CreateDistributionOutput /// Performs the `CreateDomain` operation on the `Lightsail_20161128` service. /// - /// Creates a domain resource for the specified domain (e.g., example.com). The create domain operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). + /// Creates a domain resource for the specified domain (example.com). The create domain operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags). /// /// - Parameter CreateDomainInput : [no documentation found] /// @@ -2004,7 +2004,7 @@ public protocol LightsailClientProtocol { func getOperations(input: GetOperationsInput) async throws -> GetOperationsOutput /// Performs the `GetOperationsForResource` operation on the `Lightsail_20161128` service. /// - /// Gets operations for a specific resource (e.g., an instance or a static IP). + /// Gets operations for a specific resource (an instance or a static IP). /// /// - Parameter GetOperationsForResourceInput : [no documentation found] /// @@ -2268,6 +2268,23 @@ public protocol LightsailClientProtocol { /// - `ServiceException` : A general service exception. /// - `UnauthenticatedException` : Lightsail throws this exception when the user has not been authenticated. func getRelationalDatabaseSnapshots(input: GetRelationalDatabaseSnapshotsInput) async throws -> GetRelationalDatabaseSnapshotsOutput + /// Performs the `GetSetupHistory` operation on the `Lightsail_20161128` service. + /// + /// Returns detailed information for five of the most recent SetupInstanceHttps requests that were ran on the target instance. + /// + /// - Parameter GetSetupHistoryInput : [no documentation found] + /// + /// - Returns: `GetSetupHistoryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource. + /// - `InvalidInputException` : Lightsail throws this exception when user input does not conform to the validation rules of an input field. Domain and distribution APIs are only available in the N. Virginia (us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources. + /// - `NotFoundException` : Lightsail throws this exception when it cannot find a resource. + /// - `ServiceException` : A general service exception. + /// - `UnauthenticatedException` : Lightsail throws this exception when the user has not been authenticated. + func getSetupHistory(input: GetSetupHistoryInput) async throws -> GetSetupHistoryOutput /// Performs the `GetStaticIp` operation on the `Lightsail_20161128` service. /// /// Returns information about an Amazon Lightsail static IP. @@ -2565,6 +2582,23 @@ public protocol LightsailClientProtocol { /// - `ServiceException` : A general service exception. /// - `UnauthenticatedException` : Lightsail throws this exception when the user has not been authenticated. func setResourceAccessForBucket(input: SetResourceAccessForBucketInput) async throws -> SetResourceAccessForBucketOutput + /// Performs the `SetupInstanceHttps` operation on the `Lightsail_20161128` service. + /// + /// Creates an SSL/TLS certificate that secures traffic for your website. After the certificate is created, it is installed on the specified Lightsail instance. If you provide more than one domain name in the request, at least one name must be less than or equal to 63 characters in length. + /// + /// - Parameter SetupInstanceHttpsInput : [no documentation found] + /// + /// - Returns: `SetupInstanceHttpsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource. + /// - `InvalidInputException` : Lightsail throws this exception when user input does not conform to the validation rules of an input field. Domain and distribution APIs are only available in the N. Virginia (us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources. + /// - `NotFoundException` : Lightsail throws this exception when it cannot find a resource. + /// - `ServiceException` : A general service exception. + /// - `UnauthenticatedException` : Lightsail throws this exception when the user has not been authenticated. + func setupInstanceHttps(input: SetupInstanceHttpsInput) async throws -> SetupInstanceHttpsOutput /// Performs the `StartGUISession` operation on the `Lightsail_20161128` service. /// /// Initiates a graphical user interface (GUI) session that’s used to access a virtual computer’s operating system and application. The session will be active for 1 hour. Use this action to resume the session after it expires. diff --git a/Sources/Services/AWSLightsail/models/Models.swift b/Sources/Services/AWSLightsail/models/Models.swift index 6e29563022f..caf7db4e807 100644 --- a/Sources/Services/AWSLightsail/models/Models.swift +++ b/Sources/Services/AWSLightsail/models/Models.swift @@ -895,7 +895,7 @@ extension LightsailClientTypes { public var notificationTriggers: [LightsailClientTypes.AlarmState]? /// The period, in seconds, over which the statistic is applied. public var period: Swift.Int? - /// The Lightsail resource type (e.g., Alarm). + /// The Lightsail resource type of the alarm. public var resourceType: LightsailClientTypes.ResourceType? /// The current state of the alarm. An alarm has the following possible states: /// @@ -1311,10 +1311,10 @@ extension AttachDiskInput: ClientRuntime.URLPathProvider { public struct AttachDiskInput: Swift.Equatable { /// A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is False. This value only applies to Lightsail for Research resources. public var autoMounting: Swift.Bool? - /// The unique Lightsail disk name (e.g., my-disk). + /// The unique Lightsail disk name (my-disk). /// This member is required. public var diskName: Swift.String? - /// The disk path to expose to the instance (e.g., /dev/xvdf). + /// The disk path to expose to the instance (/dev/xvdf). /// This member is required. public var diskPath: Swift.String? /// The name of the Lightsail instance where you want to utilize the storage disk. @@ -1850,7 +1850,7 @@ extension LightsailClientTypes.AttachedDisk: Swift.Codable { extension LightsailClientTypes { /// Describes a block storage disk that is attached to an instance, and is included in an automatic snapshot. public struct AttachedDisk: Swift.Equatable { - /// The path of the disk (e.g., /dev/xvdf). + /// The path of the disk (/dev/xvdf). public var path: Swift.String? /// The size of the disk in GB. public var sizeInGb: Swift.Int? @@ -2280,11 +2280,11 @@ extension LightsailClientTypes { public struct Blueprint: Swift.Equatable { /// Virtual computer blueprints that are supported by Lightsail for Research. This parameter only applies to Lightsail for Research resources. public var appCategory: LightsailClientTypes.AppCategory? - /// The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). + /// The ID for the virtual private server image (app_wordpress_4_4 or app_lamp_7_0). public var blueprintId: Swift.String? /// The description of the blueprint. public var description: Swift.String? - /// The group name of the blueprint (e.g., amazon-linux). + /// The group name of the blueprint (amazon-linux). public var group: Swift.String? /// A Boolean value indicating whether the blueprint is active. Inactive blueprints are listed to support customers with existing instances but are not necessarily available for launch of new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases. public var isActive: Swift.Bool? @@ -2292,15 +2292,15 @@ extension LightsailClientTypes { public var licenseUrl: Swift.String? /// The minimum bundle power required to run this blueprint. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500. 0 indicates that the blueprint runs on all instance sizes. public var minPower: Swift.Int? - /// The friendly name of the blueprint (e.g., Amazon Linux). + /// The friendly name of the blueprint (Amazon Linux). public var name: Swift.String? /// The operating system platform (either Linux/Unix-based or Windows Server-based) of the blueprint. public var platform: LightsailClientTypes.InstancePlatform? /// The product URL to learn more about the image or blueprint. public var productUrl: Swift.String? - /// The type of the blueprint (e.g., os or app). + /// The type of the blueprint (os or app). public var type: LightsailClientTypes.BlueprintType? - /// The version number of the operating system, application, or stack (e.g., 2016.03.0). + /// The version number of the operating system, application, or stack ( 2016.03.0). public var version: Swift.String? /// The version code. public var versionCode: Swift.String? @@ -2545,7 +2545,7 @@ extension LightsailClientTypes { public var objectVersioning: Swift.String? /// An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket. public var readonlyAccessAccounts: [Swift.String]? - /// The Lightsail resource type of the bucket (for example, Bucket). + /// The Lightsail resource type of the bucket. public var resourceType: Swift.String? /// An array of objects that describe Lightsail instances that have access to the bucket. Use the [SetResourceAccessForBucket](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html) action to update the instances that have access to a bucket. public var resourcesReceivingAccess: [LightsailClientTypes.ResourceReceivingAccess]? @@ -2932,29 +2932,29 @@ extension LightsailClientTypes.Bundle: Swift.Codable { extension LightsailClientTypes { /// Describes a bundle, which is a set of specs describing your virtual private server (or instance). public struct Bundle: Swift.Equatable { - /// The bundle ID (e.g., micro_1_0). + /// The bundle ID (micro_1_0). public var bundleId: Swift.String? - /// The number of vCPUs included in the bundle (e.g., 2). + /// The number of vCPUs included in the bundle (2). public var cpuCount: Swift.Int? - /// The size of the SSD (e.g., 30). + /// The size of the SSD (30). public var diskSizeInGb: Swift.Int? - /// The Amazon EC2 instance type (e.g., t2.micro). + /// The Amazon EC2 instance type (t2.micro). public var instanceType: Swift.String? /// A Boolean value indicating whether the bundle is active. public var isActive: Swift.Bool? - /// A friendly name for the bundle (e.g., Micro). + /// A friendly name for the bundle (Micro). public var name: Swift.String? - /// A numeric value that represents the power of the bundle (e.g., 500). You can use the bundle's power value in conjunction with a blueprint's minimum power value to determine whether the blueprint will run on the bundle. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500. + /// A numeric value that represents the power of the bundle (500). You can use the bundle's power value in conjunction with a blueprint's minimum power value to determine whether the blueprint will run on the bundle. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500. public var power: Swift.Int? - /// The price in US dollars (e.g., 5.0) of the bundle. + /// The price in US dollars (5.0) of the bundle. public var price: Swift.Float? - /// The amount of RAM in GB (e.g., 2.0). + /// The amount of RAM in GB (2.0). public var ramSizeInGb: Swift.Float? /// Virtual computer blueprints that are supported by a Lightsail for Research bundle. This parameter only applies to Lightsail for Research resources. public var supportedAppCategories: [LightsailClientTypes.AppCategory]? /// The operating system platform (Linux/Unix-based or Windows Server-based) that the bundle supports. You can only launch a WINDOWS bundle on a blueprint that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX bundle. public var supportedPlatforms: [LightsailClientTypes.InstancePlatform]? - /// The data transfer rate per month in GB (e.g., 2000). + /// The data transfer rate per month in GB (2000). public var transferPerMonthInGb: Swift.Int? public init( @@ -3399,7 +3399,7 @@ extension LightsailClientTypes { public var issuerCA: Swift.String? /// The algorithm used to generate the key pair (the public and private key) of the certificate. public var keyAlgorithm: Swift.String? - /// The name of the certificate (e.g., my-certificate). + /// The name of the certificate (my-certificate). public var name: Swift.String? /// The timestamp when the certificate expires. public var notAfter: ClientRuntime.Date? @@ -3427,7 +3427,7 @@ extension LightsailClientTypes { public var serialNumber: Swift.String? /// The validation status of the certificate. public var status: LightsailClientTypes.CertificateStatus? - /// An array of strings that specify the alternate domains (e.g., example2.com) and subdomains (e.g., blog.example.com) of the certificate. + /// An array of strings that specify the alternate domains (example2.com) and subdomains (blog.example.com) of the certificate. public var subjectAlternativeNames: [Swift.String]? /// The support code. Include this code in your email to support when you have questions about your Lightsail certificate. This code enables our support team to look up your Lightsail information more easily. public var supportCode: Swift.String? @@ -3519,6 +3519,35 @@ extension LightsailClientTypes { } } +extension LightsailClientTypes { + public enum CertificateProvider: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case letsencrypt + case sdkUnknown(Swift.String) + + public static var allCases: [CertificateProvider] { + return [ + .letsencrypt, + .sdkUnknown("") + ] + } + 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 .letsencrypt: return "LetsEncrypt" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = CertificateProvider(rawValue: rawValue) ?? CertificateProvider.sdkUnknown(rawValue) + } + } +} + extension LightsailClientTypes { public enum CertificateStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case expired @@ -3857,7 +3886,7 @@ extension LightsailClientTypes { public var location: LightsailClientTypes.ResourceLocation? /// The name of the CloudFormation stack record. It starts with CloudFormationStackRecord followed by a GUID. public var name: Swift.String? - /// The Lightsail resource type (e.g., CloudFormationStackRecord). + /// The Lightsail resource type (CloudFormationStackRecord). public var resourceType: LightsailClientTypes.ResourceType? /// A list of objects describing the source of the CloudFormation stack record. public var sourceInfo: [LightsailClientTypes.CloudFormationStackRecordSourceInfo]? @@ -3926,7 +3955,7 @@ extension LightsailClientTypes { public var arn: Swift.String? /// The name of the record. public var name: Swift.String? - /// The Lightsail resource type (e.g., ExportSnapshotRecord). + /// The Lightsail resource type (ExportSnapshotRecord). public var resourceType: LightsailClientTypes.CloudFormationStackRecordSourceType? public init( @@ -4092,7 +4121,7 @@ extension LightsailClientTypes { public var name: Swift.String? /// The protocol of the contact method, such as email or SMS (text messaging). public var `protocol`: LightsailClientTypes.ContactProtocol? - /// The Lightsail resource type (e.g., ContactMethod). + /// The Lightsail resource type of the contact method. public var resourceType: LightsailClientTypes.ResourceType? /// The current status of the contact method. A contact method has the following possible status: /// @@ -4573,7 +4602,7 @@ extension LightsailClientTypes { public var privateRegistryAccess: LightsailClientTypes.PrivateRegistryAccess? /// The public domain name of the container service, such as example.com and www.example.com. You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service. If you don't specify public domain names, then you can use the default domain of the container service. You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service. See CreateContainerService or UpdateContainerService for information about how to specify public domain names for your Lightsail container service. public var publicDomainNames: [Swift.String:[Swift.String]]? - /// The Lightsail resource type of the container service (i.e., ContainerService). + /// The Lightsail resource type of the container service. public var resourceType: LightsailClientTypes.ResourceType? /// The scale specification of the container service. The scale specifies the allocated compute nodes of the container service. public var scale: Swift.Int? @@ -4712,13 +4741,13 @@ extension LightsailClientTypes { public var publicEndpoint: LightsailClientTypes.ContainerServiceEndpoint? /// The state of the deployment. A deployment can be in one of the following states: /// - /// * Activating - The deployment is being created. + /// * ACTIVATING - The deployment is being created. /// - /// * Active - The deployment was successfully created, and it's currently running on the container service. The container service can have only one deployment in an active state at a time. + /// * ACTIVE - The deployment was successfully created, and it's currently running on the container service. The container service can have only one deployment in an active state at a time. /// - /// * Inactive - The deployment was previously successfully created, but it is not currently running on the container service. + /// * INACTIVE - The deployment was previously successfully created, but it is not currently running on the container service. /// - /// * Failed - The deployment failed. Use the GetContainerLog action to view the log events for the containers in the deployment to try to determine the reason for the failure. + /// * FAILED - The deployment failed. Use the GetContainerLog action to view the log events for the containers in the deployment to try to determine the reason for the failure. public var state: LightsailClientTypes.ContainerServiceDeploymentState? /// The version number of the deployment. public var version: Swift.Int? @@ -5189,9 +5218,9 @@ extension LightsailClientTypes { public var cpuCount: Swift.Float? /// A Boolean value indicating whether the power is active and can be specified for container services. public var isActive: Swift.Bool? - /// The friendly name of the power (e.g., nano). + /// The friendly name of the power (nano). public var name: Swift.String? - /// The ID of the power (e.g., nano-1). + /// The ID of the power (nano-1). public var powerId: Swift.String? /// The monthly price of the power in USD. public var price: Swift.Float? @@ -6171,10 +6200,10 @@ public struct CreateCertificateInput: Swift.Equatable { /// The name for the certificate. /// This member is required. public var certificateName: Swift.String? - /// The domain name (e.g., example.com) for the certificate. + /// The domain name (example.com) for the certificate. /// This member is required. public var domainName: Swift.String? - /// An array of strings that specify the alternate domains (e.g., example2.com) and subdomains (e.g., blog.example.com) for the certificate. You can specify a maximum of nine alternate domains (in addition to the primary domain name). Wildcard domain entries (e.g., *.example.com) are not supported. + /// An array of strings that specify the alternate domains (example2.com) and subdomains (blog.example.com) for the certificate. You can specify a maximum of nine alternate domains (in addition to the primary domain name). Wildcard domain entries (*.example.com) are not supported. public var subjectAlternativeNames: [Swift.String]? /// The tag keys and optional values to add to the certificate during create. Use the TagResource action to tag a resource after it's created. public var tags: [LightsailClientTypes.Tag]? @@ -7073,13 +7102,13 @@ extension CreateDiskFromSnapshotInput: ClientRuntime.URLPathProvider { public struct CreateDiskFromSnapshotInput: Swift.Equatable { /// An array of objects that represent the add-ons to enable for the new disk. public var addOns: [LightsailClientTypes.AddOnRequest]? - /// The Availability Zone where you want to create the disk (e.g., us-east-2a). Choose the same Availability Zone as the Lightsail instance where you want to create the disk. Use the GetRegions operation to list the Availability Zones where Lightsail is currently available. + /// The Availability Zone where you want to create the disk (us-east-2a). Choose the same Availability Zone as the Lightsail instance where you want to create the disk. Use the GetRegions operation to list the Availability Zones where Lightsail is currently available. /// This member is required. public var availabilityZone: Swift.String? - /// The unique Lightsail disk name (e.g., my-disk). + /// The unique Lightsail disk name (my-disk). /// This member is required. public var diskName: Swift.String? - /// The name of the disk snapshot (e.g., my-snapshot) from which to create the new storage disk. Constraint: + /// The name of the disk snapshot (my-snapshot) from which to create the new storage disk. Constraint: /// /// * This parameter cannot be defined together with the source disk name parameter. The disk snapshot name and source disk name parameters are mutually exclusive. public var diskSnapshotName: Swift.String? @@ -7091,7 +7120,7 @@ public struct CreateDiskFromSnapshotInput: Swift.Equatable { /// /// * Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). public var restoreDate: Swift.String? - /// The size of the disk in GB (e.g., 32). + /// The size of the disk in GB (32). /// This member is required. public var sizeInGb: Swift.Int? /// The name of the source disk from which the source automatic snapshot was created. Constraints: @@ -7309,13 +7338,13 @@ extension CreateDiskInput: ClientRuntime.URLPathProvider { public struct CreateDiskInput: Swift.Equatable { /// An array of objects that represent the add-ons to enable for the new disk. public var addOns: [LightsailClientTypes.AddOnRequest]? - /// The Availability Zone where you want to create the disk (e.g., us-east-2a). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk. Use the get regions operation to list the Availability Zones where Lightsail is currently available. + /// The Availability Zone where you want to create the disk (us-east-2a). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk. Use the get regions operation to list the Availability Zones where Lightsail is currently available. /// This member is required. public var availabilityZone: Swift.String? - /// The unique Lightsail disk name (e.g., my-disk). + /// The unique Lightsail disk name (my-disk). /// This member is required. public var diskName: Swift.String? - /// The size of the disk in GB (e.g., 32). + /// The size of the disk in GB (32). /// This member is required. public var sizeInGb: Swift.Int? /// The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created. @@ -7488,12 +7517,12 @@ extension CreateDiskSnapshotInput: ClientRuntime.URLPathProvider { } public struct CreateDiskSnapshotInput: Swift.Equatable { - /// The unique name of the source disk (e.g., Disk-Virginia-1). This parameter cannot be defined together with the instance name parameter. The disk name and instance name parameters are mutually exclusive. + /// The unique name of the source disk (Disk-Virginia-1). This parameter cannot be defined together with the instance name parameter. The disk name and instance name parameters are mutually exclusive. public var diskName: Swift.String? - /// The name of the destination disk snapshot (e.g., my-disk-snapshot) based on the source disk. + /// The name of the destination disk snapshot (my-disk-snapshot) based on the source disk. /// This member is required. public var diskSnapshotName: Swift.String? - /// The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of the instance's system volume is created. This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive. + /// The unique name of the source instance (Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of the instance's system volume is created. This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive. public var instanceName: Swift.String? /// The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created. public var tags: [LightsailClientTypes.Tag]? @@ -7867,7 +7896,7 @@ public struct CreateDomainEntryInput: Swift.Equatable { /// An array of key-value pairs containing information about the domain entry request. /// This member is required. public var domainEntry: LightsailClientTypes.DomainEntry? - /// The domain name (e.g., example.com) for which you want to create the domain entry. + /// The domain name (example.com) for which you want to create the domain entry. /// This member is required. public var domainName: Swift.String? @@ -7985,7 +8014,7 @@ extension CreateDomainInput: ClientRuntime.URLPathProvider { } public struct CreateDomainInput: Swift.Equatable { - /// The domain name to manage (e.g., example.com). + /// The domain name to manage (example.com). /// This member is required. public var domainName: Swift.String? /// The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created. @@ -8480,7 +8509,7 @@ public struct CreateInstancesFromSnapshotInput: Swift.Equatable { /// The Availability Zone where you want to create your instances. Use the following formatting: us-east-2a (case sensitive). You can get a list of Availability Zones by using the [get regions](http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) operation. Be sure to add the include Availability Zones parameter to your request. /// This member is required. public var availabilityZone: Swift.String? - /// The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0). + /// The bundle of specification information for your virtual private server (or instance), including the pricing plan (micro_1_0). /// This member is required. public var bundleId: Swift.String? /// The names for your new instances. @@ -8794,13 +8823,13 @@ public struct CreateInstancesInput: Swift.Equatable { /// The Availability Zone in which to create your instance. Use the following format: us-east-2a (case sensitive). You can get a list of Availability Zones by using the [get regions](http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) operation. Be sure to add the include Availability Zones parameter to your request. /// This member is required. public var availabilityZone: Swift.String? - /// The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). Use the get blueprints operation to return a list of available images (or blueprints). Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases. + /// The ID for a virtual private server image (app_wordpress_4_4 or app_lamp_7_0). Use the get blueprints operation to return a list of available images (or blueprints). Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases. /// This member is required. public var blueprintId: Swift.String? - /// The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0). + /// The bundle of specification information for your virtual private server (or instance), including the pricing plan (micro_1_0). /// This member is required. public var bundleId: Swift.String? - /// (Deprecated) The name for your custom image. In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated. + /// (Discontinued) The name for your custom image. In releases prior to June 12, 2017, this parameter was ignored by the API. It is now discontinued. @available(*, deprecated) public var customImageName: Swift.String? /// The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"] @@ -9203,13 +9232,13 @@ extension CreateLoadBalancerInput: ClientRuntime.URLPathProvider { } public struct CreateLoadBalancerInput: Swift.Equatable { - /// The optional alternative domains and subdomains to use with your SSL/TLS certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com). + /// The optional alternative domains and subdomains to use with your SSL/TLS certificate (www.example.com, example.com, m.example.com, blog.example.com). public var certificateAlternativeNames: [Swift.String]? - /// The domain name with which your certificate is associated (e.g., example.com). If you specify certificateDomainName, then certificateName is required (and vice-versa). + /// The domain name with which your certificate is associated (example.com). If you specify certificateDomainName, then certificateName is required (and vice-versa). public var certificateDomainName: Swift.String? /// The name of the SSL/TLS certificate. If you specify certificateName, then certificateDomainName is required (and vice-versa). public var certificateName: Swift.String? - /// The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/"). You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it. + /// The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website ("/"). You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it. public var healthCheckPath: Swift.String? /// The instance port where you're creating your load balancer. /// This member is required. @@ -9422,9 +9451,9 @@ extension CreateLoadBalancerTlsCertificateInput: ClientRuntime.URLPathProvider { } public struct CreateLoadBalancerTlsCertificateInput: Swift.Equatable { - /// An array of strings listing alternative domains and subdomains for your SSL/TLS certificate. Lightsail will de-dupe the names for you. You can have a maximum of 9 alternative names (in addition to the 1 primary domain). We do not support wildcards (e.g., *.example.com). + /// An array of strings listing alternative domains and subdomains for your SSL/TLS certificate. Lightsail will de-dupe the names for you. You can have a maximum of 9 alternative names (in addition to the 1 primary domain). We do not support wildcards (*.example.com). public var certificateAlternativeNames: [Swift.String]? - /// The domain name (e.g., example.com) for your SSL/TLS certificate. + /// The domain name (example.com) for your SSL/TLS certificate. /// This member is required. public var certificateDomainName: Swift.String? /// The SSL/TLS certificate name. You can have up to 10 certificates in your account at one time. Each Lightsail load balancer can have up to 2 certificates associated with it at one time. There is also an overall limit to the number of certificates that can be issue in a 365-day period. For more information, see [Limits](http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). @@ -11172,7 +11201,7 @@ extension DeleteDiskInput: ClientRuntime.URLPathProvider { } public struct DeleteDiskInput: Swift.Equatable { - /// The unique name of the disk you want to delete (e.g., my-disk). + /// The unique name of the disk you want to delete (my-disk). /// This member is required. public var diskName: Swift.String? /// A Boolean value to indicate whether to delete all add-ons for the disk. @@ -11294,7 +11323,7 @@ extension DeleteDiskSnapshotInput: ClientRuntime.URLPathProvider { } public struct DeleteDiskSnapshotInput: Swift.Equatable { - /// The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). + /// The name of the disk snapshot you want to delete (my-disk-snapshot). /// This member is required. public var diskSnapshotName: Swift.String? @@ -12863,7 +12892,7 @@ extension DetachDiskInput: ClientRuntime.URLPathProvider { } public struct DetachDiskInput: Swift.Equatable { - /// The unique name of the disk you want to detach from your instance (e.g., my-disk). + /// The unique name of the disk you want to detach from your instance (my-disk). /// This member is required. public var diskName: Swift.String? @@ -13490,14 +13519,14 @@ extension LightsailClientTypes { public var arn: Swift.String? /// The resources to which the disk is attached. public var attachedTo: Swift.String? - /// (Deprecated) The attachment state of the disk. In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead. + /// (Discontinued) The attachment state of the disk. In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now discontinued, but still included in the response. Use isAttached instead. @available(*, deprecated) public var attachmentState: Swift.String? /// The status of automatically mounting a storage disk to a virtual computer. This parameter only applies to Lightsail for Research resources. public var autoMountStatus: LightsailClientTypes.AutoMountStatus? /// The date when the disk was created. public var createdAt: ClientRuntime.Date? - /// (Deprecated) The number of GB in use by the disk. In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated. + /// (Discontinued) The number of GB in use by the disk. In releases prior to November 14, 2017, this parameter was not included in the API response. It is now discontinued. @available(*, deprecated) public var gbInUse: Swift.Int? /// The input/output operations per second (IOPS) of the disk. @@ -13512,7 +13541,7 @@ extension LightsailClientTypes { public var name: Swift.String? /// The disk path. public var path: Swift.String? - /// The Lightsail resource type (e.g., Disk). + /// The Lightsail resource type (Disk). public var resourceType: LightsailClientTypes.ResourceType? /// The size of the disk in GB. public var sizeInGb: Swift.Int? @@ -13613,7 +13642,7 @@ extension LightsailClientTypes { public var name: Swift.String? /// The disk path. public var path: Swift.String? - /// The size of the disk in GB (e.g., 32). + /// The size of the disk in GB (32). public var sizeInGb: Swift.Int? public init( @@ -13660,7 +13689,7 @@ extension LightsailClientTypes.DiskMap: Swift.Codable { extension LightsailClientTypes { /// Describes a block storage disk mapping. public struct DiskMap: Swift.Equatable { - /// The new disk name (e.g., my-new-disk). + /// The new disk name (my-new-disk). public var newDiskName: Swift.String? /// The original disk path exposed to the instance (for example, /dev/sdh). public var originalDiskPath: Swift.String? @@ -13811,11 +13840,11 @@ extension LightsailClientTypes { public var isFromAutoSnapshot: Swift.Bool? /// The AWS Region and Availability Zone where the disk snapshot was created. public var location: LightsailClientTypes.ResourceLocation? - /// The name of the disk snapshot (e.g., my-disk-snapshot). + /// The name of the disk snapshot (my-disk-snapshot). public var name: Swift.String? /// The progress of the snapshot. public var progress: Swift.String? - /// The Lightsail resource type (e.g., DiskSnapshot). + /// The Lightsail resource type (DiskSnapshot). public var resourceType: LightsailClientTypes.ResourceType? /// The size of the disk in GB. public var sizeInGb: Swift.Int? @@ -13886,7 +13915,7 @@ extension LightsailClientTypes.DiskSnapshotInfo: Swift.Codable { extension LightsailClientTypes { /// Describes a disk snapshot. public struct DiskSnapshotInfo: Swift.Equatable { - /// The size of the disk in GB (e.g., 32). + /// The size of the disk in GB (32). public var sizeInGb: Swift.Int? public init( @@ -14277,7 +14306,7 @@ extension LightsailClientTypes.Domain: Swift.Codable { extension LightsailClientTypes { /// Describes a domain where you are storing recordsets. public struct Domain: Swift.Equatable { - /// The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). + /// The Amazon Resource Name (ARN) of the domain recordset (arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). public var arn: Swift.String? /// The date when the domain recordset was created. public var createdAt: ClientRuntime.Date? @@ -14392,10 +14421,10 @@ extension LightsailClientTypes { public var isAlias: Swift.Bool? /// The name of the domain. public var name: Swift.String? - /// (Deprecated) The options for the domain entry. In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated. + /// (Discontinued) The options for the domain entry. In releases prior to November 29, 2017, this parameter was not included in the API response. It is now discontinued. @available(*, deprecated) public var options: [Swift.String:Swift.String]? - /// The target IP address (e.g., 192.0.2.0), or AWS name server (e.g., ns-111.awsdns-22.com.). For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net. For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com. Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service. + /// The target IP address (192.0.2.0), or AWS name server (ns-111.awsdns-22.com.). For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net. For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com. Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service. public var target: Swift.String? /// The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT). The following domain entry types can be used: /// @@ -15052,7 +15081,7 @@ extension LightsailClientTypes { public var location: LightsailClientTypes.ResourceLocation? /// The export snapshot record name. public var name: Swift.String? - /// The Lightsail resource type (e.g., ExportSnapshotRecord). + /// The Lightsail resource type (ExportSnapshotRecord). public var resourceType: LightsailClientTypes.ResourceType? /// A list of objects describing the source of the export snapshot record. public var sourceInfo: LightsailClientTypes.ExportSnapshotRecordSourceInfo? @@ -15161,7 +15190,7 @@ extension LightsailClientTypes { public var instanceSnapshotInfo: LightsailClientTypes.InstanceSnapshotInfo? /// The name of the source instance or disk snapshot. public var name: Swift.String? - /// The Lightsail resource type (e.g., InstanceSnapshot or DiskSnapshot). + /// The Lightsail resource type (InstanceSnapshot or DiskSnapshot). public var resourceType: LightsailClientTypes.ExportSnapshotRecordSourceType? public init( @@ -15593,7 +15622,7 @@ public struct GetAutoSnapshotsOutput: Swift.Equatable { public var autoSnapshots: [LightsailClientTypes.AutoSnapshotDetails]? /// The name of the source instance or disk for the automatic snapshots. public var resourceName: Swift.String? - /// The resource type (e.g., Instance or Disk). + /// The resource type of the automatic snapshot. The possible values are Instance, and Disk. public var resourceType: LightsailClientTypes.ResourceType? public init( @@ -17963,7 +17992,7 @@ extension GetDiskInput: ClientRuntime.URLPathProvider { } public struct GetDiskInput: Swift.Equatable { - /// The name of the disk (e.g., my-disk). + /// The name of the disk (my-disk). /// This member is required. public var diskName: Swift.String? @@ -18068,7 +18097,7 @@ extension GetDiskSnapshotInput: ClientRuntime.URLPathProvider { } public struct GetDiskSnapshotInput: Swift.Equatable { - /// The name of the disk snapshot (e.g., my-disk-snapshot). + /// The name of the disk snapshot (my-disk-snapshot). /// This member is required. public var diskSnapshotName: Swift.String? @@ -18554,7 +18583,7 @@ extension GetDistributionLatestCacheResetOutput: ClientRuntime.HttpResponseBindi } public struct GetDistributionLatestCacheResetOutput: Swift.Equatable { - /// The timestamp of the last cache reset (e.g., 1479734909.17) in Unix time format. + /// The timestamp of the last cache reset (1479734909.17) in Unix time format. public var createTime: ClientRuntime.Date? /// The status of the last cache reset. public var status: Swift.String? @@ -21506,7 +21535,7 @@ extension GetOperationsForResourceOutput: ClientRuntime.HttpResponseBinding { } public struct GetOperationsForResourceOutput: Swift.Equatable { - /// (Deprecated) Returns the number of pages of results that remain. In releases prior to June 12, 2017, this parameter returned null by the API. It is now deprecated, and the API returns the next page token parameter instead. + /// (Discontinued) Returns the number of pages of results that remain. In releases prior to June 12, 2017, this parameter returned null by the API. It is now discontinued, and the API returns the next page token parameter instead. @available(*, deprecated) public var nextPageCount: Swift.String? /// The token to advance to the next page of results from your request. A next page token is not returned if there are no more results to display. To get the next page of results, perform another GetOperationsForResource request and specify the next page token using the pageToken parameter. @@ -21723,9 +21752,9 @@ extension GetRegionsInput: ClientRuntime.URLPathProvider { } public struct GetRegionsInput: Swift.Equatable { - /// A Boolean value indicating whether to also include Availability Zones in your get regions request. Availability Zones are indicated with a letter: e.g., us-east-2a. + /// A Boolean value indicating whether to also include Availability Zones in your get regions request. Availability Zones are indicated with a letter: us-east-2a. public var includeAvailabilityZones: Swift.Bool? - /// A Boolean value indicating whether to also include Availability Zones for databases in your get regions request. Availability Zones are indicated with a letter (e.g., us-east-2a). + /// A Boolean value indicating whether to also include Availability Zones for databases in your get regions request. Availability Zones are indicated with a letter (us-east-2a). public var includeRelationalDatabaseAvailabilityZones: Swift.Bool? public init( @@ -23515,6 +23544,140 @@ enum GetRelationalDatabasesOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension GetSetupHistoryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case pageToken + case resourceName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let pageToken = self.pageToken { + try encodeContainer.encode(pageToken, forKey: .pageToken) + } + if let resourceName = self.resourceName { + try encodeContainer.encode(resourceName, forKey: .resourceName) + } + } +} + +extension GetSetupHistoryInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct GetSetupHistoryInput: Swift.Equatable { + /// The token to advance to the next page of results from your request. To get a page token, perform an initial GetSetupHistory request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request. + public var pageToken: Swift.String? + /// The name of the resource for which you are requesting information. + /// This member is required. + public var resourceName: Swift.String? + + public init( + pageToken: Swift.String? = nil, + resourceName: Swift.String? = nil + ) + { + self.pageToken = pageToken + self.resourceName = resourceName + } +} + +struct GetSetupHistoryInputBody: Swift.Equatable { + let resourceName: Swift.String? + let pageToken: Swift.String? +} + +extension GetSetupHistoryInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case pageToken + case resourceName + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) + resourceName = resourceNameDecoded + let pageTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pageToken) + pageToken = pageTokenDecoded + } +} + +extension GetSetupHistoryOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: GetSetupHistoryOutputBody = try responseDecoder.decode(responseBody: data) + self.nextPageToken = output.nextPageToken + self.setupHistory = output.setupHistory + } else { + self.nextPageToken = nil + self.setupHistory = nil + } + } +} + +public struct GetSetupHistoryOutput: Swift.Equatable { + /// The token to advance to the next page of results from your request. A next page token is not returned if there are no more results to display. To get the next page of results, perform another GetSetupHistory request and specify the next page token using the pageToken parameter. + public var nextPageToken: Swift.String? + /// The historical information that's returned. + public var setupHistory: [LightsailClientTypes.SetupHistory]? + + public init( + nextPageToken: Swift.String? = nil, + setupHistory: [LightsailClientTypes.SetupHistory]? = nil + ) + { + self.nextPageToken = nextPageToken + self.setupHistory = setupHistory + } +} + +struct GetSetupHistoryOutputBody: Swift.Equatable { + let setupHistory: [LightsailClientTypes.SetupHistory]? + let nextPageToken: Swift.String? +} + +extension GetSetupHistoryOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextPageToken + case setupHistory + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let setupHistoryContainer = try containerValues.decodeIfPresent([LightsailClientTypes.SetupHistory?].self, forKey: .setupHistory) + var setupHistoryDecoded0:[LightsailClientTypes.SetupHistory]? = nil + if let setupHistoryContainer = setupHistoryContainer { + setupHistoryDecoded0 = [LightsailClientTypes.SetupHistory]() + for structure0 in setupHistoryContainer { + if let structure0 = structure0 { + setupHistoryDecoded0?.append(structure0) + } + } + } + setupHistory = setupHistoryDecoded0 + let nextPageTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextPageToken) + nextPageToken = nextPageTokenDecoded + } +} + +enum GetSetupHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidInputException": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceException": return try await ServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnauthenticatedException": return try await UnauthenticatedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension GetStaticIpInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case staticIpName @@ -24226,7 +24389,7 @@ extension LightsailClientTypes.InputOrigin: Swift.Codable { } extension LightsailClientTypes { - /// Describes the origin resource of an Amazon Lightsail content delivery network (CDN) distribution. An origin can be a Lightsail instance, bucket, or load balancer. A distribution pulls content from an origin, caches it, and serves it to viewers via a worldwide network of edge servers. + /// Describes the origin resource of an Amazon Lightsail content delivery network (CDN) distribution. An origin can be a Lightsail instance, bucket, container service, or load balancer. A distribution pulls content from an origin, caches it, and serves it to viewers via a worldwide network of edge servers. public struct InputOrigin: Swift.Equatable { /// The name of the origin resource. public var name: Swift.String? @@ -24435,15 +24598,15 @@ extension LightsailClientTypes { public struct Instance: Swift.Equatable { /// An array of objects representing the add-ons enabled on the instance. public var addOns: [LightsailClientTypes.AddOn]? - /// The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). + /// The Amazon Resource Name (ARN) of the instance (arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). public var arn: Swift.String? - /// The blueprint ID (e.g., os_amlinux_2016_03). + /// The blueprint ID (os_amlinux_2016_03). public var blueprintId: Swift.String? - /// The friendly name of the blueprint (e.g., Amazon Linux). + /// The friendly name of the blueprint (Amazon Linux). public var blueprintName: Swift.String? - /// The bundle for the instance (e.g., micro_1_0). + /// The bundle for the instance (micro_1_0). public var bundleId: Swift.String? - /// The timestamp when the instance was created (e.g., 1479734909.17) in Unix time format. + /// The timestamp when the instance was created (1479734909.17) in Unix time format. public var createdAt: ClientRuntime.Date? /// The size of the vCPU and the amount of RAM for the instance. public var hardware: LightsailClientTypes.InstanceHardware? @@ -24457,7 +24620,7 @@ extension LightsailClientTypes { public var location: LightsailClientTypes.ResourceLocation? /// The metadata options for the Amazon Lightsail instance. public var metadataOptions: LightsailClientTypes.InstanceMetadataOptions? - /// The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). + /// The name the user gave the instance (Amazon_Linux-1GB-Ohio-1). public var name: Swift.String? /// Information about the public ports and monthly data transfer rates for the instance. public var networking: LightsailClientTypes.InstanceNetworking? @@ -24467,15 +24630,15 @@ extension LightsailClientTypes { public var publicIpAddress: Swift.String? /// The type of resource (usually Instance). public var resourceType: LightsailClientTypes.ResourceType? - /// The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair). + /// The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair). public var sshKeyName: Swift.String? - /// The status code and the state (e.g., running) for the instance. + /// The status code and the state (running) for the instance. public var state: LightsailClientTypes.InstanceState? /// The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. public var supportCode: Swift.String? /// The tag keys and optional values for the resource. For more information about tags in Lightsail, see the [Amazon Lightsail Developer Guide](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags). public var tags: [LightsailClientTypes.Tag]? - /// The user name for connecting to the instance (e.g., ec2-user). + /// The user name for connecting to the instance (ec2-user). public var username: Swift.String? public init( @@ -24618,7 +24781,7 @@ extension LightsailClientTypes.InstanceAccessDetails: Swift.Codable { extension LightsailClientTypes { /// The parameters for gaining temporary access to one of your Amazon Lightsail instances. public struct InstanceAccessDetails: Swift.Equatable { - /// For SSH access, the public key to use when accessing your instance For OpenSSH clients (e.g., command line SSH), you should save this value to tempkey-cert.pub. + /// For SSH access, the public key to use when accessing your instance For OpenSSH clients (command line SSH), you should save this value to tempkey-cert.pub. public var certKey: Swift.String? /// For SSH access, the date on which the temporary keys expire. public var expiresAt: ClientRuntime.Date? @@ -24632,7 +24795,7 @@ extension LightsailClientTypes { public var password: Swift.String? /// For a Windows Server-based instance, an object with the data you can use to retrieve your password. This is only needed if password is empty and the instance is not new (and therefore the password is not ready yet). When you create an instance, it can take up to 15 minutes for the instance to be ready. public var passwordData: LightsailClientTypes.PasswordData? - /// For SSH access, the temporary private key. For OpenSSH clients (e.g., command line SSH), you should save this value to tempkey). + /// For SSH access, the temporary private key. For OpenSSH clients (command line SSH), you should save this value to tempkey). public var privateKey: Swift.String? /// The protocol for these Amazon Lightsail instance access details. public var `protocol`: LightsailClientTypes.InstanceAccessProtocol? @@ -24748,7 +24911,7 @@ extension LightsailClientTypes { /// The Availability Zone for the new Amazon EC2 instance. /// This member is required. public var availabilityZone: Swift.String? - /// The instance type (e.g., t2.micro) to use for the new Amazon EC2 instance. + /// The instance type (t2.micro) to use for the new Amazon EC2 instance. /// This member is required. public var instanceType: Swift.String? /// The port configuration to use for the new Amazon EC2 instance. The following configuration options are available: @@ -24839,7 +25002,7 @@ extension LightsailClientTypes { public var cpuCount: Swift.Int? /// The disks attached to the instance. public var disks: [LightsailClientTypes.Disk]? - /// The amount of RAM in GB on the instance (e.g., 1.0). + /// The amount of RAM in GB on the instance (1.0). public var ramSizeInGb: Swift.Float? public init( @@ -25766,17 +25929,17 @@ extension LightsailClientTypes.InstanceSnapshot: Swift.Codable { extension LightsailClientTypes { /// Describes an instance snapshot. public struct InstanceSnapshot: Swift.Equatable { - /// The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). + /// The Amazon Resource Name (ARN) of the snapshot (arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). public var arn: Swift.String? - /// The timestamp when the snapshot was created (e.g., 1479907467.024). + /// The timestamp when the snapshot was created (1479907467.024). public var createdAt: ClientRuntime.Date? /// An array of disk objects containing information about all block storage disks. public var fromAttachedDisks: [LightsailClientTypes.Disk]? - /// The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). A blueprint is a virtual private server (or instance) image used to create instances quickly. + /// The blueprint ID from which you created the snapshot (os_debian_8_3). A blueprint is a virtual private server (or instance) image used to create instances quickly. public var fromBlueprintId: Swift.String? - /// The bundle ID from which you created the snapshot (e.g., micro_1_0). + /// The bundle ID from which you created the snapshot (micro_1_0). public var fromBundleId: Swift.String? - /// The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). + /// The Amazon Resource Name (ARN) of the instance from which the snapshot was created (arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). public var fromInstanceArn: Swift.String? /// The instance from which the snapshot was created. public var fromInstanceName: Swift.String? @@ -25885,9 +26048,9 @@ extension LightsailClientTypes.InstanceSnapshotInfo: Swift.Codable { extension LightsailClientTypes { /// Describes an instance snapshot. public struct InstanceSnapshotInfo: Swift.Equatable { - /// The blueprint ID from which the source instance (e.g., os_debian_8_3). + /// The blueprint ID from which the source instance (os_debian_8_3). public var fromBlueprintId: Swift.String? - /// The bundle ID from which the source instance was created (e.g., micro_1_0). + /// The bundle ID from which the source instance was created (micro_1_0). public var fromBundleId: Swift.String? /// A list of objects describing the disks that were attached to the source instance. public var fromDiskInfo: [LightsailClientTypes.DiskInfo]? @@ -25971,7 +26134,7 @@ extension LightsailClientTypes { public struct InstanceState: Swift.Equatable { /// The status code for the instance. public var code: Swift.Int? - /// The state of the instance (e.g., running or pending). + /// The state of the instance (running or pending). public var name: Swift.String? public init( @@ -26261,9 +26424,9 @@ extension LightsailClientTypes.KeyPair: Swift.Codable { extension LightsailClientTypes { /// Describes an SSH key pair. public struct KeyPair: Swift.Equatable { - /// The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). + /// The Amazon Resource Name (ARN) of the key pair (arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). public var arn: Swift.String? - /// The timestamp when the key pair was created (e.g., 1479816991.349). + /// The timestamp when the key pair was created (1479816991.349). public var createdAt: ClientRuntime.Date? /// The RSA fingerprint of the key pair. public var fingerprint: Swift.String? @@ -26506,7 +26669,7 @@ extension LightsailClientTypes { public var origin: LightsailClientTypes.Origin? /// The public DNS of the origin. public var originPublicDNS: Swift.String? - /// The Lightsail resource type (e.g., Distribution). + /// The Lightsail resource type (Distribution). public var resourceType: LightsailClientTypes.ResourceType? /// The status of the distribution. public var status: Swift.String? @@ -26771,15 +26934,15 @@ extension LightsailClientTypes { public var instancePort: Swift.Int? /// The IP address type of the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. public var ipAddressType: LightsailClientTypes.IpAddressType? - /// The AWS Region where your load balancer was created (e.g., us-east-2a). Lightsail automatically creates your load balancer across Availability Zones. + /// The AWS Region where your load balancer was created (us-east-2a). Lightsail automatically creates your load balancer across Availability Zones. public var location: LightsailClientTypes.ResourceLocation? - /// The name of the load balancer (e.g., my-load-balancer). + /// The name of the load balancer (my-load-balancer). public var name: Swift.String? /// The protocol you have enabled for your load balancer. Valid values are below. You can't just have HTTP_HTTPS, but you can have just HTTP. public var `protocol`: LightsailClientTypes.LoadBalancerProtocol? /// An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. public var publicPorts: [Swift.Int]? - /// The resource type (e.g., LoadBalancer. + /// The resource type (LoadBalancer. public var resourceType: LightsailClientTypes.ResourceType? /// The status of your load balancer. Valid values are below. public var state: LightsailClientTypes.LoadBalancerState? @@ -27248,7 +27411,7 @@ extension LightsailClientTypes { public var loadBalancerName: Swift.String? /// The Amazon Web Services Region and Availability Zone where you created your certificate. public var location: LightsailClientTypes.ResourceLocation? - /// The name of the SSL/TLS certificate (e.g., my-certificate). + /// The name of the SSL/TLS certificate (my-certificate). public var name: Swift.String? /// The timestamp when the SSL/TLS certificate expires. public var notAfter: ClientRuntime.Date? @@ -27256,7 +27419,7 @@ extension LightsailClientTypes { public var notBefore: ClientRuntime.Date? /// An object that describes the status of the certificate renewal managed by Lightsail. public var renewalSummary: LightsailClientTypes.LoadBalancerTlsCertificateRenewalSummary? - /// The resource type (e.g., LoadBalancerTlsCertificate). + /// The resource type (LoadBalancerTlsCertificate). /// /// * Instance - A Lightsail instance (a virtual private server) /// @@ -27290,7 +27453,7 @@ extension LightsailClientTypes { public var status: LightsailClientTypes.LoadBalancerTlsCertificateStatus? /// The name of the entity that is associated with the public key contained in the certificate. public var subject: Swift.String? - /// An array of strings that specify the alternate domains (e.g., example2.com) and subdomains (e.g., blog.example.com) for the certificate. + /// An array of strings that specify the alternate domains (example2.com) and subdomains (blog.example.com) for the certificate. public var subjectAlternativeNames: [Swift.String]? /// The support code. Include this code in your email to support when you have questions about your Lightsail load balancer or SSL/TLS certificate. This code enables our support team to look up your Lightsail information more easily. public var supportCode: Swift.String? @@ -28121,7 +28284,7 @@ extension LightsailClientTypes { public var sampleCount: Swift.Double? /// The sum. public var sum: Swift.Double? - /// The timestamp (e.g., 1479816991.349). + /// The timestamp (1479816991.349). public var timestamp: ClientRuntime.Date? /// The unit. public var unit: LightsailClientTypes.MetricUnit? @@ -28904,7 +29067,7 @@ extension LightsailClientTypes.Operation: Swift.Codable { extension LightsailClientTypes { /// Describes the API operation. public struct Operation: Swift.Equatable { - /// The timestamp when the operation was initialized (e.g., 1479816991.349). + /// The timestamp when the operation was initialized (1479816991.349). public var createdAt: ClientRuntime.Date? /// The error code. public var errorCode: Swift.String? @@ -28916,7 +29079,7 @@ extension LightsailClientTypes { public var isTerminal: Swift.Bool? /// The Amazon Web Services Region and Availability Zone. public var location: LightsailClientTypes.ResourceLocation? - /// Details about the operation (e.g., Debian-1GB-Ohio-1). + /// Details about the operation (Debian-1GB-Ohio-1). public var operationDetails: Swift.String? /// The type of operation. public var operationType: LightsailClientTypes.OperationType? @@ -28926,7 +29089,7 @@ extension LightsailClientTypes { public var resourceType: LightsailClientTypes.ResourceType? /// The status of the operation. public var status: LightsailClientTypes.OperationStatus? - /// The timestamp when the status was changed (e.g., 1479816991.349). + /// The timestamp when the status was changed (1479816991.349). public var statusChangedAt: ClientRuntime.Date? public init( @@ -29151,6 +29314,7 @@ extension LightsailClientTypes { case sendcontactmethodverification case setipaddresstype case setresourceaccessforbucket + case setupinstancehttps case startguisession case startinstance case startrelationaldatabase @@ -29237,6 +29401,7 @@ extension LightsailClientTypes { .sendcontactmethodverification, .setipaddresstype, .setresourceaccessforbucket, + .setupinstancehttps, .startguisession, .startinstance, .startrelationaldatabase, @@ -29328,6 +29493,7 @@ extension LightsailClientTypes { case .sendcontactmethodverification: return "SendContactMethodVerification" case .setipaddresstype: return "SetIpAddressType" case .setresourceaccessforbucket: return "SetResourceAccessForBucket" + case .setupinstancehttps: return "SetupInstanceHttps" case .startguisession: return "StartGUISession" case .startinstance: return "StartInstance" case .startrelationaldatabase: return "StartRelationalDatabase" @@ -29402,7 +29568,7 @@ extension LightsailClientTypes { public var protocolPolicy: LightsailClientTypes.OriginProtocolPolicyEnum? /// The AWS Region name of the origin resource. public var regionName: LightsailClientTypes.RegionName? - /// The resource type of the origin resource (e.g., Instance). + /// The resource type of the origin resource (Instance). public var resourceType: LightsailClientTypes.ResourceType? public init( @@ -30971,13 +31137,13 @@ extension LightsailClientTypes { public struct Region: Swift.Equatable { /// The Availability Zones. Follows the format us-east-2a (case-sensitive). public var availabilityZones: [LightsailClientTypes.AvailabilityZone]? - /// The continent code (e.g., NA, meaning North America). + /// The continent code (NA, meaning North America). public var continentCode: Swift.String? - /// The description of the Amazon Web Services Region (e.g., This region is recommended to serve users in the eastern United States and eastern Canada). + /// The description of the Amazon Web Services Region (This region is recommended to serve users in the eastern United States and eastern Canada). public var description: Swift.String? - /// The display name (e.g., Ohio). + /// The display name (Ohio). public var displayName: Swift.String? - /// The region name (e.g., us-east-2). + /// The region name (us-east-2). public var name: LightsailClientTypes.RegionName? /// The Availability Zones for databases. Follows the format us-east-2a (case-sensitive). public var relationalDatabaseAvailabilityZones: [LightsailClientTypes.AvailabilityZone]? @@ -32640,7 +32806,7 @@ extension ResetDistributionCacheOutput: ClientRuntime.HttpResponseBinding { } public struct ResetDistributionCacheOutput: Swift.Equatable { - /// The timestamp of the reset cache request (e.g., 1479734909.17) in Unix time format. + /// The timestamp of the reset cache request (1479734909.17) in Unix time format. public var createTime: ClientRuntime.Date? /// An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request. public var operation: LightsailClientTypes.Operation? @@ -33338,7 +33504,7 @@ public struct SetIpAddressTypeInput: Swift.Equatable { /// The name of the resource for which to set the IP address type. /// This member is required. public var resourceName: Swift.String? - /// The resource type. The possible values are Distribution, Instance, and LoadBalancer. Distribution-related APIs are available only in the N. Virginia (us-east-1) Amazon Web Services Region. Set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit distributions. + /// The resource type. The resource values are Distribution, Instance, and LoadBalancer. Distribution-related APIs are available only in the N. Virginia (us-east-1) Amazon Web Services Region. Set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit distributions. /// This member is required. public var resourceType: LightsailClientTypes.ResourceType? @@ -33586,6 +33752,533 @@ enum SetResourceAccessForBucketOutputError: ClientRuntime.HttpResponseErrorBindi } } +extension LightsailClientTypes.SetupExecutionDetails: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case command + case dateTime + case name + case standardError + case standardOutput + case status + case version + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let command = self.command { + try encodeContainer.encode(command, forKey: .command) + } + if let dateTime = self.dateTime { + try encodeContainer.encodeTimestamp(dateTime, format: .epochSeconds, forKey: .dateTime) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + if let standardError = self.standardError { + try encodeContainer.encode(standardError, forKey: .standardError) + } + if let standardOutput = self.standardOutput { + try encodeContainer.encode(standardOutput, forKey: .standardOutput) + } + if let status = self.status { + try encodeContainer.encode(status.rawValue, forKey: .status) + } + if let version = self.version { + try encodeContainer.encode(version, forKey: .version) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let commandDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .command) + command = commandDecoded + let dateTimeDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .dateTime) + dateTime = dateTimeDecoded + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let statusDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.SetupStatus.self, forKey: .status) + status = statusDecoded + let standardErrorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .standardError) + standardError = standardErrorDecoded + let standardOutputDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .standardOutput) + standardOutput = standardOutputDecoded + let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) + version = versionDecoded + } +} + +extension LightsailClientTypes { + /// Returns details about the commands that were run. + public struct SetupExecutionDetails: Swift.Equatable { + /// The command that was executed. + public var command: Swift.String? + /// The timestamp for when the request was run. + public var dateTime: ClientRuntime.Date? + /// The name of the target resource. + public var name: Swift.String? + /// The text written by the command to stderr. + public var standardError: Swift.String? + /// The text written by the command to stdout. + public var standardOutput: Swift.String? + /// The status of the SetupInstanceHttps request. + public var status: LightsailClientTypes.SetupStatus? + /// The current version of the script.. + public var version: Swift.String? + + public init( + command: Swift.String? = nil, + dateTime: ClientRuntime.Date? = nil, + name: Swift.String? = nil, + standardError: Swift.String? = nil, + standardOutput: Swift.String? = nil, + status: LightsailClientTypes.SetupStatus? = nil, + version: Swift.String? = nil + ) + { + self.command = command + self.dateTime = dateTime + self.name = name + self.standardError = standardError + self.standardOutput = standardOutput + self.status = status + self.version = version + } + } + +} + +extension LightsailClientTypes.SetupHistory: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case executionDetails + case operationId + case request + case resource + case status + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let executionDetails = executionDetails { + var executionDetailsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .executionDetails) + for setupexecutiondetails0 in executionDetails { + try executionDetailsContainer.encode(setupexecutiondetails0) + } + } + if let operationId = self.operationId { + try encodeContainer.encode(operationId, forKey: .operationId) + } + if let request = self.request { + try encodeContainer.encode(request, forKey: .request) + } + if let resource = self.resource { + try encodeContainer.encode(resource, forKey: .resource) + } + if let status = self.status { + try encodeContainer.encode(status.rawValue, forKey: .status) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) + operationId = operationIdDecoded + let requestDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.SetupRequest.self, forKey: .request) + request = requestDecoded + let resourceDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.SetupHistoryResource.self, forKey: .resource) + resource = resourceDecoded + let executionDetailsContainer = try containerValues.decodeIfPresent([LightsailClientTypes.SetupExecutionDetails?].self, forKey: .executionDetails) + var executionDetailsDecoded0:[LightsailClientTypes.SetupExecutionDetails]? = nil + if let executionDetailsContainer = executionDetailsContainer { + executionDetailsDecoded0 = [LightsailClientTypes.SetupExecutionDetails]() + for structure0 in executionDetailsContainer { + if let structure0 = structure0 { + executionDetailsDecoded0?.append(structure0) + } + } + } + executionDetails = executionDetailsDecoded0 + let statusDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.SetupStatus.self, forKey: .status) + status = statusDecoded + } +} + +extension LightsailClientTypes { + /// Returns a list of the commands that were ran on the target resource. The status of each command is also returned. + public struct SetupHistory: Swift.Equatable { + /// Describes the full details of the request. + public var executionDetails: [LightsailClientTypes.SetupExecutionDetails]? + /// A GUID that's used to identify the operation. + public var operationId: Swift.String? + /// Information about the specified request. + public var request: LightsailClientTypes.SetupRequest? + /// The target resource name for the request. + public var resource: LightsailClientTypes.SetupHistoryResource? + /// The status of the request. + public var status: LightsailClientTypes.SetupStatus? + + public init( + executionDetails: [LightsailClientTypes.SetupExecutionDetails]? = nil, + operationId: Swift.String? = nil, + request: LightsailClientTypes.SetupRequest? = nil, + resource: LightsailClientTypes.SetupHistoryResource? = nil, + status: LightsailClientTypes.SetupStatus? = nil + ) + { + self.executionDetails = executionDetails + self.operationId = operationId + self.request = request + self.resource = resource + self.status = status + } + } + +} + +extension LightsailClientTypes.SetupHistoryResource: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn + case createdAt + case location + case name + case resourceType + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let arn = self.arn { + try encodeContainer.encode(arn, forKey: .arn) + } + if let createdAt = self.createdAt { + try encodeContainer.encodeTimestamp(createdAt, format: .epochSeconds, forKey: .createdAt) + } + if let location = self.location { + try encodeContainer.encode(location, forKey: .location) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + if let resourceType = self.resourceType { + try encodeContainer.encode(resourceType.rawValue, forKey: .resourceType) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) + arn = arnDecoded + let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .createdAt) + createdAt = createdAtDecoded + let locationDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.ResourceLocation.self, forKey: .location) + location = locationDecoded + let resourceTypeDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.ResourceType.self, forKey: .resourceType) + resourceType = resourceTypeDecoded + } +} + +extension LightsailClientTypes { + /// The Lightsail resource that SetupHistory was ran on. + public struct SetupHistoryResource: Swift.Equatable { + /// The Amazon Resource Name (ARN) of the Lightsail resource. + public var arn: Swift.String? + /// The timestamp for when the resource was created. + public var createdAt: ClientRuntime.Date? + /// Describes the resource location. + public var location: LightsailClientTypes.ResourceLocation? + /// The name of the Lightsail resource. + public var name: Swift.String? + /// The Lightsail resource type. For example, Instance. + public var resourceType: LightsailClientTypes.ResourceType? + + public init( + arn: Swift.String? = nil, + createdAt: ClientRuntime.Date? = nil, + location: LightsailClientTypes.ResourceLocation? = nil, + name: Swift.String? = nil, + resourceType: LightsailClientTypes.ResourceType? = nil + ) + { + self.arn = arn + self.createdAt = createdAt + self.location = location + self.name = name + self.resourceType = resourceType + } + } + +} + +extension SetupInstanceHttpsInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "SetupInstanceHttpsInput(certificateProvider: \(Swift.String(describing: certificateProvider)), domainNames: \(Swift.String(describing: domainNames)), instanceName: \(Swift.String(describing: instanceName)), emailAddress: \"CONTENT_REDACTED\")"} +} + +extension SetupInstanceHttpsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateProvider + case domainNames + case emailAddress + case instanceName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let certificateProvider = self.certificateProvider { + try encodeContainer.encode(certificateProvider.rawValue, forKey: .certificateProvider) + } + if let domainNames = domainNames { + var domainNamesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .domainNames) + for setupdomainname0 in domainNames { + try domainNamesContainer.encode(setupdomainname0) + } + } + if let emailAddress = self.emailAddress { + try encodeContainer.encode(emailAddress, forKey: .emailAddress) + } + if let instanceName = self.instanceName { + try encodeContainer.encode(instanceName, forKey: .instanceName) + } + } +} + +extension SetupInstanceHttpsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct SetupInstanceHttpsInput: Swift.Equatable { + /// The certificate authority that issues the SSL/TLS certificate. + /// This member is required. + public var certificateProvider: LightsailClientTypes.CertificateProvider? + /// The name of the domain and subdomains that were specified for the SSL/TLS certificate. + /// This member is required. + public var domainNames: [Swift.String]? + /// The contact method for SSL/TLS certificate renewal alerts. You can enter one email address. + /// This member is required. + public var emailAddress: Swift.String? + /// The name of the Lightsail instance. + /// This member is required. + public var instanceName: Swift.String? + + public init( + certificateProvider: LightsailClientTypes.CertificateProvider? = nil, + domainNames: [Swift.String]? = nil, + emailAddress: Swift.String? = nil, + instanceName: Swift.String? = nil + ) + { + self.certificateProvider = certificateProvider + self.domainNames = domainNames + self.emailAddress = emailAddress + self.instanceName = instanceName + } +} + +struct SetupInstanceHttpsInputBody: Swift.Equatable { + let instanceName: Swift.String? + let emailAddress: Swift.String? + let domainNames: [Swift.String]? + let certificateProvider: LightsailClientTypes.CertificateProvider? +} + +extension SetupInstanceHttpsInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateProvider + case domainNames + case emailAddress + case instanceName + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let instanceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceName) + instanceName = instanceNameDecoded + let emailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .emailAddress) + emailAddress = emailAddressDecoded + let domainNamesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .domainNames) + var domainNamesDecoded0:[Swift.String]? = nil + if let domainNamesContainer = domainNamesContainer { + domainNamesDecoded0 = [Swift.String]() + for string0 in domainNamesContainer { + if let string0 = string0 { + domainNamesDecoded0?.append(string0) + } + } + } + domainNames = domainNamesDecoded0 + let certificateProviderDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.CertificateProvider.self, forKey: .certificateProvider) + certificateProvider = certificateProviderDecoded + } +} + +extension SetupInstanceHttpsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: SetupInstanceHttpsOutputBody = try responseDecoder.decode(responseBody: data) + self.operations = output.operations + } else { + self.operations = nil + } + } +} + +public struct SetupInstanceHttpsOutput: Swift.Equatable { + /// The available API operations for SetupInstanceHttps. + public var operations: [LightsailClientTypes.Operation]? + + public init( + operations: [LightsailClientTypes.Operation]? = nil + ) + { + self.operations = operations + } +} + +struct SetupInstanceHttpsOutputBody: Swift.Equatable { + let operations: [LightsailClientTypes.Operation]? +} + +extension SetupInstanceHttpsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case operations + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let operationsContainer = try containerValues.decodeIfPresent([LightsailClientTypes.Operation?].self, forKey: .operations) + var operationsDecoded0:[LightsailClientTypes.Operation]? = nil + if let operationsContainer = operationsContainer { + operationsDecoded0 = [LightsailClientTypes.Operation]() + for structure0 in operationsContainer { + if let structure0 = structure0 { + operationsDecoded0?.append(structure0) + } + } + } + operations = operationsDecoded0 + } +} + +enum SetupInstanceHttpsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidInputException": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceException": return try await ServiceException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnauthenticatedException": return try await UnauthenticatedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension LightsailClientTypes.SetupRequest: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateProvider + case domainNames + case instanceName + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let certificateProvider = self.certificateProvider { + try encodeContainer.encode(certificateProvider.rawValue, forKey: .certificateProvider) + } + if let domainNames = domainNames { + var domainNamesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .domainNames) + for setupdomainname0 in domainNames { + try domainNamesContainer.encode(setupdomainname0) + } + } + if let instanceName = self.instanceName { + try encodeContainer.encode(instanceName, forKey: .instanceName) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let instanceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceName) + instanceName = instanceNameDecoded + let domainNamesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .domainNames) + var domainNamesDecoded0:[Swift.String]? = nil + if let domainNamesContainer = domainNamesContainer { + domainNamesDecoded0 = [Swift.String]() + for string0 in domainNamesContainer { + if let string0 = string0 { + domainNamesDecoded0?.append(string0) + } + } + } + domainNames = domainNamesDecoded0 + let certificateProviderDecoded = try containerValues.decodeIfPresent(LightsailClientTypes.CertificateProvider.self, forKey: .certificateProvider) + certificateProvider = certificateProviderDecoded + } +} + +extension LightsailClientTypes { + /// Returns information that was submitted during the SetupInstanceHttps request. Email information is redacted for privacy. + public struct SetupRequest: Swift.Equatable { + /// The Certificate Authority (CA) that issues the SSL/TLS certificate. + public var certificateProvider: LightsailClientTypes.CertificateProvider? + /// The name of the domain and subdomains that the SSL/TLS certificate secures. + public var domainNames: [Swift.String]? + /// The name of the Lightsail instance. + public var instanceName: Swift.String? + + public init( + certificateProvider: LightsailClientTypes.CertificateProvider? = nil, + domainNames: [Swift.String]? = nil, + instanceName: Swift.String? = nil + ) + { + self.certificateProvider = certificateProvider + self.domainNames = domainNames + self.instanceName = instanceName + } + } + +} + +extension LightsailClientTypes { + public enum SetupStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case failed + case inprogress + case succeeded + case sdkUnknown(Swift.String) + + public static var allCases: [SetupStatus] { + return [ + .failed, + .inprogress, + .succeeded, + .sdkUnknown("") + ] + } + 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 .failed: return "failed" + case .inprogress: return "inProgress" + case .succeeded: return "succeeded" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = SetupStatus(rawValue: rawValue) ?? SetupStatus.sdkUnknown(rawValue) + } + } +} + extension StartGUISessionInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceName @@ -33996,11 +34689,11 @@ extension LightsailClientTypes.StaticIp: Swift.Codable { extension LightsailClientTypes { /// Describes a static IP. public struct StaticIp: Swift.Equatable { - /// The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE). + /// The Amazon Resource Name (ARN) of the static IP (arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE). public var arn: Swift.String? - /// The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1). + /// The instance where the static IP is attached (Amazon_Linux-1GB-Ohio-1). public var attachedTo: Swift.String? - /// The timestamp when the static IP was created (e.g., 1479735304.222). + /// The timestamp when the static IP was created (1479735304.222). public var createdAt: ClientRuntime.Date? /// The static IP address. public var ipAddress: Swift.String? @@ -34008,7 +34701,7 @@ extension LightsailClientTypes { public var isAttached: Swift.Bool? /// The region and Availability Zone where the static IP was created. public var location: LightsailClientTypes.ResourceLocation? - /// The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE). + /// The name of the static IP (StaticIP-Ohio-EXAMPLE). public var name: Swift.String? /// The resource type (usually StaticIp). public var resourceType: LightsailClientTypes.ResourceType? @@ -36370,7 +37063,7 @@ public struct UpdateLoadBalancerAttributeInput: Swift.Equatable { /// * If you specify TlsPolicyName for the attributeName request parameter, then the attributeValue request parameter must be the name of the TLS policy. Use the [GetLoadBalancerTlsPolicies](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetLoadBalancerTlsPolicies.html) action to get a list of TLS policy names that you can specify. /// This member is required. public var attributeValue: Swift.String? - /// The name of the load balancer that you want to modify (e.g., my-load-balancer. + /// The name of the load balancer that you want to modify (my-load-balancer. /// This member is required. public var loadBalancerName: Swift.String? diff --git a/Sources/Services/AWSLocation/LocationClient.swift b/Sources/Services/AWSLocation/LocationClient.swift index 05bfc79cddd..f2da5314113 100644 --- a/Sources/Services/AWSLocation/LocationClient.swift +++ b/Sources/Services/AWSLocation/LocationClient.swift @@ -927,6 +927,7 @@ extension LocationClient: LocationClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) diff --git a/Sources/Services/AWSLocation/models/Models.swift b/Sources/Services/AWSLocation/models/Models.swift index 000d7c216ee..640ba17f549 100644 --- a/Sources/Services/AWSLocation/models/Models.swift +++ b/Sources/Services/AWSLocation/models/Models.swift @@ -214,7 +214,7 @@ extension LocationClientTypes { /// /// * The resources must be in the same partition, region, and account-id as the key that is being created. /// - /// * Other than wildcards, you must include the full ARN, including the arn, partition, service, region, account-id and resource-id, delimited by colons (:). + /// * Other than wildcards, you must include the full ARN, including the arn, partition, service, region, account-id and resource-id delimited by colons (:). /// /// * No spaces allowed, even with wildcards. For example, arn:aws:geo:region:account-id:map/ExampleMap*. /// @@ -4348,6 +4348,19 @@ enum DeleteGeofenceCollectionOutputError: ClientRuntime.HttpResponseErrorBinding } } +extension DeleteKeyInput: ClientRuntime.QueryItemProvider { + public var queryItems: [ClientRuntime.URLQueryItem] { + get throws { + var items = [ClientRuntime.URLQueryItem]() + if let forceDelete = forceDelete { + let forceDeleteQueryItem = ClientRuntime.URLQueryItem(name: "forceDelete".urlPercentEncoding(), value: Swift.String(forceDelete).urlPercentEncoding()) + items.append(forceDeleteQueryItem) + } + return items + } + } +} + extension DeleteKeyInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let keyName = keyName else { @@ -4358,14 +4371,18 @@ extension DeleteKeyInput: ClientRuntime.URLPathProvider { } public struct DeleteKeyInput: Swift.Equatable { + /// ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key. Valid values: true, or false. Required: No This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use. + public var forceDelete: Swift.Bool? /// The name of the API key to delete. /// This member is required. public var keyName: Swift.String? public init( + forceDelete: Swift.Bool? = nil, keyName: Swift.String? = nil ) { + self.forceDelete = forceDelete self.keyName = keyName } } @@ -6796,7 +6813,7 @@ public struct GetMapGlyphsInput: Swift.Equatable { /// /// * VectorEsriStreets – Arial Regular | Arial Italic | Arial Bold /// - /// * VectorEsriNavigation – Arial Regular | Arial Italic | Arial Bold + /// * VectorEsriNavigation – Arial Regular | Arial Italic | Arial Bold | Arial Unicode MS Bold | Arial Unicode MS Regular /// /// /// Valid font stacks for [HERE Technologies](https://docs.aws.amazon.com/location/latest/developerguide/HERE.html) styles: @@ -7391,7 +7408,17 @@ public struct GetPlaceInput: Swift.Equatable { public var key: Swift.String? /// The preferred language used to return results. The value must be a valid [BCP 47](https://tools.ietf.org/search/bcp47) language tag, for example, en for English. This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result. For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the language parameter set to en. The city in the results will most likely be returned as Athens. If you set the language parameter to el, for Greek, then the city in the results will more likely be returned as Αθήνα. If the data provider does not have a value for Greek, the result will be in a language that the provider does support. public var language: Swift.String? - /// The identifier of the place to find. + /// The identifier of the place to find. While you can use PlaceID in subsequent requests, PlaceID is not intended to be a permanent identifier and the ID can change between consecutive API calls. Please see the following PlaceID behaviour for each data provider: + /// + /// * Esri: Place IDs will change every quarter at a minimum. The typical time period for these changes would be March, June, September, and December. Place IDs might also change between the typical quarterly change but that will be much less frequent. + /// + /// * HERE: We recommend that you cache data for no longer than a week to keep your data data fresh. You can assume that less than 1% ID shifts will release over release which is approximately 1 - 2 times per week. + /// + /// * Grab: Place IDs can expire or become invalid in the following situations. + /// + /// * Data operations: The POI may be removed from Grab POI database by Grab Map Ops based on the ground-truth, such as being closed in the real world, being detected as a duplicate POI, or having incorrect information. Grab will synchronize data to the Waypoint environment on weekly basis. + /// + /// * Interpolated POI: Interpolated POI is a temporary POI generated in real time when serving a request, and it will be marked as derived in the place.result_type field in the response. The information of interpolated POIs will be retained for at least 30 days, which means that within 30 days, you are able to obtain POI details by Place ID from Place Details API. After 30 days, the interpolated POIs(both Place ID and details) may expire and inaccessible from the Places Details API. /// This member is required. public var placeId: Swift.String? @@ -9908,12 +9935,19 @@ extension LocationClientTypes { extension LocationClientTypes.MapConfiguration: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case customLayers = "CustomLayers" case politicalView = "PoliticalView" case style = "Style" } public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let customLayers = customLayers { + var customLayersContainer = encodeContainer.nestedUnkeyedContainer(forKey: .customLayers) + for customlayer0 in customLayers { + try customLayersContainer.encode(customlayer0) + } + } if let politicalView = self.politicalView { try encodeContainer.encode(politicalView, forKey: .politicalView) } @@ -9928,17 +9962,30 @@ extension LocationClientTypes.MapConfiguration: Swift.Codable { style = styleDecoded let politicalViewDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .politicalView) politicalView = politicalViewDecoded + let customLayersContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .customLayers) + var customLayersDecoded0:[Swift.String]? = nil + if let customLayersContainer = customLayersContainer { + customLayersDecoded0 = [Swift.String]() + for string0 in customLayersContainer { + if let string0 = string0 { + customLayersDecoded0?.append(string0) + } + } + } + customLayers = customLayersDecoded0 } } extension LocationClientTypes { /// Specifies the map tile style selected from an available provider. public struct MapConfiguration: Swift.Equatable { + /// Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style. Default is unset. Currenlty only VectorEsriNavigation supports CustomLayers. For more information, see [Custom Layers](https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html#map-custom-layers). + public var customLayers: [Swift.String]? /// Specifies the political view for the style. Leave unset to not use a political view, or, for styles that support specific political views, you can choose a view, such as IND for the Indian view. Default is unset. Not all map resources or styles support political view styles. See [Political views](https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html#political-views) for more information. public var politicalView: Swift.String? /// Specifies the map style selected from an available data provider. Valid [Esri map styles](https://docs.aws.amazon.com/location/latest/developerguide/esri.html): /// - /// * VectorEsriDarkGrayCanvas – The Esri Dark Gray Canvas map style. A vector basemap with a dark gray, neutral background with minimal colors, labels, and features that's designed to draw attention to your thematic content. + /// * VectorEsriNavigation – The Esri Navigation map style, which provides a detailed basemap for the world symbolized with a custom navigation map style that's designed for use during the day in mobile devices. It also includes a richer set of places, such as shops, services, restaurants, attractions, and other points of interest. Enable the POI layer by setting it in CustomLayers to leverage the additional places data. /// /// * RasterEsriImagery – The Esri Imagery map style. A raster basemap that provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. /// @@ -9948,21 +9995,21 @@ extension LocationClientTypes { /// /// * VectorEsriStreets – The Esri Street Map style, which provides a detailed vector basemap for the world symbolized with a classic Esri street map style. The vector tile layer is similar in content and style to the World Street Map raster map. /// - /// * VectorEsriNavigation – The Esri Navigation map style, which provides a detailed basemap for the world symbolized with a custom navigation map style that's designed for use during the day in mobile devices. + /// * VectorEsriDarkGrayCanvas – The Esri Dark Gray Canvas map style. A vector basemap with a dark gray, neutral background with minimal colors, labels, and features that's designed to draw attention to your thematic content. /// /// /// Valid [HERE Technologies map styles](https://docs.aws.amazon.com/location/latest/developerguide/HERE.html): /// - /// * VectorHereContrast – The HERE Contrast (Berlin) map style is a high contrast detailed base map of the world that blends 3D and 2D rendering. The VectorHereContrast style has been renamed from VectorHereBerlin. VectorHereBerlin has been deprecated, but will continue to work in applications that use it. - /// /// * VectorHereExplore – A default HERE map style containing a neutral, global map and its features including roads, buildings, landmarks, and water features. It also now includes a fully designed map of Japan. /// - /// * VectorHereExploreTruck – A global map containing truck restrictions and attributes (e.g. width / height / HAZMAT) symbolized with highlighted segments and icons on top of HERE Explore to support use cases within transport and logistics. - /// /// * RasterHereExploreSatellite – A global map containing high resolution satellite imagery. /// /// * HybridHereExploreSatellite – A global map displaying the road network, street names, and city labels over satellite imagery. This style will automatically retrieve both raster and vector tiles, and your charges will be based on total tiles retrieved. Hybrid styles use both vector and raster tiles when rendering the map that you see. This means that more tiles are retrieved than when using either vector or raster tiles alone. Your charges will include all tiles retrieved. /// + /// * VectorHereContrast – The HERE Contrast (Berlin) map style is a high contrast detailed base map of the world that blends 3D and 2D rendering. The VectorHereContrast style has been renamed from VectorHereBerlin. VectorHereBerlin has been deprecated, but will continue to work in applications that use it. + /// + /// * VectorHereExploreTruck – A global map containing truck restrictions and attributes (e.g. width / height / HAZMAT) symbolized with highlighted segments and icons on top of HERE Explore to support use cases within transport and logistics. + /// /// /// Valid [GrabMaps map styles](https://docs.aws.amazon.com/location/latest/developerguide/grab.html): /// @@ -9984,10 +10031,12 @@ extension LocationClientTypes { public var style: Swift.String? public init( + customLayers: [Swift.String]? = nil, politicalView: Swift.String? = nil, style: Swift.String? = nil ) { + self.customLayers = customLayers self.politicalView = politicalView self.style = style } @@ -9997,11 +10046,18 @@ extension LocationClientTypes { extension LocationClientTypes.MapConfigurationUpdate: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case customLayers = "CustomLayers" case politicalView = "PoliticalView" } public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let customLayers = customLayers { + var customLayersContainer = encodeContainer.nestedUnkeyedContainer(forKey: .customLayers) + for customlayer0 in customLayers { + try customLayersContainer.encode(customlayer0) + } + } if let politicalView = self.politicalView { try encodeContainer.encode(politicalView, forKey: .politicalView) } @@ -10011,19 +10067,34 @@ extension LocationClientTypes.MapConfigurationUpdate: Swift.Codable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let politicalViewDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .politicalView) politicalView = politicalViewDecoded + let customLayersContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .customLayers) + var customLayersDecoded0:[Swift.String]? = nil + if let customLayersContainer = customLayersContainer { + customLayersDecoded0 = [Swift.String]() + for string0 in customLayersContainer { + if let string0 = string0 { + customLayersDecoded0?.append(string0) + } + } + } + customLayers = customLayersDecoded0 } } extension LocationClientTypes { /// Specifies the political view for the style. public struct MapConfigurationUpdate: Swift.Equatable { + /// Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style. Default is unset. Currenlty only VectorEsriNavigation supports CustomLayers. For more information, see [Custom Layers](https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html#map-custom-layers). + public var customLayers: [Swift.String]? /// Specifies the political view for the style. Set to an empty string to not use a political view, or, for styles that support specific political views, you can choose a view, such as IND for the Indian view. Not all map resources or styles support political view styles. See [Political views](https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html#political-views) for more information. public var politicalView: Swift.String? public init( + customLayers: [Swift.String]? = nil, politicalView: Swift.String? = nil ) { + self.customLayers = customLayers self.politicalView = politicalView } } @@ -10227,7 +10298,7 @@ extension LocationClientTypes { public var region: Swift.String? /// The name for a street or a road to identify a location. For example, Main Street. public var street: Swift.String? - /// An area that's part of a larger municipality. For example, Blissville is a submunicipality in the Queen County in New York. This property supported by Esri and OpenData. The Esri property is district, and the OpenData property is borough. + /// An area that's part of a larger municipality. For example, Blissville is a submunicipality in the Queen County in New York. This property is only returned for a place index that uses Esri as a data provider. The property is represented as a district. For more information about data providers, see [Amazon Location Service data providers](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html). public var subMunicipality: Swift.String? /// A county, or an area that's part of a larger region. For example, Metro Vancouver. public var subRegion: Swift.String? @@ -10235,9 +10306,9 @@ extension LocationClientTypes { public var supplementalCategories: [Swift.String]? /// The time zone in which the Place is located. Returned only when using HERE or Grab as the selected partner. public var timeZone: LocationClientTypes.TimeZone? - /// For addresses with multiple units, the unit identifier. Can include numbers and letters, for example 3B or Unit 123. Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for SearchPlaceIndexForPosition. + /// For addresses with multiple units, the unit identifier. Can include numbers and letters, for example 3B or Unit 123. This property is returned only for a place index that uses Esri or Grab as a data provider. It is not returned for SearchPlaceIndexForPosition. public var unitNumber: Swift.String? - /// For addresses with a UnitNumber, the type of unit. For example, Apartment. Returned only for a place index that uses Esri as a data provider. + /// For addresses with a UnitNumber, the type of unit. For example, Apartment. This property is returned only for a place index that uses Esri as a data provider. public var unitType: Swift.String? public init( @@ -10973,7 +11044,17 @@ extension LocationClientTypes { public struct SearchForSuggestionsResult: Swift.Equatable { /// The Amazon Location categories that describe the Place. For more information about using categories, including a list of Amazon Location categories, see [Categories and filtering](https://docs.aws.amazon.com/location/latest/developerguide/category-filtering.html), in the Amazon Location Service Developer Guide. public var categories: [Swift.String]? - /// The unique identifier of the Place. You can use this with the GetPlace operation to find the place again later, or to get full information for the Place. The GetPlace request must use the same PlaceIndex resource as the SearchPlaceIndexForSuggestions that generated the Place ID. For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes that use Esri, Grab, or HERE as data providers. + /// The unique identifier of the Place. You can use this with the GetPlace operation to find the place again later, or to get full information for the Place. The GetPlace request must use the same PlaceIndex resource as the SearchPlaceIndexForSuggestions that generated the Place ID. For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes that use Esri, Grab, or HERE as data providers. While you can use PlaceID in subsequent requests, PlaceID is not intended to be a permanent identifier and the ID can change between consecutive API calls. Please see the following PlaceID behaviour for each data provider: + /// + /// * Esri: Place IDs will change every quarter at a minimum. The typical time period for these changes would be March, June, September, and December. Place IDs might also change between the typical quarterly change but that will be much less frequent. + /// + /// * HERE: We recommend that you cache data for no longer than a week to keep your data data fresh. You can assume that less than 1% ID shifts will release over release which is approximately 1 - 2 times per week. + /// + /// * Grab: Place IDs can expire or become invalid in the following situations. + /// + /// * Data operations: The POI may be removed from Grab POI database by Grab Map Ops based on the ground-truth, such as being closed in the real world, being detected as a duplicate POI, or having incorrect information. Grab will synchronize data to the Waypoint environment on weekly basis. + /// + /// * Interpolated POI: Interpolated POI is a temporary POI generated in real time when serving a request, and it will be marked as derived in the place.result_type field in the response. The information of interpolated POIs will be retained for at least 30 days, which means that within 30 days, you are able to obtain POI details by Place ID from Place Details API. After 30 days, the interpolated POIs(both Place ID and details) may expire and inaccessible from the Places Details API. public var placeId: Swift.String? /// Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories. public var supplementalCategories: [Swift.String]? diff --git a/Sources/Services/AWSMWAA/models/Models.swift b/Sources/Services/AWSMWAA/models/Models.swift index 3cb5c883315..1e0b00e152e 100644 --- a/Sources/Services/AWSMWAA/models/Models.swift +++ b/Sources/Services/AWSMWAA/models/Models.swift @@ -584,7 +584,7 @@ extension CreateWebLoginTokenInputBody: Swift.Decodable { extension CreateWebLoginTokenOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { - "CreateWebLoginTokenOutput(webServerHostname: \(Swift.String(describing: webServerHostname)), webToken: \"CONTENT_REDACTED\")"} + "CreateWebLoginTokenOutput(airflowIdentity: \(Swift.String(describing: airflowIdentity)), iamIdentity: \(Swift.String(describing: iamIdentity)), webServerHostname: \(Swift.String(describing: webServerHostname)), webToken: \"CONTENT_REDACTED\")"} } extension CreateWebLoginTokenOutput: ClientRuntime.HttpResponseBinding { @@ -592,9 +592,13 @@ extension CreateWebLoginTokenOutput: ClientRuntime.HttpResponseBinding { if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { let output: CreateWebLoginTokenOutputBody = try responseDecoder.decode(responseBody: data) + self.airflowIdentity = output.airflowIdentity + self.iamIdentity = output.iamIdentity self.webServerHostname = output.webServerHostname self.webToken = output.webToken } else { + self.airflowIdentity = nil + self.iamIdentity = nil self.webServerHostname = nil self.webToken = nil } @@ -602,16 +606,24 @@ extension CreateWebLoginTokenOutput: ClientRuntime.HttpResponseBinding { } public struct CreateWebLoginTokenOutput: Swift.Equatable { + /// The user name of the Apache Airflow identity creating the web login token. + public var airflowIdentity: Swift.String? + /// The name of the IAM identity creating the web login token. This might be an IAM user, or an assumed or federated identity. For example, assumed-role/Admin/your-name. + public var iamIdentity: Swift.String? /// The Airflow web server hostname for the environment. public var webServerHostname: Swift.String? /// An Airflow web server login token. public var webToken: Swift.String? public init( + airflowIdentity: Swift.String? = nil, + iamIdentity: Swift.String? = nil, webServerHostname: Swift.String? = nil, webToken: Swift.String? = nil ) { + self.airflowIdentity = airflowIdentity + self.iamIdentity = iamIdentity self.webServerHostname = webServerHostname self.webToken = webToken } @@ -620,10 +632,14 @@ public struct CreateWebLoginTokenOutput: Swift.Equatable { struct CreateWebLoginTokenOutputBody: Swift.Equatable { let webToken: Swift.String? let webServerHostname: Swift.String? + let iamIdentity: Swift.String? + let airflowIdentity: Swift.String? } extension CreateWebLoginTokenOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case airflowIdentity = "AirflowIdentity" + case iamIdentity = "IamIdentity" case webServerHostname = "WebServerHostname" case webToken = "WebToken" } @@ -634,6 +650,10 @@ extension CreateWebLoginTokenOutputBody: Swift.Decodable { webToken = webTokenDecoded let webServerHostnameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .webServerHostname) webServerHostname = webServerHostnameDecoded + let iamIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamIdentity) + iamIdentity = iamIdentityDecoded + let airflowIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .airflowIdentity) + airflowIdentity = airflowIdentityDecoded } } diff --git a/Sources/Services/AWSMacie2/models/Models.swift b/Sources/Services/AWSMacie2/models/Models.swift index 22b2e52466d..c7a7988a799 100644 --- a/Sources/Services/AWSMacie2/models/Models.swift +++ b/Sources/Services/AWSMacie2/models/Models.swift @@ -1325,7 +1325,7 @@ extension Macie2ClientTypes.BucketCountByEncryptionType: Swift.Codable { extension Macie2ClientTypes { /// Provides information about the number of S3 buckets whose settings do or don't specify default server-side encryption behavior for objects that are added to the buckets. For detailed information about these settings, see [Setting default server-side encryption behavior for Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-encryption.html) in the Amazon Simple Storage Service User Guide. public struct BucketCountByEncryptionType: Swift.Equatable { - /// The total number of buckets whose default encryption settings are configured to encrypt new objects with an Amazon Web Services managed KMS key or a customer managed KMS key. By default, these buckets encrypt new objects automatically using SSE-KMS encryption. + /// The total number of buckets whose default encryption settings are configured to encrypt new objects with an KMS key, either an Amazon Web Services managed key or a customer managed key. By default, these buckets encrypt new objects automatically using DSSE-KMS or SSE-KMS encryption. public var kmsManaged: Swift.Int? /// The total number of buckets whose default encryption settings are configured to encrypt new objects with an Amazon S3 managed key. By default, these buckets encrypt new objects automatically using SSE-S3 encryption. public var s3Managed: Swift.Int? @@ -2164,9 +2164,11 @@ extension Macie2ClientTypes { public var kmsMasterKeyId: Swift.String? /// The server-side encryption algorithm that's used by default to encrypt objects that are added to the bucket. Possible values are: /// - /// * AES256 - New objects are encrypted with an Amazon S3 managed key. They use SSE-S3 encryption. + /// * AES256 - New objects use SSE-S3 encryption. They're encrypted with an Amazon S3 managed key. /// - /// * aws:kms - New objects are encrypted with an KMS key (kmsMasterKeyId), either an Amazon Web Services managed key or a customer managed key. They use SSE-KMS encryption. + /// * aws:kms - New objects use SSE-KMS encryption. They're encrypted with an KMS key (kmsMasterKeyId), either an Amazon Web Services managed key or a customer managed key. + /// + /// * aws:kms:dsse - New objects use DSSE-KMS encryption. They're encrypted with an KMS key (kmsMasterKeyId), either an Amazon Web Services managed key or a customer managed key. /// /// * NONE - The bucket's default encryption settings don't specify server-side encryption behavior for new objects. public var type: Macie2ClientTypes.ModelType? @@ -6521,6 +6523,7 @@ extension Macie2ClientTypes { case `none` case unknown case awsKms + case awsKmsDsse case sdkUnknown(Swift.String) public static var allCases: [EncryptionType] { @@ -6529,6 +6532,7 @@ extension Macie2ClientTypes { .none, .unknown, .awsKms, + .awsKmsDsse, .sdkUnknown("") ] } @@ -6542,6 +6546,7 @@ extension Macie2ClientTypes { case .none: return "NONE" case .unknown: return "UNKNOWN" case .awsKms: return "aws:kms" + case .awsKmsDsse: return "aws:kms:dsse" case let .sdkUnknown(s): return s } } @@ -9650,17 +9655,17 @@ public struct GetSensitiveDataOccurrencesAvailabilityOutput: Swift.Equatable { /// /// * ACCOUNT_NOT_IN_ORGANIZATION - The affected account isn't currently part of your organization. Or the account is part of your organization but Macie isn't currently enabled for the account. You're not allowed to access the affected S3 object by using Macie. /// - /// * INVALID_CLASSIFICATION_RESULT - There isn't a corresponding sensitive data discovery result for the finding. Or the corresponding sensitive data discovery result isn't available, is malformed or corrupted, or uses an unsupported storage format. Macie can't verify the location of the sensitive data to retrieve. + /// * INVALID_CLASSIFICATION_RESULT - There isn't a corresponding sensitive data discovery result for the finding. Or the corresponding sensitive data discovery result isn't available in the current Amazon Web Services Region, is malformed or corrupted, or uses an unsupported storage format. Macie can't verify the location of the sensitive data to retrieve. /// /// * INVALID_RESULT_SIGNATURE - The corresponding sensitive data discovery result is stored in an S3 object that wasn't signed by Macie. Macie can't verify the integrity and authenticity of the sensitive data discovery result. Therefore, Macie can't verify the location of the sensitive data to retrieve. /// - /// * MEMBER_ROLE_TOO_PERMISSIVE - The affected member account is configured to retrieve occurrences of sensitive data by using an IAM role whose trust or permissions policy doesn't meet Macie requirements for restricting access to the role. Or the role's trust policy doesn't specify the correct external ID. Macie can't assume the role to retrieve the sensitive data. + /// * MEMBER_ROLE_TOO_PERMISSIVE - The trust or permissions policy for the IAM role in the affected member account doesn't meet Macie requirements for restricting access to the role. Or the role's trust policy doesn't specify the correct external ID for your organization. Macie can't assume the role to retrieve the sensitive data. /// /// * MISSING_GET_MEMBER_PERMISSION - You're not allowed to retrieve information about the association between your account and the affected account. Macie can't determine whether you’re allowed to access the affected S3 object as the delegated Macie administrator for the affected account. /// /// * OBJECT_EXCEEDS_SIZE_QUOTA - The storage size of the affected S3 object exceeds the size quota for retrieving occurrences of sensitive data from this type of file. /// - /// * OBJECT_UNAVAILABLE - The affected S3 object isn't available. The object was renamed, moved, or deleted. Or the object was changed after Macie created the finding. + /// * OBJECT_UNAVAILABLE - The affected S3 object isn't available. The object was renamed, moved, deleted, or changed after Macie created the finding. Or the object is encrypted with an KMS key that's currently disabled. /// /// * RESULT_NOT_SIGNED - The corresponding sensitive data discovery result is stored in an S3 object that hasn't been signed. Macie can't verify the integrity and authenticity of the sensitive data discovery result. Therefore, Macie can't verify the location of the sensitive data to retrieve. /// @@ -14091,11 +14096,11 @@ extension Macie2ClientTypes.ObjectCountByEncryptionType: Swift.Codable { extension Macie2ClientTypes { /// Provides information about the number of objects that are in an S3 bucket and use certain types of server-side encryption, use client-side encryption, or aren't encrypted. public struct ObjectCountByEncryptionType: Swift.Equatable { - /// The total number of objects that are encrypted with a customer-provided key. The objects use customer-provided server-side encryption (SSE-C). + /// The total number of objects that are encrypted with customer-provided keys. The objects use server-side encryption with customer-provided keys (SSE-C). public var customerManaged: Swift.Int? - /// The total number of objects that are encrypted with an KMS key, either an Amazon Web Services managed key or a customer managed key. The objects use KMS encryption (SSE-KMS). + /// The total number of objects that are encrypted with KMS keys, either Amazon Web Services managed keys or customer managed keys. The objects use dual-layer server-side encryption or server-side encryption with KMS keys (DSSE-KMS or SSE-KMS). public var kmsManaged: Swift.Int? - /// The total number of objects that are encrypted with an Amazon S3 managed key. The objects use Amazon S3 managed encryption (SSE-S3). + /// The total number of objects that are encrypted with Amazon S3 managed keys. The objects use server-side encryption with Amazon S3 managed keys (SSE-S3). public var s3Managed: Swift.Int? /// The total number of objects that use client-side encryption or aren't encrypted. public var unencrypted: Swift.Int? @@ -15203,9 +15208,9 @@ extension Macie2ClientTypes.RetrievalConfiguration: Swift.Codable { extension Macie2ClientTypes { /// Provides information about the access method and settings that are used to retrieve occurrences of sensitive data reported by findings. public struct RetrievalConfiguration: Swift.Equatable { - /// The external ID to specify in the trust policy for the IAM role to assume when retrieving sensitive data from affected S3 objects (roleName). The trust policy must include an sts:ExternalId condition that requires this ID. This ID is a unique alphanumeric string that Amazon Macie generates automatically after you configure it to assume a role. This value is null if the value for retrievalMode is CALLER_CREDENTIALS. + /// The external ID to specify in the trust policy for the IAM role to assume when retrieving sensitive data from affected S3 objects (roleName). This value is null if the value for retrievalMode is CALLER_CREDENTIALS. This ID is a unique alphanumeric string that Amazon Macie generates automatically after you configure it to assume an IAM role. For a Macie administrator to retrieve sensitive data from an affected S3 object for a member account, the trust policy for the role in the member account must include an sts:ExternalId condition that requires this ID. public var externalId: Swift.String? - /// The access method that's used when retrieving sensitive data from affected S3 objects. Valid values are: ASSUME_ROLE, assume an IAM role that is in the affected Amazon Web Services account and delegates access to Amazon Macie (roleName); and, CALLER_CREDENTIALS, use the credentials of the IAM user who requests the sensitive data. + /// The access method that's used to retrieve sensitive data from affected S3 objects. Valid values are: ASSUME_ROLE, assume an IAM role that is in the affected Amazon Web Services account and delegates access to Amazon Macie (roleName); and, CALLER_CREDENTIALS, use the credentials of the IAM user who requests the sensitive data. /// This member is required. public var retrievalMode: Macie2ClientTypes.RetrievalMode? /// The name of the IAM role that is in the affected Amazon Web Services account and Amazon Macie is allowed to assume when retrieving sensitive data from affected S3 objects for the account. This value is null if the value for retrievalMode is CALLER_CREDENTIALS. @@ -15288,7 +15293,7 @@ extension Macie2ClientTypes { public struct RevealConfiguration: Swift.Equatable { /// The Amazon Resource Name (ARN), ID, or alias of the KMS key to use to encrypt sensitive data that's retrieved. The key must be an existing, customer managed, symmetric encryption key that's enabled in the same Amazon Web Services Region as the Amazon Macie account. If this value specifies an alias, it must include the following prefix: alias/. If this value specifies a key that's owned by another Amazon Web Services account, it must specify the ARN of the key or the ARN of the key's alias. public var kmsKeyId: Swift.String? - /// The status of the configuration for the Amazon Macie account. In a request, valid values are: ENABLED, enable the configuration for the account; and, DISABLED, disable the configuration for the account. In a response, possible values are: ENABLED, the configuration is currently enabled for the account; and, DISABLED, the configuration is currently disabled for the account. + /// The status of the configuration for the Amazon Macie account. In a response, possible values are: ENABLED, the configuration is currently enabled for the account; and, DISABLED, the configuration is currently disabled for the account. In a request, valid values are: ENABLED, enable the configuration for the account; and, DISABLED, disable the configuration for the account. If you disable the configuration, you also permanently delete current settings that specify how to access affected S3 objects. If your current access method is ASSUME_ROLE, Macie also deletes the external ID and role name currently specified for the configuration. These settings can't be recovered after they're deleted. /// This member is required. public var status: Macie2ClientTypes.RevealStatus? @@ -18771,6 +18776,7 @@ extension Macie2ClientTypes { case aes256 case `none` case awsKms + case awsKmsDsse case sdkUnknown(Swift.String) public static var allCases: [ModelType] { @@ -18778,6 +18784,7 @@ extension Macie2ClientTypes { .aes256, .none, .awsKms, + .awsKmsDsse, .sdkUnknown("") ] } @@ -18790,6 +18797,7 @@ extension Macie2ClientTypes { case .aes256: return "AES256" case .none: return "NONE" case .awsKms: return "aws:kms" + case .awsKmsDsse: return "aws:kms:dsse" case let .sdkUnknown(s): return s } } @@ -18913,17 +18921,17 @@ public struct UnprocessableEntityException: ClientRuntime.ModeledError, AWSClien /// /// * ACCOUNT_NOT_IN_ORGANIZATION - The affected account isn't currently part of your organization. Or the account is part of your organization but Macie isn't currently enabled for the account. You're not allowed to access the affected S3 object by using Macie. /// - /// * INVALID_CLASSIFICATION_RESULT - There isn't a corresponding sensitive data discovery result for the finding. Or the corresponding sensitive data discovery result isn't available, is malformed or corrupted, or uses an unsupported storage format. Macie can't verify the location of the sensitive data to retrieve. + /// * INVALID_CLASSIFICATION_RESULT - There isn't a corresponding sensitive data discovery result for the finding. Or the corresponding sensitive data discovery result isn't available in the current Amazon Web Services Region, is malformed or corrupted, or uses an unsupported storage format. Macie can't verify the location of the sensitive data to retrieve. /// /// * INVALID_RESULT_SIGNATURE - The corresponding sensitive data discovery result is stored in an S3 object that wasn't signed by Macie. Macie can't verify the integrity and authenticity of the sensitive data discovery result. Therefore, Macie can't verify the location of the sensitive data to retrieve. /// - /// * MEMBER_ROLE_TOO_PERMISSIVE - The affected member account is configured to retrieve occurrences of sensitive data by using an IAM role whose trust or permissions policy doesn't meet Macie requirements for restricting access to the role. Or the role's trust policy doesn't specify the correct external ID. Macie can't assume the role to retrieve the sensitive data. + /// * MEMBER_ROLE_TOO_PERMISSIVE - The trust or permissions policy for the IAM role in the affected member account doesn't meet Macie requirements for restricting access to the role. Or the role's trust policy doesn't specify the correct external ID for your organization. Macie can't assume the role to retrieve the sensitive data. /// /// * MISSING_GET_MEMBER_PERMISSION - You're not allowed to retrieve information about the association between your account and the affected account. Macie can't determine whether you’re allowed to access the affected S3 object as the delegated Macie administrator for the affected account. /// /// * OBJECT_EXCEEDS_SIZE_QUOTA - The storage size of the affected S3 object exceeds the size quota for retrieving occurrences of sensitive data from this type of file. /// - /// * OBJECT_UNAVAILABLE - The affected S3 object isn't available. The object was renamed, moved, or deleted. Or the object was changed after Macie created the finding. + /// * OBJECT_UNAVAILABLE - The affected S3 object isn't available. The object was renamed, moved, deleted, or changed after Macie created the finding. Or the object is encrypted with an KMS key that's currently disabled. /// /// * RESULT_NOT_SIGNED - The corresponding sensitive data discovery result is stored in an S3 object that hasn't been signed. Macie can't verify the integrity and authenticity of the sensitive data discovery result. Therefore, Macie can't verify the location of the sensitive data to retrieve. /// @@ -20134,7 +20142,7 @@ extension Macie2ClientTypes.UpdateRetrievalConfiguration: Swift.Codable { } extension Macie2ClientTypes { - /// Specifies the access method and settings to use when retrieving occurrences of sensitive data reported by findings. If your request specifies an Identity and Access Management (IAM) role to assume when retrieving the sensitive data, Amazon Macie verifies that the role exists and the attached policies are configured correctly. If there's an issue, Macie returns an error. For information about addressing the issue, see [Retrieving sensitive data samples with findings](https://docs.aws.amazon.com/macie/latest/user/findings-retrieve-sd.html) in the Amazon Macie User Guide. + /// Specifies the access method and settings to use when retrieving occurrences of sensitive data reported by findings. If your request specifies an Identity and Access Management (IAM) role to assume, Amazon Macie verifies that the role exists and the attached policies are configured correctly. If there's an issue, Macie returns an error. For information about addressing the issue, see [Configuration options and requirements for retrieving sensitive data samples](https://docs.aws.amazon.com/macie/latest/user/findings-retrieve-sd-options.html) in the Amazon Macie User Guide. public struct UpdateRetrievalConfiguration: Swift.Equatable { /// The access method to use when retrieving sensitive data from affected S3 objects. Valid values are: ASSUME_ROLE, assume an IAM role that is in the affected Amazon Web Services account and delegates access to Amazon Macie; and, CALLER_CREDENTIALS, use the credentials of the IAM user who requests the sensitive data. If you specify ASSUME_ROLE, also specify the name of an existing IAM role for Macie to assume (roleName). If you change this value from ASSUME_ROLE to CALLER_CREDENTIALS for an existing configuration, Macie permanently deletes the external ID and role name currently specified for the configuration. These settings can't be recovered after they're deleted. /// This member is required. @@ -20181,7 +20189,7 @@ public struct UpdateRevealConfigurationInput: Swift.Equatable { /// The KMS key to use to encrypt the sensitive data, and the status of the configuration for the Amazon Macie account. /// This member is required. public var configuration: Macie2ClientTypes.RevealConfiguration? - /// The access method and settings to use to retrieve the sensitive data. + /// The access method and settings to use when retrieving the sensitive data. public var retrievalConfiguration: Macie2ClientTypes.UpdateRetrievalConfiguration? public init( @@ -20231,7 +20239,7 @@ extension UpdateRevealConfigurationOutput: ClientRuntime.HttpResponseBinding { public struct UpdateRevealConfigurationOutput: Swift.Equatable { /// The KMS key to use to encrypt the sensitive data, and the status of the configuration for the Amazon Macie account. public var configuration: Macie2ClientTypes.RevealConfiguration? - /// The access method and settings to use to retrieve the sensitive data. + /// The access method and settings to use when retrieving the sensitive data. public var retrievalConfiguration: Macie2ClientTypes.RetrievalConfiguration? public init( diff --git a/Sources/Services/AWSManagedBlockchainQuery/models/Models.swift b/Sources/Services/AWSManagedBlockchainQuery/models/Models.swift index c484555f977..6a897deb599 100644 --- a/Sources/Services/AWSManagedBlockchainQuery/models/Models.swift +++ b/Sources/Services/AWSManagedBlockchainQuery/models/Models.swift @@ -519,6 +519,35 @@ extension ManagedBlockchainQueryClientTypes { } +extension ManagedBlockchainQueryClientTypes { + public enum ConfirmationStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case `final` + case sdkUnknown(Swift.String) + + public static var allCases: [ConfirmationStatus] { + return [ + .final, + .sdkUnknown("") + ] + } + 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 .final: return "FINAL" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ConfirmationStatus(rawValue: rawValue) ?? ConfirmationStatus.sdkUnknown(rawValue) + } + } +} + extension ManagedBlockchainQueryClientTypes.ContractFilter: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case deployerAddress @@ -713,6 +742,38 @@ extension ManagedBlockchainQueryClientTypes { } } +extension ManagedBlockchainQueryClientTypes { + public enum ExecutionStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case failed + case succeeded + case sdkUnknown(Swift.String) + + public static var allCases: [ExecutionStatus] { + return [ + .failed, + .succeeded, + .sdkUnknown("") + ] + } + 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 .failed: return "FAILED" + case .succeeded: return "SUCCEEDED" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ExecutionStatus(rawValue: rawValue) ?? ExecutionStatus.sdkUnknown(rawValue) + } + } +} + extension GetAssetContractInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case contractIdentifier @@ -2719,9 +2780,11 @@ extension ManagedBlockchainQueryClientTypes.Transaction: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case blockHash case blockNumber + case confirmationStatus case contractAddress case cumulativeGasUsed case effectiveGasPrice + case executionStatus case from case gasUsed case network @@ -2746,6 +2809,9 @@ extension ManagedBlockchainQueryClientTypes.Transaction: Swift.Codable { if let blockNumber = self.blockNumber { try encodeContainer.encode(blockNumber, forKey: .blockNumber) } + if let confirmationStatus = self.confirmationStatus { + try encodeContainer.encode(confirmationStatus.rawValue, forKey: .confirmationStatus) + } if let contractAddress = self.contractAddress { try encodeContainer.encode(contractAddress, forKey: .contractAddress) } @@ -2755,6 +2821,9 @@ extension ManagedBlockchainQueryClientTypes.Transaction: Swift.Codable { if let effectiveGasPrice = self.effectiveGasPrice { try encodeContainer.encode(effectiveGasPrice, forKey: .effectiveGasPrice) } + if let executionStatus = self.executionStatus { + try encodeContainer.encode(executionStatus.rawValue, forKey: .executionStatus) + } if let from = self.from { try encodeContainer.encode(from, forKey: .from) } @@ -2839,6 +2908,10 @@ extension ManagedBlockchainQueryClientTypes.Transaction: Swift.Codable { transactionFee = transactionFeeDecoded let transactionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transactionId) transactionId = transactionIdDecoded + let confirmationStatusDecoded = try containerValues.decodeIfPresent(ManagedBlockchainQueryClientTypes.ConfirmationStatus.self, forKey: .confirmationStatus) + confirmationStatus = confirmationStatusDecoded + let executionStatusDecoded = try containerValues.decodeIfPresent(ManagedBlockchainQueryClientTypes.ExecutionStatus.self, forKey: .executionStatus) + executionStatus = executionStatusDecoded } } @@ -2853,12 +2926,16 @@ extension ManagedBlockchainQueryClientTypes { public var blockHash: Swift.String? /// The block number in which the transaction is recorded. public var blockNumber: Swift.String? + /// Specifies whether the transaction has reached Finality. + public var confirmationStatus: ManagedBlockchainQueryClientTypes.ConfirmationStatus? /// The blockchain address for the contract. public var contractAddress: Swift.String? /// The amount of gas used up to the specified point in the block. public var cumulativeGasUsed: Swift.String? /// The effective gas price. public var effectiveGasPrice: Swift.String? + /// Identifies whether the transaction has succeeded or failed. + public var executionStatus: ManagedBlockchainQueryClientTypes.ExecutionStatus? /// The initiator of the transaction. It is either in the form a public key or a contract address. public var from: Swift.String? /// The amount of gas used for the transaction. @@ -2875,8 +2952,12 @@ extension ManagedBlockchainQueryClientTypes { public var signatures: Swift.String? /// The signature of the transaction. The Z coordinate of a point V. public var signaturev: Swift.Int? - /// The status of the transaction. - /// This member is required. + /// The status of the transaction. This property is deprecated. You must use the confirmationStatus and the executionStatus properties to determine if the status of the transaction is FINAL or FAILED. + /// + /// * Transactions with a status of FINAL will now have the confirmationStatus set to FINAL and the executionStatus set to SUCCEEDED. + /// + /// * Transactions with a status of FAILED will now have the confirmationStatus set to FINAL and the executionStatus set to FAILED. + @available(*, deprecated, message: "The status field in the GetTransaction response is deprecated and is replaced with the confirmationStatus and executionStatus fields.") public var status: ManagedBlockchainQueryClientTypes.QueryTransactionStatus? /// The identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain. /// This member is required. @@ -2898,9 +2979,11 @@ extension ManagedBlockchainQueryClientTypes { public init( blockHash: Swift.String? = nil, blockNumber: Swift.String? = nil, + confirmationStatus: ManagedBlockchainQueryClientTypes.ConfirmationStatus? = nil, contractAddress: Swift.String? = nil, cumulativeGasUsed: Swift.String? = nil, effectiveGasPrice: Swift.String? = nil, + executionStatus: ManagedBlockchainQueryClientTypes.ExecutionStatus? = nil, from: Swift.String? = nil, gasUsed: Swift.String? = nil, network: ManagedBlockchainQueryClientTypes.QueryNetwork? = nil, @@ -2919,9 +3002,11 @@ extension ManagedBlockchainQueryClientTypes { { self.blockHash = blockHash self.blockNumber = blockNumber + self.confirmationStatus = confirmationStatus self.contractAddress = contractAddress self.cumulativeGasUsed = cumulativeGasUsed self.effectiveGasPrice = effectiveGasPrice + self.executionStatus = executionStatus self.from = from self.gasUsed = gasUsed self.network = network diff --git a/Sources/Services/AWSMediaConnect/MediaConnectClient.swift b/Sources/Services/AWSMediaConnect/MediaConnectClient.swift index 296e35635bc..f966d5e27d8 100644 --- a/Sources/Services/AWSMediaConnect/MediaConnectClient.swift +++ b/Sources/Services/AWSMediaConnect/MediaConnectClient.swift @@ -824,6 +824,54 @@ extension MediaConnectClient: MediaConnectClientProtocol { return result } + /// Performs the `DescribeFlowSourceMetadata` operation on the `MediaConnect` service. + /// + /// Displays details of the flow's source stream. The response contains information about the contents of the stream and its programs. + /// + /// - Parameter DescribeFlowSourceMetadataInput : [no documentation found] + /// + /// - Returns: `DescribeFlowSourceMetadataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `ForbiddenException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `InternalServerErrorException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `NotFoundException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `ServiceUnavailableException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `TooManyRequestsException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + public func describeFlowSourceMetadata(input: DescribeFlowSourceMetadataInput) async throws -> DescribeFlowSourceMetadataOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "describeFlowSourceMetadata") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "mediaconnect") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "describeFlowSourceMetadata") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFlowSourceMetadataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DescribeGateway` operation on the `MediaConnect` service. /// /// Displays the details of a gateway. The response includes the gateway ARN, name, and CIDR blocks, as well as details about the networks. diff --git a/Sources/Services/AWSMediaConnect/MediaConnectClientProtocol.swift b/Sources/Services/AWSMediaConnect/MediaConnectClientProtocol.swift index c25e7dd285d..f3857e3b839 100644 --- a/Sources/Services/AWSMediaConnect/MediaConnectClientProtocol.swift +++ b/Sources/Services/AWSMediaConnect/MediaConnectClientProtocol.swift @@ -283,6 +283,24 @@ public protocol MediaConnectClientProtocol { /// - `ServiceUnavailableException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. /// - `TooManyRequestsException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. func describeFlow(input: DescribeFlowInput) async throws -> DescribeFlowOutput + /// Performs the `DescribeFlowSourceMetadata` operation on the `MediaConnect` service. + /// + /// Displays details of the flow's source stream. The response contains information about the contents of the stream and its programs. + /// + /// - Parameter DescribeFlowSourceMetadataInput : [no documentation found] + /// + /// - Returns: `DescribeFlowSourceMetadataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `ForbiddenException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `InternalServerErrorException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `NotFoundException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `ServiceUnavailableException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + /// - `TooManyRequestsException` : Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. + func describeFlowSourceMetadata(input: DescribeFlowSourceMetadataInput) async throws -> DescribeFlowSourceMetadataOutput /// Performs the `DescribeGateway` operation on the `MediaConnect` service. /// /// Displays the details of a gateway. The response includes the gateway ARN, name, and CIDR blocks, as well as details about the networks. diff --git a/Sources/Services/AWSMediaConnect/models/Models.swift b/Sources/Services/AWSMediaConnect/models/Models.swift index 28366ac9972..b2fcc3dc0bc 100644 --- a/Sources/Services/AWSMediaConnect/models/Models.swift +++ b/Sources/Services/AWSMediaConnect/models/Models.swift @@ -3905,6 +3905,132 @@ enum DescribeFlowOutputError: ClientRuntime.HttpResponseErrorBinding { } } +extension DescribeFlowSourceMetadataInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let flowArn = flowArn else { + return nil + } + return "/v1/flows/\(flowArn.urlPercentEncoding())/source-metadata" + } +} + +public struct DescribeFlowSourceMetadataInput: Swift.Equatable { + /// The Amazon Resource Name (ARN) of the flow. + /// This member is required. + public var flowArn: Swift.String? + + public init( + flowArn: Swift.String? = nil + ) + { + self.flowArn = flowArn + } +} + +struct DescribeFlowSourceMetadataInputBody: Swift.Equatable { +} + +extension DescribeFlowSourceMetadataInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DescribeFlowSourceMetadataOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: DescribeFlowSourceMetadataOutputBody = try responseDecoder.decode(responseBody: data) + self.flowArn = output.flowArn + self.messages = output.messages + self.timestamp = output.timestamp + self.transportMediaInfo = output.transportMediaInfo + } else { + self.flowArn = nil + self.messages = nil + self.timestamp = nil + self.transportMediaInfo = nil + } + } +} + +public struct DescribeFlowSourceMetadataOutput: Swift.Equatable { + /// The ARN of the flow that DescribeFlowSourceMetadata was performed on. + public var flowArn: Swift.String? + /// Provides a status code and message regarding issues found with the flow source metadata. + public var messages: [MediaConnectClientTypes.MessageDetail]? + /// The timestamp of the most recent change in metadata for this flow’s source. + public var timestamp: ClientRuntime.Date? + /// The metadata of the transport stream in the current flow's source. + public var transportMediaInfo: MediaConnectClientTypes.TransportMediaInfo? + + public init( + flowArn: Swift.String? = nil, + messages: [MediaConnectClientTypes.MessageDetail]? = nil, + timestamp: ClientRuntime.Date? = nil, + transportMediaInfo: MediaConnectClientTypes.TransportMediaInfo? = nil + ) + { + self.flowArn = flowArn + self.messages = messages + self.timestamp = timestamp + self.transportMediaInfo = transportMediaInfo + } +} + +struct DescribeFlowSourceMetadataOutputBody: Swift.Equatable { + let flowArn: Swift.String? + let messages: [MediaConnectClientTypes.MessageDetail]? + let timestamp: ClientRuntime.Date? + let transportMediaInfo: MediaConnectClientTypes.TransportMediaInfo? +} + +extension DescribeFlowSourceMetadataOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case flowArn = "flowArn" + case messages = "messages" + case timestamp = "timestamp" + case transportMediaInfo = "transportMediaInfo" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let flowArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .flowArn) + flowArn = flowArnDecoded + let messagesContainer = try containerValues.decodeIfPresent([MediaConnectClientTypes.MessageDetail?].self, forKey: .messages) + var messagesDecoded0:[MediaConnectClientTypes.MessageDetail]? = nil + if let messagesContainer = messagesContainer { + messagesDecoded0 = [MediaConnectClientTypes.MessageDetail]() + for structure0 in messagesContainer { + if let structure0 = structure0 { + messagesDecoded0?.append(structure0) + } + } + } + messages = messagesDecoded0 + let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) + timestamp = timestampDecoded + let transportMediaInfoDecoded = try containerValues.decodeIfPresent(MediaConnectClientTypes.TransportMediaInfo.self, forKey: .transportMediaInfo) + transportMediaInfo = transportMediaInfoDecoded + } +} + +enum DescribeFlowSourceMetadataOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ForbiddenException": return try await ForbiddenException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceUnavailableException": return try await ServiceUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + extension DescribeGatewayInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let gatewayArn = gatewayArn else { @@ -5485,6 +5611,53 @@ extension ForbiddenExceptionBody: Swift.Decodable { } } +extension MediaConnectClientTypes.FrameResolution: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case frameHeight = "frameHeight" + case frameWidth = "frameWidth" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let frameHeight = self.frameHeight { + try encodeContainer.encode(frameHeight, forKey: .frameHeight) + } + if let frameWidth = self.frameWidth { + try encodeContainer.encode(frameWidth, forKey: .frameWidth) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let frameHeightDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .frameHeight) + frameHeight = frameHeightDecoded + let frameWidthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .frameWidth) + frameWidth = frameWidthDecoded + } +} + +extension MediaConnectClientTypes { + /// The frame resolution used by the video stream. + public struct FrameResolution: Swift.Equatable { + /// The number of pixels in the height of the video frame. + /// This member is required. + public var frameHeight: Swift.Int? + /// The number of pixels in the width of the video frame. + /// This member is required. + public var frameWidth: Swift.Int? + + public init( + frameHeight: Swift.Int? = nil, + frameWidth: Swift.Int? = nil + ) + { + self.frameHeight = frameHeight + self.frameWidth = frameWidth + } + } + +} + extension MediaConnectClientTypes.Gateway: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case egressCidrBlocks = "egressCidrBlocks" @@ -11555,6 +11728,252 @@ extension MediaConnectClientTypes { } +extension MediaConnectClientTypes.TransportMediaInfo: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case programs = "programs" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let programs = programs { + var programsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .programs) + for transportstreamprogram0 in programs { + try programsContainer.encode(transportstreamprogram0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let programsContainer = try containerValues.decodeIfPresent([MediaConnectClientTypes.TransportStreamProgram?].self, forKey: .programs) + var programsDecoded0:[MediaConnectClientTypes.TransportStreamProgram]? = nil + if let programsContainer = programsContainer { + programsDecoded0 = [MediaConnectClientTypes.TransportStreamProgram]() + for structure0 in programsContainer { + if let structure0 = structure0 { + programsDecoded0?.append(structure0) + } + } + } + programs = programsDecoded0 + } +} + +extension MediaConnectClientTypes { + /// The metadata of the transport stream in the current flow's source. + public struct TransportMediaInfo: Swift.Equatable { + /// The list of transport stream programs in the current flow's source. + /// This member is required. + public var programs: [MediaConnectClientTypes.TransportStreamProgram]? + + public init( + programs: [MediaConnectClientTypes.TransportStreamProgram]? = nil + ) + { + self.programs = programs + } + } + +} + +extension MediaConnectClientTypes.TransportStream: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case channels = "channels" + case codec = "codec" + case frameRate = "frameRate" + case frameResolution = "frameResolution" + case pid = "pid" + case sampleRate = "sampleRate" + case sampleSize = "sampleSize" + case streamType = "streamType" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let channels = self.channels { + try encodeContainer.encode(channels, forKey: .channels) + } + if let codec = self.codec { + try encodeContainer.encode(codec, forKey: .codec) + } + if let frameRate = self.frameRate { + try encodeContainer.encode(frameRate, forKey: .frameRate) + } + if let frameResolution = self.frameResolution { + try encodeContainer.encode(frameResolution, forKey: .frameResolution) + } + if let pid = self.pid { + try encodeContainer.encode(pid, forKey: .pid) + } + if let sampleRate = self.sampleRate { + try encodeContainer.encode(sampleRate, forKey: .sampleRate) + } + if let sampleSize = self.sampleSize { + try encodeContainer.encode(sampleSize, forKey: .sampleSize) + } + if let streamType = self.streamType { + try encodeContainer.encode(streamType, forKey: .streamType) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let channelsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .channels) + channels = channelsDecoded + let codecDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .codec) + codec = codecDecoded + let frameRateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .frameRate) + frameRate = frameRateDecoded + let frameResolutionDecoded = try containerValues.decodeIfPresent(MediaConnectClientTypes.FrameResolution.self, forKey: .frameResolution) + frameResolution = frameResolutionDecoded + let pidDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pid) + pid = pidDecoded + let sampleRateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sampleRate) + sampleRate = sampleRateDecoded + let sampleSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sampleSize) + sampleSize = sampleSizeDecoded + let streamTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .streamType) + streamType = streamTypeDecoded + } +} + +extension MediaConnectClientTypes { + /// The metadata of an elementary transport stream. + public struct TransportStream: Swift.Equatable { + /// The number of channels in the audio stream. + public var channels: Swift.Int? + /// The codec used by the stream. + public var codec: Swift.String? + /// The frame rate used by the video stream. + public var frameRate: Swift.String? + /// The frame resolution used by the video stream. + public var frameResolution: MediaConnectClientTypes.FrameResolution? + /// The Packet ID (PID) as it is reported in the Program Map Table. + /// This member is required. + public var pid: Swift.Int? + /// The sample rate used by the audio stream. + public var sampleRate: Swift.Int? + /// The sample bit size used by the audio stream. + public var sampleSize: Swift.Int? + /// The Stream Type as it is reported in the Program Map Table. + /// This member is required. + public var streamType: Swift.String? + + public init( + channels: Swift.Int? = nil, + codec: Swift.String? = nil, + frameRate: Swift.String? = nil, + frameResolution: MediaConnectClientTypes.FrameResolution? = nil, + pid: Swift.Int? = nil, + sampleRate: Swift.Int? = nil, + sampleSize: Swift.Int? = nil, + streamType: Swift.String? = nil + ) + { + self.channels = channels + self.codec = codec + self.frameRate = frameRate + self.frameResolution = frameResolution + self.pid = pid + self.sampleRate = sampleRate + self.sampleSize = sampleSize + self.streamType = streamType + } + } + +} + +extension MediaConnectClientTypes.TransportStreamProgram: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case pcrPid = "pcrPid" + case programName = "programName" + case programNumber = "programNumber" + case programPid = "programPid" + case streams = "streams" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let pcrPid = self.pcrPid { + try encodeContainer.encode(pcrPid, forKey: .pcrPid) + } + if let programName = self.programName { + try encodeContainer.encode(programName, forKey: .programName) + } + if let programNumber = self.programNumber { + try encodeContainer.encode(programNumber, forKey: .programNumber) + } + if let programPid = self.programPid { + try encodeContainer.encode(programPid, forKey: .programPid) + } + if let streams = streams { + var streamsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .streams) + for transportstream0 in streams { + try streamsContainer.encode(transportstream0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let pcrPidDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pcrPid) + pcrPid = pcrPidDecoded + let programNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .programName) + programName = programNameDecoded + let programNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .programNumber) + programNumber = programNumberDecoded + let programPidDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .programPid) + programPid = programPidDecoded + let streamsContainer = try containerValues.decodeIfPresent([MediaConnectClientTypes.TransportStream?].self, forKey: .streams) + var streamsDecoded0:[MediaConnectClientTypes.TransportStream]? = nil + if let streamsContainer = streamsContainer { + streamsDecoded0 = [MediaConnectClientTypes.TransportStream]() + for structure0 in streamsContainer { + if let structure0 = structure0 { + streamsDecoded0?.append(structure0) + } + } + } + streams = streamsDecoded0 + } +} + +extension MediaConnectClientTypes { + /// The metadata of a single transport stream program. + public struct TransportStreamProgram: Swift.Equatable { + /// The Program Clock Reference (PCR) Packet ID (PID) as it is reported in the Program Association Table. + /// This member is required. + public var pcrPid: Swift.Int? + /// The program name as it is reported in the Program Association Table. + public var programName: Swift.String? + /// The program number as it is reported in the Program Association Table. + /// This member is required. + public var programNumber: Swift.Int? + /// The program Packet ID (PID) as it is reported in the Program Association Table. + /// This member is required. + public var programPid: Swift.Int? + /// The list of elementary transport streams in the program. The list includes video, audio, and data streams. + /// This member is required. + public var streams: [MediaConnectClientTypes.TransportStream]? + + public init( + pcrPid: Swift.Int? = nil, + programName: Swift.String? = nil, + programNumber: Swift.Int? = nil, + programPid: Swift.Int? = nil, + streams: [MediaConnectClientTypes.TransportStream]? = nil + ) + { + self.pcrPid = pcrPid + self.programName = programName + self.programNumber = programNumber + self.programPid = programPid + self.streams = streams + } + } + +} + extension UntagResourceInput: ClientRuntime.QueryItemProvider { public var queryItems: [ClientRuntime.URLQueryItem] { get throws { diff --git a/Sources/Services/AWSMediaConvert/models/Models.swift b/Sources/Services/AWSMediaConvert/models/Models.swift index 92233f3cef4..67060ac10c6 100644 --- a/Sources/Services/AWSMediaConvert/models/Models.swift +++ b/Sources/Services/AWSMediaConvert/models/Models.swift @@ -36,7 +36,7 @@ extension MediaConvertClientTypes { } extension MediaConvertClientTypes { - /// AAC Profile. + /// Specify the AAC profile. For the widest player compatibility and where higher bitrates are acceptable: Keep the default profile, LC (AAC-LC) For improved audio performance at lower bitrates: Choose HEV1 or HEV2. HEV1 (AAC-HE v1) adds spectral band replication to improve speech audio at low bitrates. HEV2 (AAC-HE v2) adds parametric stereo, which optimizes for encoding stereo audio at very low bitrates. public enum AacCodecProfile: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case hev1 case hev2 @@ -114,7 +114,7 @@ extension MediaConvertClientTypes { } extension MediaConvertClientTypes { - /// Rate Control Mode. + /// Specify the AAC rate control mode. For a constant bitrate: Choose CBR. Your AAC output bitrate will be equal to the value that you choose for Bitrate. For a variable bitrate: Choose VBR. Your AAC output bitrate will vary according to your audio content and the value that you choose for Bitrate quality. public enum AacRateControlMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cbr case vbr @@ -253,19 +253,19 @@ extension MediaConvertClientTypes { public var audioDescriptionBroadcasterMix: MediaConvertClientTypes.AacAudioDescriptionBroadcasterMix? /// Specify the average bitrate in bits per second. The set of valid values for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is also constrained by the values that you choose for Profile, Bitrate control mode, and Sample rate. Default values depend on Bitrate control mode and Profile. public var bitrate: Swift.Int? - /// AAC Profile. + /// Specify the AAC profile. For the widest player compatibility and where higher bitrates are acceptable: Keep the default profile, LC (AAC-LC) For improved audio performance at lower bitrates: Choose HEV1 or HEV2. HEV1 (AAC-HE v1) adds spectral band replication to improve speech audio at low bitrates. HEV2 (AAC-HE v2) adds parametric stereo, which optimizes for encoding stereo audio at very low bitrates. public var codecProfile: MediaConvertClientTypes.AacCodecProfile? /// The Coding mode that you specify determines the number of audio channels and the audio channel layout metadata in your AAC output. Valid coding modes depend on the Rate control mode and Profile that you select. The following list shows the number of audio channels and channel layout for each coding mode. * 1.0 Audio Description (Receiver Mix): One channel, C. Includes audio description data from your stereo input. For more information see ETSI TS 101 154 Annex E. * 1.0 Mono: One channel, C. * 2.0 Stereo: Two channels, L, R. * 5.1 Surround: Six channels, C, L, R, Ls, Rs, LFE. public var codingMode: MediaConvertClientTypes.AacCodingMode? - /// Rate Control Mode. + /// Specify the AAC rate control mode. For a constant bitrate: Choose CBR. Your AAC output bitrate will be equal to the value that you choose for Bitrate. For a variable bitrate: Choose VBR. Your AAC output bitrate will vary according to your audio content and the value that you choose for Bitrate quality. public var rateControlMode: MediaConvertClientTypes.AacRateControlMode? /// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, you must choose "No container" for the output container. public var rawFormat: MediaConvertClientTypes.AacRawFormat? - /// Specify the Sample rate in Hz. Valid sample rates depend on the Profile and Coding mode that you select. The following list shows valid sample rates for each Profile and Coding mode. * LC Profile, Coding mode 1.0, 2.0, and Receiver Mix: 8000, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000. * LC Profile, Coding mode 5.1: 32000, 44100, 48000, 96000. * HEV1 Profile, Coding mode 1.0 and Receiver Mix: 22050, 24000, 32000, 44100, 48000. * HEV1 Profile, Coding mode 2.0 and 5.1: 32000, 44100, 48000, 96000. * HEV2 Profile, Coding mode 2.0: 22050, 24000, 32000, 44100, 48000. + /// Specify the AAC sample rate in samples per second (Hz). Valid sample rates depend on the AAC profile and Coding mode that you select. For a list of supported sample rates, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/aac-support.html public var sampleRate: Swift.Int? /// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream containers. public var specification: MediaConvertClientTypes.AacSpecification? - /// VBR Quality Level - Only used if rate_control_mode is VBR. + /// Specify the quality of your variable bitrate (VBR) AAC audio. For a list of approximate VBR bitrates, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/aac-support.html#aac_vbr public var vbrQuality: MediaConvertClientTypes.AacVbrQuality? public init( @@ -328,7 +328,7 @@ extension MediaConvertClientTypes { } extension MediaConvertClientTypes { - /// VBR Quality Level - Only used if rate_control_mode is VBR. + /// Specify the quality of your variable bitrate (VBR) AAC audio. For a list of approximate VBR bitrates, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/aac-support.html#aac_vbr public enum AacVbrQuality: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case high case low @@ -7030,6 +7030,81 @@ extension MediaConvertClientTypes { } } +extension MediaConvertClientTypes.ColorConversion3DLUTSetting: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case fileInput = "fileInput" + case inputColorSpace = "inputColorSpace" + case inputMasteringLuminance = "inputMasteringLuminance" + case outputColorSpace = "outputColorSpace" + case outputMasteringLuminance = "outputMasteringLuminance" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let fileInput = self.fileInput { + try encodeContainer.encode(fileInput, forKey: .fileInput) + } + if let inputColorSpace = self.inputColorSpace { + try encodeContainer.encode(inputColorSpace.rawValue, forKey: .inputColorSpace) + } + if let inputMasteringLuminance = self.inputMasteringLuminance { + try encodeContainer.encode(inputMasteringLuminance, forKey: .inputMasteringLuminance) + } + if let outputColorSpace = self.outputColorSpace { + try encodeContainer.encode(outputColorSpace.rawValue, forKey: .outputColorSpace) + } + if let outputMasteringLuminance = self.outputMasteringLuminance { + try encodeContainer.encode(outputMasteringLuminance, forKey: .outputMasteringLuminance) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let fileInputDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fileInput) + fileInput = fileInputDecoded + let inputColorSpaceDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.ColorSpace.self, forKey: .inputColorSpace) + inputColorSpace = inputColorSpaceDecoded + let inputMasteringLuminanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .inputMasteringLuminance) + inputMasteringLuminance = inputMasteringLuminanceDecoded + let outputColorSpaceDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.ColorSpace.self, forKey: .outputColorSpace) + outputColorSpace = outputColorSpaceDecoded + let outputMasteringLuminanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .outputMasteringLuminance) + outputMasteringLuminance = outputMasteringLuminanceDecoded + } +} + +extension MediaConvertClientTypes { + /// Custom 3D lut settings + public struct ColorConversion3DLUTSetting: Swift.Equatable { + /// Specify the input file S3, HTTP, or HTTPS URL for your 3D LUT .cube file. Note that MediaConvert accepts 3D LUT files up to 8MB in size. + public var fileInput: Swift.String? + /// Specify which inputs use this 3D LUT, according to their color space. + public var inputColorSpace: MediaConvertClientTypes.ColorSpace? + /// Specify which inputs use this 3D LUT, according to their luminance. To apply this 3D LUT to HDR10 or P3D65 (HDR) inputs with a specific mastering luminance: Enter an integer from 0 to 2147483647, corresponding to the input's Maximum luminance value. To apply this 3D LUT to any input regardless of its luminance: Leave blank, or enter 0. + public var inputMasteringLuminance: Swift.Int? + /// Specify which outputs use this 3D LUT, according to their color space. + public var outputColorSpace: MediaConvertClientTypes.ColorSpace? + /// Specify which outputs use this 3D LUT, according to their luminance. To apply this 3D LUT to HDR10 or P3D65 (HDR) outputs with a specific luminance: Enter an integer from 0 to 2147483647, corresponding to the output's luminance. To apply this 3D LUT to any output regardless of its luminance: Leave blank, or enter 0. + public var outputMasteringLuminance: Swift.Int? + + public init( + fileInput: Swift.String? = nil, + inputColorSpace: MediaConvertClientTypes.ColorSpace? = nil, + inputMasteringLuminance: Swift.Int? = nil, + outputColorSpace: MediaConvertClientTypes.ColorSpace? = nil, + outputMasteringLuminance: Swift.Int? = nil + ) + { + self.fileInput = fileInput + self.inputColorSpace = inputColorSpace + self.inputMasteringLuminance = inputMasteringLuminance + self.outputColorSpace = outputColorSpace + self.outputMasteringLuminance = outputMasteringLuminance + } + } + +} + extension MediaConvertClientTypes.ColorCorrector: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case brightness = "brightness" @@ -7039,6 +7114,7 @@ extension MediaConvertClientTypes.ColorCorrector: Swift.Codable { case hdr10Metadata = "hdr10Metadata" case hdrToSdrToneMapper = "hdrToSdrToneMapper" case hue = "hue" + case maxLuminance = "maxLuminance" case sampleRangeConversion = "sampleRangeConversion" case saturation = "saturation" case sdrReferenceWhiteLevel = "sdrReferenceWhiteLevel" @@ -7067,6 +7143,9 @@ extension MediaConvertClientTypes.ColorCorrector: Swift.Codable { if let hue = self.hue { try encodeContainer.encode(hue, forKey: .hue) } + if let maxLuminance = self.maxLuminance { + try encodeContainer.encode(maxLuminance, forKey: .maxLuminance) + } if let sampleRangeConversion = self.sampleRangeConversion { try encodeContainer.encode(sampleRangeConversion.rawValue, forKey: .sampleRangeConversion) } @@ -7094,6 +7173,8 @@ extension MediaConvertClientTypes.ColorCorrector: Swift.Codable { hdrToSdrToneMapper = hdrToSdrToneMapperDecoded let hueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .hue) hue = hueDecoded + let maxLuminanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxLuminance) + maxLuminance = maxLuminanceDecoded let sampleRangeConversionDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.SampleRangeConversion.self, forKey: .sampleRangeConversion) sampleRangeConversion = sampleRangeConversionDecoded let saturationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .saturation) @@ -7130,6 +7211,8 @@ extension MediaConvertClientTypes { public var hdrToSdrToneMapper: MediaConvertClientTypes.HDRToSDRToneMapper? /// Hue in degrees. public var hue: Swift.Int? + /// Specify the maximum mastering display luminance. Enter an integer from 0 to 2147483647, in units of 0.0001 nits. For example, enter 10000000 for 1000 nits. + public var maxLuminance: Swift.Int? /// Specify how MediaConvert limits the color sample range for this output. To create a limited range output from a full range input: Choose Limited range squeeze. For full range inputs, MediaConvert performs a linear offset to color samples equally across all pixels and frames. Color samples in 10-bit outputs are limited to 64 through 940, and 8-bit outputs are limited to 16 through 235. Note: For limited range inputs, values for color samples are passed through to your output unchanged. MediaConvert does not limit the sample range. To correct pixels in your input that are out of range or out of gamut: Choose Limited range clip. Use for broadcast applications. MediaConvert conforms any pixels outside of the values that you specify under Minimum YUV and Maximum YUV to limited range bounds. MediaConvert also corrects any YUV values that, when converted to RGB, would be outside the bounds you specify under Minimum RGB tolerance and Maximum RGB tolerance. With either limited range conversion, MediaConvert writes the sample range metadata in the output. public var sampleRangeConversion: MediaConvertClientTypes.SampleRangeConversion? /// Saturation level. @@ -7145,6 +7228,7 @@ extension MediaConvertClientTypes { hdr10Metadata: MediaConvertClientTypes.Hdr10Metadata? = nil, hdrToSdrToneMapper: MediaConvertClientTypes.HDRToSDRToneMapper? = nil, hue: Swift.Int? = nil, + maxLuminance: Swift.Int? = nil, sampleRangeConversion: MediaConvertClientTypes.SampleRangeConversion? = nil, saturation: Swift.Int? = nil, sdrReferenceWhiteLevel: Swift.Int? = nil @@ -7157,6 +7241,7 @@ extension MediaConvertClientTypes { self.hdr10Metadata = hdr10Metadata self.hdrToSdrToneMapper = hdrToSdrToneMapper self.hue = hue + self.maxLuminance = maxLuminance self.sampleRangeConversion = sampleRangeConversion self.saturation = saturation self.sdrReferenceWhiteLevel = sdrReferenceWhiteLevel @@ -7567,6 +7652,7 @@ extension MediaConvertClientTypes { case mxf case raw case webm + case y4m case sdkUnknown(Swift.String) public static var allCases: [ContainerType] { @@ -7582,6 +7668,7 @@ extension MediaConvertClientTypes { .mxf, .raw, .webm, + .y4m, .sdkUnknown("") ] } @@ -7602,6 +7689,7 @@ extension MediaConvertClientTypes { case .mxf: return "MXF" case .raw: return "RAW" case .webm: return "WEBM" + case .y4m: return "Y4M" case let .sdkUnknown(s): return s } } @@ -20820,6 +20908,7 @@ extension MediaConvertClientTypes.JobSettings: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case adAvailOffset = "adAvailOffset" case availBlanking = "availBlanking" + case colorConversion3DLUTSettings = "colorConversion3DLUTSettings" case esam = "esam" case extendedDataServices = "extendedDataServices" case followSource = "followSource" @@ -20841,6 +20930,12 @@ extension MediaConvertClientTypes.JobSettings: Swift.Codable { if let availBlanking = self.availBlanking { try encodeContainer.encode(availBlanking, forKey: .availBlanking) } + if let colorConversion3DLUTSettings = colorConversion3DLUTSettings { + var colorConversion3DLUTSettingsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .colorConversion3DLUTSettings) + for colorconversion3dlutsetting0 in colorConversion3DLUTSettings { + try colorConversion3DLUTSettingsContainer.encode(colorconversion3dlutsetting0) + } + } if let esam = self.esam { try encodeContainer.encode(esam, forKey: .esam) } @@ -20888,6 +20983,17 @@ extension MediaConvertClientTypes.JobSettings: Swift.Codable { adAvailOffset = adAvailOffsetDecoded let availBlankingDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.AvailBlanking.self, forKey: .availBlanking) availBlanking = availBlankingDecoded + let colorConversion3DLUTSettingsContainer = try containerValues.decodeIfPresent([MediaConvertClientTypes.ColorConversion3DLUTSetting?].self, forKey: .colorConversion3DLUTSettings) + var colorConversion3DLUTSettingsDecoded0:[MediaConvertClientTypes.ColorConversion3DLUTSetting]? = nil + if let colorConversion3DLUTSettingsContainer = colorConversion3DLUTSettingsContainer { + colorConversion3DLUTSettingsDecoded0 = [MediaConvertClientTypes.ColorConversion3DLUTSetting]() + for structure0 in colorConversion3DLUTSettingsContainer { + if let structure0 = structure0 { + colorConversion3DLUTSettingsDecoded0?.append(structure0) + } + } + } + colorConversion3DLUTSettings = colorConversion3DLUTSettingsDecoded0 let esamDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.EsamSettings.self, forKey: .esam) esam = esamDecoded let extendedDataServicesDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.ExtendedDataServices.self, forKey: .extendedDataServices) @@ -20938,6 +21044,8 @@ extension MediaConvertClientTypes { public var adAvailOffset: Swift.Int? /// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails. public var availBlanking: MediaConvertClientTypes.AvailBlanking? + /// Use 3D LUTs to specify custom color mapping behavior when you convert from one color space into another. You can include up to 8 different 3D LUTs. + public var colorConversion3DLUTSettings: [MediaConvertClientTypes.ColorConversion3DLUTSetting]? /// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings. public var esam: MediaConvertClientTypes.EsamSettings? /// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory. @@ -20964,6 +21072,7 @@ extension MediaConvertClientTypes { public init( adAvailOffset: Swift.Int? = nil, availBlanking: MediaConvertClientTypes.AvailBlanking? = nil, + colorConversion3DLUTSettings: [MediaConvertClientTypes.ColorConversion3DLUTSetting]? = nil, esam: MediaConvertClientTypes.EsamSettings? = nil, extendedDataServices: MediaConvertClientTypes.ExtendedDataServices? = nil, followSource: Swift.Int? = nil, @@ -20979,6 +21088,7 @@ extension MediaConvertClientTypes { { self.adAvailOffset = adAvailOffset self.availBlanking = availBlanking + self.colorConversion3DLUTSettings = colorConversion3DLUTSettings self.esam = esam self.extendedDataServices = extendedDataServices self.followSource = followSource @@ -21246,6 +21356,7 @@ extension MediaConvertClientTypes.JobTemplateSettings: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case adAvailOffset = "adAvailOffset" case availBlanking = "availBlanking" + case colorConversion3DLUTSettings = "colorConversion3DLUTSettings" case esam = "esam" case extendedDataServices = "extendedDataServices" case followSource = "followSource" @@ -21267,6 +21378,12 @@ extension MediaConvertClientTypes.JobTemplateSettings: Swift.Codable { if let availBlanking = self.availBlanking { try encodeContainer.encode(availBlanking, forKey: .availBlanking) } + if let colorConversion3DLUTSettings = colorConversion3DLUTSettings { + var colorConversion3DLUTSettingsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .colorConversion3DLUTSettings) + for colorconversion3dlutsetting0 in colorConversion3DLUTSettings { + try colorConversion3DLUTSettingsContainer.encode(colorconversion3dlutsetting0) + } + } if let esam = self.esam { try encodeContainer.encode(esam, forKey: .esam) } @@ -21314,6 +21431,17 @@ extension MediaConvertClientTypes.JobTemplateSettings: Swift.Codable { adAvailOffset = adAvailOffsetDecoded let availBlankingDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.AvailBlanking.self, forKey: .availBlanking) availBlanking = availBlankingDecoded + let colorConversion3DLUTSettingsContainer = try containerValues.decodeIfPresent([MediaConvertClientTypes.ColorConversion3DLUTSetting?].self, forKey: .colorConversion3DLUTSettings) + var colorConversion3DLUTSettingsDecoded0:[MediaConvertClientTypes.ColorConversion3DLUTSetting]? = nil + if let colorConversion3DLUTSettingsContainer = colorConversion3DLUTSettingsContainer { + colorConversion3DLUTSettingsDecoded0 = [MediaConvertClientTypes.ColorConversion3DLUTSetting]() + for structure0 in colorConversion3DLUTSettingsContainer { + if let structure0 = structure0 { + colorConversion3DLUTSettingsDecoded0?.append(structure0) + } + } + } + colorConversion3DLUTSettings = colorConversion3DLUTSettingsDecoded0 let esamDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.EsamSettings.self, forKey: .esam) esam = esamDecoded let extendedDataServicesDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.ExtendedDataServices.self, forKey: .extendedDataServices) @@ -21364,6 +21492,8 @@ extension MediaConvertClientTypes { public var adAvailOffset: Swift.Int? /// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails. public var availBlanking: MediaConvertClientTypes.AvailBlanking? + /// Use 3D LUTs to specify custom color mapping behavior when you convert from one color space into another. You can include up to 8 different 3D LUTs. + public var colorConversion3DLUTSettings: [MediaConvertClientTypes.ColorConversion3DLUTSetting]? /// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings. public var esam: MediaConvertClientTypes.EsamSettings? /// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory. @@ -21390,6 +21520,7 @@ extension MediaConvertClientTypes { public init( adAvailOffset: Swift.Int? = nil, availBlanking: MediaConvertClientTypes.AvailBlanking? = nil, + colorConversion3DLUTSettings: [MediaConvertClientTypes.ColorConversion3DLUTSetting]? = nil, esam: MediaConvertClientTypes.EsamSettings? = nil, extendedDataServices: MediaConvertClientTypes.ExtendedDataServices? = nil, followSource: Swift.Int? = nil, @@ -21405,6 +21536,7 @@ extension MediaConvertClientTypes { { self.adAvailOffset = adAvailOffset self.availBlanking = availBlanking + self.colorConversion3DLUTSettings = colorConversion3DLUTSettings self.esam = esam self.extendedDataServices = extendedDataServices self.followSource = followSource @@ -31921,6 +32053,358 @@ extension MediaConvertClientTypes { } } +extension MediaConvertClientTypes { + /// The four character code for the uncompressed video. + public enum UncompressedFourcc: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case i420 + case i422 + case i444 + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedFourcc] { + return [ + .i420, + .i422, + .i444, + .sdkUnknown("") + ] + } + 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 .i420: return "I420" + case .i422: return "I422" + case .i444: return "I444" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedFourcc(rawValue: rawValue) ?? UncompressedFourcc.sdkUnknown(rawValue) + } + } +} + +extension MediaConvertClientTypes { + /// Use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. + public enum UncompressedFramerateControl: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case initializeFromSource + case specified + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedFramerateControl] { + return [ + .initializeFromSource, + .specified, + .sdkUnknown("") + ] + } + 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 .initializeFromSource: return "INITIALIZE_FROM_SOURCE" + case .specified: return "SPECIFIED" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedFramerateControl(rawValue: rawValue) ?? UncompressedFramerateControl.sdkUnknown(rawValue) + } + } +} + +extension MediaConvertClientTypes { + /// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence: Choose FrameFormer to do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you choose FrameFormer, your input video resolution must be at least 128x96. + public enum UncompressedFramerateConversionAlgorithm: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case duplicateDrop + case frameformer + case interpolate + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedFramerateConversionAlgorithm] { + return [ + .duplicateDrop, + .frameformer, + .interpolate, + .sdkUnknown("") + ] + } + 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 .duplicateDrop: return "DUPLICATE_DROP" + case .frameformer: return "FRAMEFORMER" + case .interpolate: return "INTERPOLATE" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedFramerateConversionAlgorithm(rawValue: rawValue) ?? UncompressedFramerateConversionAlgorithm.sdkUnknown(rawValue) + } + } +} + +extension MediaConvertClientTypes { + /// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output. + public enum UncompressedInterlaceMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case interlaced + case progressive + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedInterlaceMode] { + return [ + .interlaced, + .progressive, + .sdkUnknown("") + ] + } + 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 .interlaced: return "INTERLACED" + case .progressive: return "PROGRESSIVE" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedInterlaceMode(rawValue: rawValue) ?? UncompressedInterlaceMode.sdkUnknown(rawValue) + } + } +} + +extension MediaConvertClientTypes { + /// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing, for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine to None or Soft. You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode to a value other than Progressive. + public enum UncompressedScanTypeConversionMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case interlaced + case interlacedOptimize + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedScanTypeConversionMode] { + return [ + .interlaced, + .interlacedOptimize, + .sdkUnknown("") + ] + } + 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 .interlaced: return "INTERLACED" + case .interlacedOptimize: return "INTERLACED_OPTIMIZE" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedScanTypeConversionMode(rawValue: rawValue) ?? UncompressedScanTypeConversionMode.sdkUnknown(rawValue) + } + } +} + +extension MediaConvertClientTypes.UncompressedSettings: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case fourcc = "fourcc" + case framerateControl = "framerateControl" + case framerateConversionAlgorithm = "framerateConversionAlgorithm" + case framerateDenominator = "framerateDenominator" + case framerateNumerator = "framerateNumerator" + case interlaceMode = "interlaceMode" + case scanTypeConversionMode = "scanTypeConversionMode" + case slowPal = "slowPal" + case telecine = "telecine" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let fourcc = self.fourcc { + try encodeContainer.encode(fourcc.rawValue, forKey: .fourcc) + } + if let framerateControl = self.framerateControl { + try encodeContainer.encode(framerateControl.rawValue, forKey: .framerateControl) + } + if let framerateConversionAlgorithm = self.framerateConversionAlgorithm { + try encodeContainer.encode(framerateConversionAlgorithm.rawValue, forKey: .framerateConversionAlgorithm) + } + if let framerateDenominator = self.framerateDenominator { + try encodeContainer.encode(framerateDenominator, forKey: .framerateDenominator) + } + if let framerateNumerator = self.framerateNumerator { + try encodeContainer.encode(framerateNumerator, forKey: .framerateNumerator) + } + if let interlaceMode = self.interlaceMode { + try encodeContainer.encode(interlaceMode.rawValue, forKey: .interlaceMode) + } + if let scanTypeConversionMode = self.scanTypeConversionMode { + try encodeContainer.encode(scanTypeConversionMode.rawValue, forKey: .scanTypeConversionMode) + } + if let slowPal = self.slowPal { + try encodeContainer.encode(slowPal.rawValue, forKey: .slowPal) + } + if let telecine = self.telecine { + try encodeContainer.encode(telecine.rawValue, forKey: .telecine) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let fourccDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedFourcc.self, forKey: .fourcc) + fourcc = fourccDecoded + let framerateControlDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedFramerateControl.self, forKey: .framerateControl) + framerateControl = framerateControlDecoded + let framerateConversionAlgorithmDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedFramerateConversionAlgorithm.self, forKey: .framerateConversionAlgorithm) + framerateConversionAlgorithm = framerateConversionAlgorithmDecoded + let framerateDenominatorDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .framerateDenominator) + framerateDenominator = framerateDenominatorDecoded + let framerateNumeratorDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .framerateNumerator) + framerateNumerator = framerateNumeratorDecoded + let interlaceModeDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedInterlaceMode.self, forKey: .interlaceMode) + interlaceMode = interlaceModeDecoded + let scanTypeConversionModeDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedScanTypeConversionMode.self, forKey: .scanTypeConversionMode) + scanTypeConversionMode = scanTypeConversionModeDecoded + let slowPalDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedSlowPal.self, forKey: .slowPal) + slowPal = slowPalDecoded + let telecineDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedTelecine.self, forKey: .telecine) + telecine = telecineDecoded + } +} + +extension MediaConvertClientTypes { + /// Required when you set Codec, under VideoDescription>CodecSettings to the value UNCOMPRESSED. + public struct UncompressedSettings: Swift.Equatable { + /// The four character code for the uncompressed video. + public var fourcc: MediaConvertClientTypes.UncompressedFourcc? + /// Use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. + public var framerateControl: MediaConvertClientTypes.UncompressedFramerateControl? + /// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence: Choose FrameFormer to do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you choose FrameFormer, your input video resolution must be at least 128x96. + public var framerateConversionAlgorithm: MediaConvertClientTypes.UncompressedFramerateConversionAlgorithm? + /// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976. + public var framerateDenominator: Swift.Int? + /// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976. + public var framerateNumerator: Swift.Int? + /// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output. + public var interlaceMode: MediaConvertClientTypes.UncompressedInterlaceMode? + /// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing, for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine to None or Soft. You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode to a value other than Progressive. + public var scanTypeConversionMode: MediaConvertClientTypes.UncompressedScanTypeConversionMode? + /// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. + public var slowPal: MediaConvertClientTypes.UncompressedSlowPal? + /// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine to create a smoother picture. When you keep the default value, None, MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture. + public var telecine: MediaConvertClientTypes.UncompressedTelecine? + + public init( + fourcc: MediaConvertClientTypes.UncompressedFourcc? = nil, + framerateControl: MediaConvertClientTypes.UncompressedFramerateControl? = nil, + framerateConversionAlgorithm: MediaConvertClientTypes.UncompressedFramerateConversionAlgorithm? = nil, + framerateDenominator: Swift.Int? = nil, + framerateNumerator: Swift.Int? = nil, + interlaceMode: MediaConvertClientTypes.UncompressedInterlaceMode? = nil, + scanTypeConversionMode: MediaConvertClientTypes.UncompressedScanTypeConversionMode? = nil, + slowPal: MediaConvertClientTypes.UncompressedSlowPal? = nil, + telecine: MediaConvertClientTypes.UncompressedTelecine? = nil + ) + { + self.fourcc = fourcc + self.framerateControl = framerateControl + self.framerateConversionAlgorithm = framerateConversionAlgorithm + self.framerateDenominator = framerateDenominator + self.framerateNumerator = framerateNumerator + self.interlaceMode = interlaceMode + self.scanTypeConversionMode = scanTypeConversionMode + self.slowPal = slowPal + self.telecine = telecine + } + } + +} + +extension MediaConvertClientTypes { + /// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. + public enum UncompressedSlowPal: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case disabled + case enabled + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedSlowPal] { + return [ + .disabled, + .enabled, + .sdkUnknown("") + ] + } + 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 .disabled: return "DISABLED" + case .enabled: return "ENABLED" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedSlowPal(rawValue: rawValue) ?? UncompressedSlowPal.sdkUnknown(rawValue) + } + } +} + +extension MediaConvertClientTypes { + /// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine to create a smoother picture. When you keep the default value, None, MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture. + public enum UncompressedTelecine: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case hard + case `none` + case sdkUnknown(Swift.String) + + public static var allCases: [UncompressedTelecine] { + return [ + .hard, + .none, + .sdkUnknown("") + ] + } + 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 .hard: return "HARD" + case .none: return "NONE" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = UncompressedTelecine(rawValue: rawValue) ?? UncompressedTelecine.sdkUnknown(rawValue) + } + } +} + extension UntagResourceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case tagKeys = "tagKeys" @@ -32887,6 +33371,7 @@ extension MediaConvertClientTypes { case mpeg2 case passthrough case prores + case uncompressed case vc3 case vp8 case vp9 @@ -32903,6 +33388,7 @@ extension MediaConvertClientTypes { .mpeg2, .passthrough, .prores, + .uncompressed, .vc3, .vp8, .vp9, @@ -32924,6 +33410,7 @@ extension MediaConvertClientTypes { case .mpeg2: return "MPEG2" case .passthrough: return "PASSTHROUGH" case .prores: return "PRORES" + case .uncompressed: return "UNCOMPRESSED" case .vc3: return "VC3" case .vp8: return "VP8" case .vp9: return "VP9" @@ -32949,6 +33436,7 @@ extension MediaConvertClientTypes.VideoCodecSettings: Swift.Codable { case h265Settings = "h265Settings" case mpeg2Settings = "mpeg2Settings" case proresSettings = "proresSettings" + case uncompressedSettings = "uncompressedSettings" case vc3Settings = "vc3Settings" case vp8Settings = "vp8Settings" case vp9Settings = "vp9Settings" @@ -32981,6 +33469,9 @@ extension MediaConvertClientTypes.VideoCodecSettings: Swift.Codable { if let proresSettings = self.proresSettings { try encodeContainer.encode(proresSettings, forKey: .proresSettings) } + if let uncompressedSettings = self.uncompressedSettings { + try encodeContainer.encode(uncompressedSettings, forKey: .uncompressedSettings) + } if let vc3Settings = self.vc3Settings { try encodeContainer.encode(vc3Settings, forKey: .vc3Settings) } @@ -33013,6 +33504,8 @@ extension MediaConvertClientTypes.VideoCodecSettings: Swift.Codable { mpeg2Settings = mpeg2SettingsDecoded let proresSettingsDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.ProresSettings.self, forKey: .proresSettings) proresSettings = proresSettingsDecoded + let uncompressedSettingsDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.UncompressedSettings.self, forKey: .uncompressedSettings) + uncompressedSettings = uncompressedSettingsDecoded let vc3SettingsDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.Vc3Settings.self, forKey: .vc3Settings) vc3Settings = vc3SettingsDecoded let vp8SettingsDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.Vp8Settings.self, forKey: .vp8Settings) @@ -33025,7 +33518,7 @@ extension MediaConvertClientTypes.VideoCodecSettings: Swift.Codable { } extension MediaConvertClientTypes { - /// Video codec settings contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec. For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings + /// Video codec settings contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec. For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * UNCOMPRESSED, UncompressedSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings public struct VideoCodecSettings: Swift.Equatable { /// Required when you set Codec, under VideoDescription>CodecSettings to the value AV1. public var av1Settings: MediaConvertClientTypes.Av1Settings? @@ -33043,6 +33536,8 @@ extension MediaConvertClientTypes { public var mpeg2Settings: MediaConvertClientTypes.Mpeg2Settings? /// Required when you set Codec to the value PRORES. public var proresSettings: MediaConvertClientTypes.ProresSettings? + /// Required when you set Codec, under VideoDescription>CodecSettings to the value UNCOMPRESSED. + public var uncompressedSettings: MediaConvertClientTypes.UncompressedSettings? /// Required when you set Codec to the value VC3 public var vc3Settings: MediaConvertClientTypes.Vc3Settings? /// Required when you set Codec to the value VP8. @@ -33061,6 +33556,7 @@ extension MediaConvertClientTypes { h265Settings: MediaConvertClientTypes.H265Settings? = nil, mpeg2Settings: MediaConvertClientTypes.Mpeg2Settings? = nil, proresSettings: MediaConvertClientTypes.ProresSettings? = nil, + uncompressedSettings: MediaConvertClientTypes.UncompressedSettings? = nil, vc3Settings: MediaConvertClientTypes.Vc3Settings? = nil, vp8Settings: MediaConvertClientTypes.Vp8Settings? = nil, vp9Settings: MediaConvertClientTypes.Vp9Settings? = nil, @@ -33075,6 +33571,7 @@ extension MediaConvertClientTypes { self.h265Settings = h265Settings self.mpeg2Settings = mpeg2Settings self.proresSettings = proresSettings + self.uncompressedSettings = uncompressedSettings self.vc3Settings = vc3Settings self.vp8Settings = vp8Settings self.vp9Settings = vp9Settings @@ -33194,7 +33691,7 @@ extension MediaConvertClientTypes { public var afdSignaling: MediaConvertClientTypes.AfdSignaling? /// The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting. public var antiAlias: MediaConvertClientTypes.AntiAlias? - /// Video codec settings contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec. For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings + /// Video codec settings contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec. For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * UNCOMPRESSED, UncompressedSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings public var codecSettings: MediaConvertClientTypes.VideoCodecSettings? /// Choose Insert for this setting to include color metadata in this output. Choose Ignore to exclude color metadata from this output. If you don't specify a value, the service sets this to Insert by default. public var colorMetadata: MediaConvertClientTypes.ColorMetadata? @@ -33593,6 +34090,7 @@ extension MediaConvertClientTypes.VideoSelector: Swift.Codable { case colorSpaceUsage = "colorSpaceUsage" case embeddedTimecodeOverride = "embeddedTimecodeOverride" case hdr10Metadata = "hdr10Metadata" + case maxLuminance = "maxLuminance" case padVideo = "padVideo" case pid = "pid" case programNumber = "programNumber" @@ -33617,6 +34115,9 @@ extension MediaConvertClientTypes.VideoSelector: Swift.Codable { if let hdr10Metadata = self.hdr10Metadata { try encodeContainer.encode(hdr10Metadata, forKey: .hdr10Metadata) } + if let maxLuminance = self.maxLuminance { + try encodeContainer.encode(maxLuminance, forKey: .maxLuminance) + } if let padVideo = self.padVideo { try encodeContainer.encode(padVideo.rawValue, forKey: .padVideo) } @@ -33646,6 +34147,8 @@ extension MediaConvertClientTypes.VideoSelector: Swift.Codable { embeddedTimecodeOverride = embeddedTimecodeOverrideDecoded let hdr10MetadataDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.Hdr10Metadata.self, forKey: .hdr10Metadata) hdr10Metadata = hdr10MetadataDecoded + let maxLuminanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxLuminance) + maxLuminance = maxLuminanceDecoded let padVideoDecoded = try containerValues.decodeIfPresent(MediaConvertClientTypes.PadVideo.self, forKey: .padVideo) padVideo = padVideoDecoded let pidDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pid) @@ -33682,6 +34185,8 @@ extension MediaConvertClientTypes { public var embeddedTimecodeOverride: MediaConvertClientTypes.EmbeddedTimecodeOverride? /// Use these settings to provide HDR 10 metadata that is missing or inaccurate in your input video. Appropriate values vary depending on the input video and must be provided by a color grader. The color grader generates these values during the HDR 10 mastering process. The valid range for each of these settings is 0 to 50,000. Each increment represents 0.00002 in CIE1931 color coordinate. Related settings - When you specify these values, you must also set Color space to HDR 10. To specify whether the the values you specify here take precedence over the values in the metadata of your input file, set Color space usage. To specify whether color metadata is included in an output, set Color metadata. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr. public var hdr10Metadata: MediaConvertClientTypes.Hdr10Metadata? + /// Specify the maximum mastering display luminance. Enter an integer from 0 to 2147483647, in units of 0.0001 nits. For example, enter 10000000 for 1000 nits. + public var maxLuminance: Swift.Int? /// Use this setting if your input has video and audio durations that don't align, and your output or player has strict alignment requirements. Examples: Input audio track has a delayed start. Input video track ends before audio ends. When you set Pad video to Black, MediaConvert generates black video frames so that output video and audio durations match. Black video frames are added at the beginning or end, depending on your input. To keep the default behavior and not generate black video, set Pad video to Disabled or leave blank. public var padVideo: MediaConvertClientTypes.PadVideo? /// Use PID to select specific video data from an input file. Specify this value as an integer; the system automatically converts it to the hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet identifier, is an identifier for a set of data in an MPEG-2 transport stream container. @@ -33699,6 +34204,7 @@ extension MediaConvertClientTypes { colorSpaceUsage: MediaConvertClientTypes.ColorSpaceUsage? = nil, embeddedTimecodeOverride: MediaConvertClientTypes.EmbeddedTimecodeOverride? = nil, hdr10Metadata: MediaConvertClientTypes.Hdr10Metadata? = nil, + maxLuminance: Swift.Int? = nil, padVideo: MediaConvertClientTypes.PadVideo? = nil, pid: Swift.Int? = nil, programNumber: Swift.Int? = nil, @@ -33711,6 +34217,7 @@ extension MediaConvertClientTypes { self.colorSpaceUsage = colorSpaceUsage self.embeddedTimecodeOverride = embeddedTimecodeOverride self.hdr10Metadata = hdr10Metadata + self.maxLuminance = maxLuminance self.padVideo = padVideo self.pid = pid self.programNumber = programNumber diff --git a/Sources/Services/AWSMediaLive/models/Models.swift b/Sources/Services/AWSMediaLive/models/Models.swift index 2a504c4606c..576bc95f77e 100644 --- a/Sources/Services/AWSMediaLive/models/Models.swift +++ b/Sources/Services/AWSMediaLive/models/Models.swift @@ -12978,8 +12978,6 @@ extension MediaLiveClientTypes.EncoderSettings: Swift.Codable { } } captionDescriptions = captionDescriptionsDecoded0 - let colorCorrectionSettingsDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.ColorCorrectionSettings.self, forKey: .colorCorrectionSettings) - colorCorrectionSettings = colorCorrectionSettingsDecoded let featureActivationsDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.FeatureActivations.self, forKey: .featureActivations) featureActivations = featureActivationsDecoded let globalConfigurationDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.GlobalConfiguration.self, forKey: .globalConfiguration) @@ -13014,6 +13012,8 @@ extension MediaLiveClientTypes.EncoderSettings: Swift.Codable { videoDescriptions = videoDescriptionsDecoded0 let thumbnailConfigurationDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.ThumbnailConfiguration.self, forKey: .thumbnailConfiguration) thumbnailConfiguration = thumbnailConfigurationDecoded + let colorCorrectionSettingsDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.ColorCorrectionSettings.self, forKey: .colorCorrectionSettings) + colorCorrectionSettings = colorCorrectionSettingsDecoded } } @@ -13031,7 +13031,7 @@ extension MediaLiveClientTypes { public var blackoutSlate: MediaLiveClientTypes.BlackoutSlate? /// Settings for caption decriptions public var captionDescriptions: [MediaLiveClientTypes.CaptionDescription]? - /// Color correction settings + /// Color Correction Settings public var colorCorrectionSettings: MediaLiveClientTypes.ColorCorrectionSettings? /// Feature Activations public var featureActivations: MediaLiveClientTypes.FeatureActivations? @@ -19701,8 +19701,105 @@ extension MediaLiveClientTypes { } } +extension MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairConfig: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case id = "id" + case profile = "profile" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + if let profile = self.profile { + try encodeContainer.encode(profile.rawValue, forKey: .profile) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let idDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .id) + id = idDecoded + let profileDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairProfile.self, forKey: .profile) + profile = profileDecoded + } +} + +extension MediaLiveClientTypes { + /// One audio configuration that specifies the format for one audio pair that the device produces as output. + public struct InputDeviceConfigurableAudioChannelPairConfig: Swift.Equatable { + /// The ID for one audio pair configuration, a value from 1 to 8. + public var id: Swift.Int? + /// The profile to set for one audio pair configuration. Choose an enumeration value. Each value describes one audio configuration using the format (rate control algorithm)-(codec)_(quality)-(bitrate in bytes). For example, CBR-AAC_HQ-192000. Or choose DISABLED, in which case the device won't produce audio for this pair. + public var profile: MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairProfile? + + public init( + id: Swift.Int? = nil, + profile: MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairProfile? = nil + ) + { + self.id = id + self.profile = profile + } + } + +} + +extension MediaLiveClientTypes { + /// Property of InputDeviceConfigurableAudioChannelPairConfig, which configures one audio channel that the device produces. + public enum InputDeviceConfigurableAudioChannelPairProfile: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case cbrAacHq192000 + case cbrAacHq256000 + case cbrAacHq384000 + case cbrAacHq512000 + case disabled + case vbrAacHe64000 + case vbrAacHhe16000 + case vbrAacLc128000 + case sdkUnknown(Swift.String) + + public static var allCases: [InputDeviceConfigurableAudioChannelPairProfile] { + return [ + .cbrAacHq192000, + .cbrAacHq256000, + .cbrAacHq384000, + .cbrAacHq512000, + .disabled, + .vbrAacHe64000, + .vbrAacHhe16000, + .vbrAacLc128000, + .sdkUnknown("") + ] + } + 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 .cbrAacHq192000: return "CBR-AAC_HQ-192000" + case .cbrAacHq256000: return "CBR-AAC_HQ-256000" + case .cbrAacHq384000: return "CBR-AAC_HQ-384000" + case .cbrAacHq512000: return "CBR-AAC_HQ-512000" + case .disabled: return "DISABLED" + case .vbrAacHe64000: return "VBR-AAC_HE-64000" + case .vbrAacHhe16000: return "VBR-AAC_HHE-16000" + case .vbrAacLc128000: return "VBR-AAC_LC-128000" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = InputDeviceConfigurableAudioChannelPairProfile(rawValue: rawValue) ?? InputDeviceConfigurableAudioChannelPairProfile.sdkUnknown(rawValue) + } + } +} + extension MediaLiveClientTypes.InputDeviceConfigurableSettings: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case audioChannelPairs = "audioChannelPairs" case codec = "codec" case configuredInput = "configuredInput" case latencyMs = "latencyMs" @@ -19712,6 +19809,12 @@ extension MediaLiveClientTypes.InputDeviceConfigurableSettings: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let audioChannelPairs = audioChannelPairs { + var audioChannelPairsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .audioChannelPairs) + for inputdeviceconfigurableaudiochannelpairconfig0 in audioChannelPairs { + try audioChannelPairsContainer.encode(inputdeviceconfigurableaudiochannelpairconfig0) + } + } if let codec = self.codec { try encodeContainer.encode(codec.rawValue, forKey: .codec) } @@ -19741,12 +19844,25 @@ extension MediaLiveClientTypes.InputDeviceConfigurableSettings: Swift.Codable { codec = codecDecoded let mediaconnectSettingsDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.InputDeviceMediaConnectConfigurableSettings.self, forKey: .mediaconnectSettings) mediaconnectSettings = mediaconnectSettingsDecoded + let audioChannelPairsContainer = try containerValues.decodeIfPresent([MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairConfig?].self, forKey: .audioChannelPairs) + var audioChannelPairsDecoded0:[MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairConfig]? = nil + if let audioChannelPairsContainer = audioChannelPairsContainer { + audioChannelPairsDecoded0 = [MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairConfig]() + for structure0 in audioChannelPairsContainer { + if let structure0 = structure0 { + audioChannelPairsDecoded0?.append(structure0) + } + } + } + audioChannelPairs = audioChannelPairsDecoded0 } } extension MediaLiveClientTypes { /// Configurable settings for the input device. public struct InputDeviceConfigurableSettings: Swift.Equatable { + /// An array of eight audio configurations, one for each audio pair in the source. Set up each audio configuration either to exclude the pair, or to format it and include it in the output from the device. This parameter applies only to UHD devices, and only when the device is configured as the source for a MediaConnect flow. For an HD device, you configure the audio by setting up audio selectors in the channel configuration. + public var audioChannelPairs: [MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairConfig]? /// Choose the codec for the video that the device produces. Only UHD devices can specify this parameter. public var codec: MediaLiveClientTypes.InputDeviceCodec? /// The input source that you want to use. If the device has a source connected to only one of its input ports, or if you don't care which source the device sends, specify Auto. If the device has sources connected to both its input ports, and you want to use a specific source, specify the source. @@ -19759,6 +19875,7 @@ extension MediaLiveClientTypes { public var mediaconnectSettings: MediaLiveClientTypes.InputDeviceMediaConnectConfigurableSettings? public init( + audioChannelPairs: [MediaLiveClientTypes.InputDeviceConfigurableAudioChannelPairConfig]? = nil, codec: MediaLiveClientTypes.InputDeviceCodec? = nil, configuredInput: MediaLiveClientTypes.InputDeviceConfiguredInput? = nil, latencyMs: Swift.Int? = nil, @@ -19766,6 +19883,7 @@ extension MediaLiveClientTypes { mediaconnectSettings: MediaLiveClientTypes.InputDeviceMediaConnectConfigurableSettings? = nil ) { + self.audioChannelPairs = audioChannelPairs self.codec = codec self.configuredInput = configuredInput self.latencyMs = latencyMs @@ -20657,9 +20775,106 @@ extension MediaLiveClientTypes { } } +extension MediaLiveClientTypes.InputDeviceUhdAudioChannelPairConfig: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case id = "id" + case profile = "profile" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) + } + if let profile = self.profile { + try encodeContainer.encode(profile.rawValue, forKey: .profile) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let idDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .id) + id = idDecoded + let profileDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.InputDeviceUhdAudioChannelPairProfile.self, forKey: .profile) + profile = profileDecoded + } +} + +extension MediaLiveClientTypes { + /// One audio configuration that specifies the format for one audio pair that the device produces as output. + public struct InputDeviceUhdAudioChannelPairConfig: Swift.Equatable { + /// The ID for one audio pair configuration, a value from 1 to 8. + public var id: Swift.Int? + /// The profile for one audio pair configuration. This property describes one audio configuration in the format (rate control algorithm)-(codec)_(quality)-(bitrate in bytes). For example, CBR-AAC_HQ-192000. Or DISABLED, in which case the device won't produce audio for this pair. + public var profile: MediaLiveClientTypes.InputDeviceUhdAudioChannelPairProfile? + + public init( + id: Swift.Int? = nil, + profile: MediaLiveClientTypes.InputDeviceUhdAudioChannelPairProfile? = nil + ) + { + self.id = id + self.profile = profile + } + } + +} + +extension MediaLiveClientTypes { + /// Property of InputDeviceUhdAudioChannelPairConfig, which describes one audio channel that the device is configured to produce. + public enum InputDeviceUhdAudioChannelPairProfile: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case cbrAacHq192000 + case cbrAacHq256000 + case cbrAacHq384000 + case cbrAacHq512000 + case disabled + case vbrAacHe64000 + case vbrAacHhe16000 + case vbrAacLc128000 + case sdkUnknown(Swift.String) + + public static var allCases: [InputDeviceUhdAudioChannelPairProfile] { + return [ + .cbrAacHq192000, + .cbrAacHq256000, + .cbrAacHq384000, + .cbrAacHq512000, + .disabled, + .vbrAacHe64000, + .vbrAacHhe16000, + .vbrAacLc128000, + .sdkUnknown("") + ] + } + 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 .cbrAacHq192000: return "CBR-AAC_HQ-192000" + case .cbrAacHq256000: return "CBR-AAC_HQ-256000" + case .cbrAacHq384000: return "CBR-AAC_HQ-384000" + case .cbrAacHq512000: return "CBR-AAC_HQ-512000" + case .disabled: return "DISABLED" + case .vbrAacHe64000: return "VBR-AAC_HE-64000" + case .vbrAacHhe16000: return "VBR-AAC_HHE-16000" + case .vbrAacLc128000: return "VBR-AAC_LC-128000" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = InputDeviceUhdAudioChannelPairProfile(rawValue: rawValue) ?? InputDeviceUhdAudioChannelPairProfile.sdkUnknown(rawValue) + } + } +} + extension MediaLiveClientTypes.InputDeviceUhdSettings: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case activeInput = "activeInput" + case audioChannelPairs = "audioChannelPairs" case codec = "codec" case configuredInput = "configuredInput" case deviceState = "deviceState" @@ -20677,6 +20892,12 @@ extension MediaLiveClientTypes.InputDeviceUhdSettings: Swift.Codable { if let activeInput = self.activeInput { try encodeContainer.encode(activeInput.rawValue, forKey: .activeInput) } + if let audioChannelPairs = audioChannelPairs { + var audioChannelPairsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .audioChannelPairs) + for inputdeviceuhdaudiochannelpairconfig0 in audioChannelPairs { + try audioChannelPairsContainer.encode(inputdeviceuhdaudiochannelpairconfig0) + } + } if let codec = self.codec { try encodeContainer.encode(codec.rawValue, forKey: .codec) } @@ -20733,6 +20954,17 @@ extension MediaLiveClientTypes.InputDeviceUhdSettings: Swift.Codable { codec = codecDecoded let mediaconnectSettingsDecoded = try containerValues.decodeIfPresent(MediaLiveClientTypes.InputDeviceMediaConnectSettings.self, forKey: .mediaconnectSettings) mediaconnectSettings = mediaconnectSettingsDecoded + let audioChannelPairsContainer = try containerValues.decodeIfPresent([MediaLiveClientTypes.InputDeviceUhdAudioChannelPairConfig?].self, forKey: .audioChannelPairs) + var audioChannelPairsDecoded0:[MediaLiveClientTypes.InputDeviceUhdAudioChannelPairConfig]? = nil + if let audioChannelPairsContainer = audioChannelPairsContainer { + audioChannelPairsDecoded0 = [MediaLiveClientTypes.InputDeviceUhdAudioChannelPairConfig]() + for structure0 in audioChannelPairsContainer { + if let structure0 = structure0 { + audioChannelPairsDecoded0?.append(structure0) + } + } + } + audioChannelPairs = audioChannelPairsDecoded0 } } @@ -20741,6 +20973,8 @@ extension MediaLiveClientTypes { public struct InputDeviceUhdSettings: Swift.Equatable { /// If you specified Auto as the configured input, specifies which of the sources is currently active (SDI or HDMI). public var activeInput: MediaLiveClientTypes.InputDeviceActiveInput? + /// An array of eight audio configurations, one for each audio pair in the source. Each audio configuration specifies either to exclude the pair, or to format it and include it in the output from the UHD device. Applies only when the device is configured as the source for a MediaConnect flow. + public var audioChannelPairs: [MediaLiveClientTypes.InputDeviceUhdAudioChannelPairConfig]? /// The codec for the video that the device produces. public var codec: MediaLiveClientTypes.InputDeviceCodec? /// The source at the input device that is currently active. You can specify this source. @@ -20764,6 +20998,7 @@ extension MediaLiveClientTypes { public init( activeInput: MediaLiveClientTypes.InputDeviceActiveInput? = nil, + audioChannelPairs: [MediaLiveClientTypes.InputDeviceUhdAudioChannelPairConfig]? = nil, codec: MediaLiveClientTypes.InputDeviceCodec? = nil, configuredInput: MediaLiveClientTypes.InputDeviceConfiguredInput? = nil, deviceState: MediaLiveClientTypes.InputDeviceState? = nil, @@ -20777,6 +21012,7 @@ extension MediaLiveClientTypes { ) { self.activeInput = activeInput + self.audioChannelPairs = audioChannelPairs self.codec = codec self.configuredInput = configuredInput self.deviceState = deviceState diff --git a/Sources/Services/AWSMediaTailor/models/Models.swift b/Sources/Services/AWSMediaTailor/models/Models.swift index 81777553eb5..eb1fb4eca43 100644 --- a/Sources/Services/AWSMediaTailor/models/Models.swift +++ b/Sources/Services/AWSMediaTailor/models/Models.swift @@ -1172,6 +1172,7 @@ extension CreateChannelInput: Swift.Encodable { case playbackMode = "PlaybackMode" case tags = "tags" case tier = "Tier" + case timeShiftConfiguration = "TimeShiftConfiguration" } public func encode(to encoder: Swift.Encoder) throws { @@ -1197,6 +1198,9 @@ extension CreateChannelInput: Swift.Encodable { if let tier = self.tier { try encodeContainer.encode(tier.rawValue, forKey: .tier) } + if let timeShiftConfiguration = self.timeShiftConfiguration { + try encodeContainer.encode(timeShiftConfiguration, forKey: .timeShiftConfiguration) + } } } @@ -1225,6 +1229,8 @@ public struct CreateChannelInput: Swift.Equatable { public var tags: [Swift.String:Swift.String]? /// The tier of the channel. public var tier: MediaTailorClientTypes.Tier? + /// The time-shifted viewing configuration you want to associate to the channel. + public var timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? public init( channelName: Swift.String? = nil, @@ -1232,7 +1238,8 @@ public struct CreateChannelInput: Swift.Equatable { outputs: [MediaTailorClientTypes.RequestOutputItem]? = nil, playbackMode: MediaTailorClientTypes.PlaybackMode? = nil, tags: [Swift.String:Swift.String]? = nil, - tier: MediaTailorClientTypes.Tier? = nil + tier: MediaTailorClientTypes.Tier? = nil, + timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? = nil ) { self.channelName = channelName @@ -1241,6 +1248,7 @@ public struct CreateChannelInput: Swift.Equatable { self.playbackMode = playbackMode self.tags = tags self.tier = tier + self.timeShiftConfiguration = timeShiftConfiguration } } @@ -1250,6 +1258,7 @@ struct CreateChannelInputBody: Swift.Equatable { let playbackMode: MediaTailorClientTypes.PlaybackMode? let tags: [Swift.String:Swift.String]? let tier: MediaTailorClientTypes.Tier? + let timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? } extension CreateChannelInputBody: Swift.Decodable { @@ -1259,6 +1268,7 @@ extension CreateChannelInputBody: Swift.Decodable { case playbackMode = "PlaybackMode" case tags = "tags" case tier = "Tier" + case timeShiftConfiguration = "TimeShiftConfiguration" } public init(from decoder: Swift.Decoder) throws { @@ -1291,6 +1301,8 @@ extension CreateChannelInputBody: Swift.Decodable { tags = tagsDecoded0 let tierDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.Tier.self, forKey: .tier) tier = tierDecoded + let timeShiftConfigurationDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.TimeShiftConfiguration.self, forKey: .timeShiftConfiguration) + timeShiftConfiguration = timeShiftConfigurationDecoded } } @@ -1309,6 +1321,7 @@ extension CreateChannelOutput: ClientRuntime.HttpResponseBinding { self.playbackMode = output.playbackMode self.tags = output.tags self.tier = output.tier + self.timeShiftConfiguration = output.timeShiftConfiguration } else { self.arn = nil self.channelName = nil @@ -1320,6 +1333,7 @@ extension CreateChannelOutput: ClientRuntime.HttpResponseBinding { self.playbackMode = nil self.tags = nil self.tier = nil + self.timeShiftConfiguration = nil } } } @@ -1345,6 +1359,8 @@ public struct CreateChannelOutput: Swift.Equatable { public var tags: [Swift.String:Swift.String]? /// The tier of the channel. public var tier: Swift.String? + /// The time-shifted viewing configuration assigned to the channel. + public var timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? public init( arn: Swift.String? = nil, @@ -1356,7 +1372,8 @@ public struct CreateChannelOutput: Swift.Equatable { outputs: [MediaTailorClientTypes.ResponseOutputItem]? = nil, playbackMode: Swift.String? = nil, tags: [Swift.String:Swift.String]? = nil, - tier: Swift.String? = nil + tier: Swift.String? = nil, + timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? = nil ) { self.arn = arn @@ -1369,6 +1386,7 @@ public struct CreateChannelOutput: Swift.Equatable { self.playbackMode = playbackMode self.tags = tags self.tier = tier + self.timeShiftConfiguration = timeShiftConfiguration } } @@ -1383,6 +1401,7 @@ struct CreateChannelOutputBody: Swift.Equatable { let playbackMode: Swift.String? let tags: [Swift.String:Swift.String]? let tier: Swift.String? + let timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? } extension CreateChannelOutputBody: Swift.Decodable { @@ -1397,6 +1416,7 @@ extension CreateChannelOutputBody: Swift.Decodable { case playbackMode = "PlaybackMode" case tags = "tags" case tier = "Tier" + case timeShiftConfiguration = "TimeShiftConfiguration" } public init(from decoder: Swift.Decoder) throws { @@ -1439,6 +1459,8 @@ extension CreateChannelOutputBody: Swift.Decodable { tags = tagsDecoded0 let tierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tier) tier = tierDecoded + let timeShiftConfigurationDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.TimeShiftConfiguration.self, forKey: .timeShiftConfiguration) + timeShiftConfiguration = timeShiftConfigurationDecoded } } @@ -3344,6 +3366,7 @@ extension DescribeChannelOutput: ClientRuntime.HttpResponseBinding { self.playbackMode = output.playbackMode self.tags = output.tags self.tier = output.tier + self.timeShiftConfiguration = output.timeShiftConfiguration } else { self.arn = nil self.channelName = nil @@ -3356,6 +3379,7 @@ extension DescribeChannelOutput: ClientRuntime.HttpResponseBinding { self.playbackMode = nil self.tags = nil self.tier = nil + self.timeShiftConfiguration = nil } } } @@ -3384,6 +3408,8 @@ public struct DescribeChannelOutput: Swift.Equatable { public var tags: [Swift.String:Swift.String]? /// The channel's tier. public var tier: Swift.String? + /// The time-shifted viewing configuration for the channel. + public var timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? public init( arn: Swift.String? = nil, @@ -3396,7 +3422,8 @@ public struct DescribeChannelOutput: Swift.Equatable { outputs: [MediaTailorClientTypes.ResponseOutputItem]? = nil, playbackMode: Swift.String? = nil, tags: [Swift.String:Swift.String]? = nil, - tier: Swift.String? = nil + tier: Swift.String? = nil, + timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? = nil ) { self.arn = arn @@ -3410,6 +3437,7 @@ public struct DescribeChannelOutput: Swift.Equatable { self.playbackMode = playbackMode self.tags = tags self.tier = tier + self.timeShiftConfiguration = timeShiftConfiguration } } @@ -3425,6 +3453,7 @@ struct DescribeChannelOutputBody: Swift.Equatable { let tags: [Swift.String:Swift.String]? let tier: Swift.String? let logConfiguration: MediaTailorClientTypes.LogConfigurationForChannel? + let timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? } extension DescribeChannelOutputBody: Swift.Decodable { @@ -3440,6 +3469,7 @@ extension DescribeChannelOutputBody: Swift.Decodable { case playbackMode = "PlaybackMode" case tags = "tags" case tier = "Tier" + case timeShiftConfiguration = "TimeShiftConfiguration" } public init(from decoder: Swift.Decoder) throws { @@ -3484,6 +3514,8 @@ extension DescribeChannelOutputBody: Swift.Decodable { tier = tierDecoded let logConfigurationDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.LogConfigurationForChannel.self, forKey: .logConfiguration) logConfiguration = logConfigurationDecoded + let timeShiftConfigurationDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.TimeShiftConfiguration.self, forKey: .timeShiftConfiguration) + timeShiftConfiguration = timeShiftConfigurationDecoded } } @@ -8759,6 +8791,42 @@ extension MediaTailorClientTypes { } } +extension MediaTailorClientTypes.TimeShiftConfiguration: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxTimeDelaySeconds = "MaxTimeDelaySeconds" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let maxTimeDelaySeconds = self.maxTimeDelaySeconds { + try encodeContainer.encode(maxTimeDelaySeconds, forKey: .maxTimeDelaySeconds) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let maxTimeDelaySecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxTimeDelaySeconds) + maxTimeDelaySeconds = maxTimeDelaySecondsDecoded + } +} + +extension MediaTailorClientTypes { + /// The configuration for time-shifted viewing. + public struct TimeShiftConfiguration: Swift.Equatable { + /// The maximum time delay for time-shifted viewing. The minimum allowed maximum time delay is 0 seconds, and the maximum allowed maximum time delay is 21600 seconds (6 hours). + /// This member is required. + public var maxTimeDelaySeconds: Swift.Int? + + public init( + maxTimeDelaySeconds: Swift.Int? = nil + ) + { + self.maxTimeDelaySeconds = maxTimeDelaySeconds + } + } + +} + extension MediaTailorClientTypes.TimeSignalMessage: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case segmentationDescriptors = "SegmentationDescriptors" @@ -8993,6 +9061,7 @@ extension UpdateChannelInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case fillerSlate = "FillerSlate" case outputs = "Outputs" + case timeShiftConfiguration = "TimeShiftConfiguration" } public func encode(to encoder: Swift.Encoder) throws { @@ -9006,6 +9075,9 @@ extension UpdateChannelInput: Swift.Encodable { try outputsContainer.encode(requestoutputitem0) } } + if let timeShiftConfiguration = self.timeShiftConfiguration { + try encodeContainer.encode(timeShiftConfiguration, forKey: .timeShiftConfiguration) + } } } @@ -9027,28 +9099,34 @@ public struct UpdateChannelInput: Swift.Equatable { /// The channel's output properties. /// This member is required. public var outputs: [MediaTailorClientTypes.RequestOutputItem]? + /// The time-shifted viewing configuration you want to associate to the channel. + public var timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? public init( channelName: Swift.String? = nil, fillerSlate: MediaTailorClientTypes.SlateSource? = nil, - outputs: [MediaTailorClientTypes.RequestOutputItem]? = nil + outputs: [MediaTailorClientTypes.RequestOutputItem]? = nil, + timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? = nil ) { self.channelName = channelName self.fillerSlate = fillerSlate self.outputs = outputs + self.timeShiftConfiguration = timeShiftConfiguration } } struct UpdateChannelInputBody: Swift.Equatable { let fillerSlate: MediaTailorClientTypes.SlateSource? let outputs: [MediaTailorClientTypes.RequestOutputItem]? + let timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? } extension UpdateChannelInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case fillerSlate = "FillerSlate" case outputs = "Outputs" + case timeShiftConfiguration = "TimeShiftConfiguration" } public init(from decoder: Swift.Decoder) throws { @@ -9066,6 +9144,8 @@ extension UpdateChannelInputBody: Swift.Decodable { } } outputs = outputsDecoded0 + let timeShiftConfigurationDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.TimeShiftConfiguration.self, forKey: .timeShiftConfiguration) + timeShiftConfiguration = timeShiftConfigurationDecoded } } @@ -9084,6 +9164,7 @@ extension UpdateChannelOutput: ClientRuntime.HttpResponseBinding { self.playbackMode = output.playbackMode self.tags = output.tags self.tier = output.tier + self.timeShiftConfiguration = output.timeShiftConfiguration } else { self.arn = nil self.channelName = nil @@ -9095,6 +9176,7 @@ extension UpdateChannelOutput: ClientRuntime.HttpResponseBinding { self.playbackMode = nil self.tags = nil self.tier = nil + self.timeShiftConfiguration = nil } } } @@ -9120,6 +9202,8 @@ public struct UpdateChannelOutput: Swift.Equatable { public var tags: [Swift.String:Swift.String]? /// The tier associated with this Channel. public var tier: Swift.String? + /// The time-shifted viewing configuration for the channel. + public var timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? public init( arn: Swift.String? = nil, @@ -9131,7 +9215,8 @@ public struct UpdateChannelOutput: Swift.Equatable { outputs: [MediaTailorClientTypes.ResponseOutputItem]? = nil, playbackMode: Swift.String? = nil, tags: [Swift.String:Swift.String]? = nil, - tier: Swift.String? = nil + tier: Swift.String? = nil, + timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? = nil ) { self.arn = arn @@ -9144,6 +9229,7 @@ public struct UpdateChannelOutput: Swift.Equatable { self.playbackMode = playbackMode self.tags = tags self.tier = tier + self.timeShiftConfiguration = timeShiftConfiguration } } @@ -9158,6 +9244,7 @@ struct UpdateChannelOutputBody: Swift.Equatable { let playbackMode: Swift.String? let tags: [Swift.String:Swift.String]? let tier: Swift.String? + let timeShiftConfiguration: MediaTailorClientTypes.TimeShiftConfiguration? } extension UpdateChannelOutputBody: Swift.Decodable { @@ -9172,6 +9259,7 @@ extension UpdateChannelOutputBody: Swift.Decodable { case playbackMode = "PlaybackMode" case tags = "tags" case tier = "Tier" + case timeShiftConfiguration = "TimeShiftConfiguration" } public init(from decoder: Swift.Decoder) throws { @@ -9214,6 +9302,8 @@ extension UpdateChannelOutputBody: Swift.Decodable { tags = tagsDecoded0 let tierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tier) tier = tierDecoded + let timeShiftConfigurationDecoded = try containerValues.decodeIfPresent(MediaTailorClientTypes.TimeShiftConfiguration.self, forKey: .timeShiftConfiguration) + timeShiftConfiguration = timeShiftConfigurationDecoded } } diff --git a/Sources/Services/AWSNeptuneGraph/Waiters.swift b/Sources/Services/AWSNeptuneGraph/Waiters.swift new file mode 100644 index 00000000000..4cd9de58cbd --- /dev/null +++ b/Sources/Services/AWSNeptuneGraph/Waiters.swift @@ -0,0 +1,6 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import ClientRuntime + +extension NeptuneGraphClientProtocol { +} diff --git a/Sources/Services/AWSNetworkMonitor/EndpointResolver.swift b/Sources/Services/AWSNetworkMonitor/EndpointResolver.swift new file mode 100644 index 00000000000..c35a80789a9 --- /dev/null +++ b/Sources/Services/AWSNetworkMonitor/EndpointResolver.swift @@ -0,0 +1,153 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import AWSClientRuntime +import ClientRuntime + +public struct EndpointParams { + /// Override the endpoint used to send this request + public let endpoint: Swift.String? + /// The AWS region used to dispatch the request. + public let region: Swift.String? + /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + public let useDualStack: Swift.Bool + /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + public let useFIPS: Swift.Bool + + public init( + endpoint: Swift.String? = nil, + region: Swift.String? = nil, + useDualStack: Swift.Bool = false, + useFIPS: Swift.Bool = false + ) + { + self.endpoint = endpoint + self.region = region + self.useDualStack = useDualStack + self.useFIPS = useFIPS + } +} + +public protocol EndpointResolver { + func resolve(params: EndpointParams) throws -> ClientRuntime.Endpoint +} + +public struct DefaultEndpointResolver: EndpointResolver { + + private let engine: AWSClientRuntime.AWSEndpointsRuleEngine + private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://networkmonitor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://networkmonitor-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://networkmonitor.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://networkmonitor.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}],\"type\":\"tree\"}]}" + + public init() throws { + engine = try AWSClientRuntime.AWSEndpointsRuleEngine(ruleSet: ruleSet) + } + + public func resolve(params: EndpointParams) throws -> ClientRuntime.Endpoint { + let context = try AWSClientRuntime.AWSEndpointsRequestContext() + try context.add(name: "Endpoint", value: params.endpoint) + try context.add(name: "Region", value: params.region) + try context.add(name: "UseDualStack", value: params.useDualStack) + try context.add(name: "UseFIPS", value: params.useFIPS) + + guard let crtResolvedEndpoint = try engine.resolve(context: context) else { + throw EndpointError.unresolved("Failed to resolved endpoint") + } + + if crtResolvedEndpoint.getType() == .error { + let error = crtResolvedEndpoint.getError() + throw EndpointError.unresolved(error) + } + + guard let url = crtResolvedEndpoint.getURL() else { + assertionFailure("This must be a bug in either CRT or the rule engine, if the endpoint is not an error, it must have a url") + throw EndpointError.unresolved("Failed to resolved endpoint") + } + + let headers = crtResolvedEndpoint.getHeaders() ?? [:] + let properties = crtResolvedEndpoint.getProperties() ?? [:] + return try Endpoint(urlString: url, headers: Headers(headers), properties: properties) + } +} + +public struct EndpointResolverMiddleware: ClientRuntime.Middleware { + public let id: Swift.String = "EndpointResolverMiddleware" + + let endpointResolver: EndpointResolver + + let endpointParams: EndpointParams + + let authSchemeResolver: AWSClientRuntime.AuthSchemeResolver + + public init(endpointResolver: EndpointResolver, endpointParams: EndpointParams, authSchemeResolver: AWSClientRuntime.AuthSchemeResolver = AWSClientRuntime.DefaultAuthSchemeResolver()) { + self.endpointResolver = endpointResolver + self.endpointParams = endpointParams + self.authSchemeResolver = authSchemeResolver + } + + public func handle(context: Context, + input: ClientRuntime.SdkHttpRequestBuilder, + next: H) async throws -> ClientRuntime.OperationOutput + where H: Handler, + Self.MInput == H.Input, + Self.MOutput == H.Output, + Self.Context == H.Context + { + let endpoint = try endpointResolver.resolve(params: endpointParams) + + var signingName: String? = nil + var signingRegion: String? = nil + var signingAlgorithm: String? = nil + if let authSchemes = endpoint.authSchemes() { + let schemes = try authSchemes.map { try AuthScheme(from: $0) } + let authScheme = try authSchemeResolver.resolve(authSchemes: schemes) + signingAlgorithm = authScheme.name + switch authScheme { + case .sigV4(let param): + signingName = param.signingName + signingRegion = param.signingRegion + case .sigV4A(let param): + signingName = param.signingName + signingRegion = param.signingRegionSet?.first + case .none: + break + } + } + + let awsEndpoint = AWSEndpoint(endpoint: endpoint, signingName: signingName, signingRegion: signingRegion) + + var host = "" + if let hostOverride = context.getHost() { + host = hostOverride + } else { + host = "\(context.getHostPrefix() ?? "")\(awsEndpoint.endpoint.host)" + } + + if let protocolType = awsEndpoint.endpoint.protocolType { + input.withProtocol(protocolType) + } + + if let signingRegion = signingRegion { + context.attributes.set(key: HttpContext.signingRegion, value: signingRegion) + } + if let signingName = signingName { + context.attributes.set(key: HttpContext.signingName, value: signingName) + } + if let signingAlgorithm = signingAlgorithm { + context.attributes.set(key: HttpContext.signingAlgorithm, value: signingAlgorithm) + } + + if let headers = endpoint.headers { + input.withHeaders(headers) + } + + input.withMethod(context.getMethod()) + .withHost(host) + .withPort(awsEndpoint.endpoint.port) + .withPath(awsEndpoint.endpoint.path.appendingPathComponent(context.getPath())) + .withHeader(name: "Host", value: host) + + return try await next.handle(context: context, input: input) + } + + public typealias MInput = ClientRuntime.SdkHttpRequestBuilder + public typealias MOutput = ClientRuntime.OperationOutput + public typealias Context = ClientRuntime.HttpContext +} diff --git a/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift b/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift new file mode 100644 index 00000000000..73595edb3bd --- /dev/null +++ b/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift @@ -0,0 +1,660 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime +import Foundation +import Logging + +public class NetworkMonitorClient { + public static let clientName = "NetworkMonitorClient" + let client: ClientRuntime.SdkHttpClient + let config: NetworkMonitorClient.NetworkMonitorClientConfiguration + let serviceName = "NetworkMonitor" + let encoder: ClientRuntime.RequestEncoder + let decoder: ClientRuntime.ResponseDecoder + + public init(config: NetworkMonitorClient.NetworkMonitorClientConfiguration) { + client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) + let encoder = ClientRuntime.JSONEncoder() + encoder.dateEncodingStrategy = .secondsSince1970 + encoder.nonConformingFloatEncodingStrategy = .convertToString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") + self.encoder = config.encoder ?? encoder + let decoder = ClientRuntime.JSONDecoder() + decoder.dateDecodingStrategy = .secondsSince1970 + decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") + self.decoder = config.decoder ?? decoder + self.config = config + } + + public convenience init(region: Swift.String) throws { + let config = try NetworkMonitorClient.NetworkMonitorClientConfiguration(region: region) + self.init(config: config) + } + + public convenience init() async throws { + let config = try await NetworkMonitorClient.NetworkMonitorClientConfiguration() + self.init(config: config) + } +} + +extension NetworkMonitorClient { + public typealias NetworkMonitorClientConfiguration = AWSClientConfiguration + + public struct ServiceSpecificConfiguration: AWSServiceSpecificConfiguration { + public typealias AWSServiceEndpointResolver = EndpointResolver + + public var serviceName: String { "NetworkMonitor" } + public var clientName: String { "NetworkMonitorClient" } + public var endpointResolver: EndpointResolver + + public init(endpointResolver: EndpointResolver? = nil) throws { + self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() + } + } +} + +public struct NetworkMonitorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { + public var label = "NetworkMonitorClient" + let logLevel: ClientRuntime.SDKLogLevel + public func construct(label: String) -> LogHandler { + var handler = StreamLogHandler.standardOutput(label: label) + handler.logLevel = logLevel.toLoggerType() + return handler + } + public init(logLevel: ClientRuntime.SDKLogLevel) { + self.logLevel = logLevel + } +} + +extension NetworkMonitorClient: NetworkMonitorClientProtocol { + /// Performs the `CreateMonitor` operation on the `NetworkMonitor` service. + /// + /// Creates a monitor between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch. + /// + /// - Parameter CreateMonitorInput : [no documentation found] + /// + /// - Returns: `CreateMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func createMonitor(input: CreateMonitorInput) async throws -> CreateMonitorOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "createMonitor") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "createMonitor") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.clientToken)) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateMonitorOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `CreateProbe` operation on the `NetworkMonitor` service. + /// + /// Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. + /// + /// - Parameter CreateProbeInput : [no documentation found] + /// + /// - Returns: `CreateProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func createProbe(input: CreateProbeInput) async throws -> CreateProbeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "createProbe") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "createProbe") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.clientToken)) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateProbeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `DeleteMonitor` operation on the `NetworkMonitor` service. + /// + /// Deletes a specified monitor. + /// + /// - Parameter DeleteMonitorInput : [no documentation found] + /// + /// - Returns: `DeleteMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func deleteMonitor(input: DeleteMonitorInput) async throws -> DeleteMonitorOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "deleteMonitor") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "deleteMonitor") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteMonitorOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `DeleteProbe` operation on the `NetworkMonitor` service. + /// + /// Deletes the specified monitor. Once a probe is deleted you'll no longer incur any billing fees for that probe. + /// + /// - Parameter DeleteProbeInput : [no documentation found] + /// + /// - Returns: `DeleteProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func deleteProbe(input: DeleteProbeInput) async throws -> DeleteProbeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "deleteProbe") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "deleteProbe") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteProbeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `GetMonitor` operation on the `NetworkMonitor` service. + /// + /// Returns details about a specific monitor. + /// + /// - Parameter GetMonitorInput : [no documentation found] + /// + /// - Returns: `GetMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func getMonitor(input: GetMonitorInput) async throws -> GetMonitorOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getMonitor") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "getMonitor") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMonitorOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `GetProbe` operation on the `NetworkMonitor` service. + /// + /// Returns the details about a probe. You'll need both the monitorName and probeId. + /// + /// - Parameter GetProbeInput : [no documentation found] + /// + /// - Returns: `GetProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func getProbe(input: GetProbeInput) async throws -> GetProbeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getProbe") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "getProbe") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetProbeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `ListMonitors` operation on the `NetworkMonitor` service. + /// + /// Returns a list of all of your monitors. + /// + /// - Parameter ListMonitorsInput : [no documentation found] + /// + /// - Returns: `ListMonitorsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func listMonitors(input: ListMonitorsInput) async throws -> ListMonitorsOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listMonitors") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "listMonitors") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMonitorsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `ListTagsForResource` operation on the `NetworkMonitor` service. + /// + /// Lists the tags assigned to this resource. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listTagsForResource") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "listTagsForResource") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `TagResource` operation on the `NetworkMonitor` service. + /// + /// Adds key-value pairs to a monitor or probe. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "tagResource") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "tagResource") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `UntagResource` operation on the `NetworkMonitor` service. + /// + /// Removes a key-value pair from a monitor or probe. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "untagResource") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "untagResource") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `UpdateMonitor` operation on the `NetworkMonitor` service. + /// + /// Updates the aggregationPeriod for a monitor. Monitors support an aggregationPeriod of either 30 or 60 seconds. + /// + /// - Parameter UpdateMonitorInput : [no documentation found] + /// + /// - Returns: `UpdateMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func updateMonitor(input: UpdateMonitorInput) async throws -> UpdateMonitorOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .patch) + .withServiceName(value: serviceName) + .withOperation(value: "updateMonitor") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "updateMonitor") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateMonitorOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `UpdateProbe` operation on the `NetworkMonitor` service. + /// + /// Updates a monitor probe. This action requires both the monitorName and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor to get a list of probes and probe IDs. + /// + /// - Parameter UpdateProbeInput : [no documentation found] + /// + /// - Returns: `UpdateProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + public func updateProbe(input: UpdateProbeInput) async throws -> UpdateProbeOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .patch) + .withServiceName(value: serviceName) + .withOperation(value: "updateProbe") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "networkmonitor") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "updateProbe") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateProbeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + +} diff --git a/Sources/Services/AWSNetworkMonitor/NetworkMonitorClientProtocol.swift b/Sources/Services/AWSNetworkMonitor/NetworkMonitorClientProtocol.swift new file mode 100644 index 00000000000..4d965bade22 --- /dev/null +++ b/Sources/Services/AWSNetworkMonitor/NetworkMonitorClientProtocol.swift @@ -0,0 +1,220 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import ClientRuntime + +/// Amazon CloudWatch Network Monitor is an Amazon Web Services active network monitoring service that identifies if a network issues exists within the Amazon Web Services network or your own company network. Within Network Monitor you'll choose the source VPCs and subnets from the Amazon Web Services network in which you operate and then you'll choose the destination IP addresses from your on-premises network. From these sources and destinations, Network Monitor creates a monitor containing all the possible source and destination combinations, each of which is called a probe, within a single monitor. These probes then monitor network traffic to help you identify where network issues might be affecting your traffic. For more information, see [Using Amazon CloudWatch Network Monitor](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/what-is-network-monitor.html) in the Amazon CloudWatch User Guide. +public protocol NetworkMonitorClientProtocol { + /// Performs the `CreateMonitor` operation on the `NetworkMonitor` service. + /// + /// Creates a monitor between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch. + /// + /// - Parameter CreateMonitorInput : [no documentation found] + /// + /// - Returns: `CreateMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func createMonitor(input: CreateMonitorInput) async throws -> CreateMonitorOutput + /// Performs the `CreateProbe` operation on the `NetworkMonitor` service. + /// + /// Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. + /// + /// - Parameter CreateProbeInput : [no documentation found] + /// + /// - Returns: `CreateProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func createProbe(input: CreateProbeInput) async throws -> CreateProbeOutput + /// Performs the `DeleteMonitor` operation on the `NetworkMonitor` service. + /// + /// Deletes a specified monitor. + /// + /// - Parameter DeleteMonitorInput : [no documentation found] + /// + /// - Returns: `DeleteMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func deleteMonitor(input: DeleteMonitorInput) async throws -> DeleteMonitorOutput + /// Performs the `DeleteProbe` operation on the `NetworkMonitor` service. + /// + /// Deletes the specified monitor. Once a probe is deleted you'll no longer incur any billing fees for that probe. + /// + /// - Parameter DeleteProbeInput : [no documentation found] + /// + /// - Returns: `DeleteProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func deleteProbe(input: DeleteProbeInput) async throws -> DeleteProbeOutput + /// Performs the `GetMonitor` operation on the `NetworkMonitor` service. + /// + /// Returns details about a specific monitor. + /// + /// - Parameter GetMonitorInput : [no documentation found] + /// + /// - Returns: `GetMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func getMonitor(input: GetMonitorInput) async throws -> GetMonitorOutput + /// Performs the `GetProbe` operation on the `NetworkMonitor` service. + /// + /// Returns the details about a probe. You'll need both the monitorName and probeId. + /// + /// - Parameter GetProbeInput : [no documentation found] + /// + /// - Returns: `GetProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func getProbe(input: GetProbeInput) async throws -> GetProbeOutput + /// Performs the `ListMonitors` operation on the `NetworkMonitor` service. + /// + /// Returns a list of all of your monitors. + /// + /// - Parameter ListMonitorsInput : [no documentation found] + /// + /// - Returns: `ListMonitorsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func listMonitors(input: ListMonitorsInput) async throws -> ListMonitorsOutput + /// Performs the `ListTagsForResource` operation on the `NetworkMonitor` service. + /// + /// Lists the tags assigned to this resource. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `TagResource` operation on the `NetworkMonitor` service. + /// + /// Adds key-value pairs to a monitor or probe. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `UntagResource` operation on the `NetworkMonitor` service. + /// + /// Removes a key-value pair from a monitor or probe. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateMonitor` operation on the `NetworkMonitor` service. + /// + /// Updates the aggregationPeriod for a monitor. Monitors support an aggregationPeriod of either 30 or 60 seconds. + /// + /// - Parameter UpdateMonitorInput : [no documentation found] + /// + /// - Returns: `UpdateMonitorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func updateMonitor(input: UpdateMonitorInput) async throws -> UpdateMonitorOutput + /// Performs the `UpdateProbe` operation on the `NetworkMonitor` service. + /// + /// Updates a monitor probe. This action requires both the monitorName and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor to get a list of probes and probe IDs. + /// + /// - Parameter UpdateProbeInput : [no documentation found] + /// + /// - Returns: `UpdateProbeOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have sufficient access to perform this action. + /// - `InternalServerException` : The request processing has failed because of an unknown error, exception or failure. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ThrottlingException` : The request was denied due to request throttling + /// - `ValidationException` : One of the parameters for the request is not valid. + func updateProbe(input: UpdateProbeInput) async throws -> UpdateProbeOutput +} + +public enum NetworkMonitorClientTypes {} diff --git a/Sources/Services/AWSNetworkMonitor/Paginators.swift b/Sources/Services/AWSNetworkMonitor/Paginators.swift new file mode 100644 index 00000000000..0f79619f2fc --- /dev/null +++ b/Sources/Services/AWSNetworkMonitor/Paginators.swift @@ -0,0 +1,5 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + + + + diff --git a/Sources/Services/AWSNetworkMonitor/models/Models.swift b/Sources/Services/AWSNetworkMonitor/models/Models.swift new file mode 100644 index 00000000000..a9a9a3ce163 --- /dev/null +++ b/Sources/Services/AWSNetworkMonitor/models/Models.swift @@ -0,0 +1,2894 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! +import AWSClientRuntime +import ClientRuntime + +extension AccessDeniedException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: AccessDeniedExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// You do not have sufficient access to perform this action. +public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "AccessDeniedException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct AccessDeniedExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension AccessDeniedExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension NetworkMonitorClientTypes { + public enum AddressFamily: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case ipv4 + case ipv6 + case sdkUnknown(Swift.String) + + public static var allCases: [AddressFamily] { + return [ + .ipv4, + .ipv6, + .sdkUnknown("") + ] + } + 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 .ipv4: return "IPV4" + case .ipv6: return "IPV6" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = AddressFamily(rawValue: rawValue) ?? AddressFamily.sdkUnknown(rawValue) + } + } +} + +extension ConflictException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ConflictExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// This operation attempted to create a resource that already exists. +public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ConflictException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ConflictExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ConflictExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension CreateMonitorInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + case clientToken + case monitorName + case probes + case tags + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let aggregationPeriod = self.aggregationPeriod { + try encodeContainer.encode(aggregationPeriod, forKey: .aggregationPeriod) + } + if let clientToken = self.clientToken { + try encodeContainer.encode(clientToken, forKey: .clientToken) + } + if let monitorName = self.monitorName { + try encodeContainer.encode(monitorName, forKey: .monitorName) + } + if let probes = probes { + var probesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .probes) + for createmonitorprobeinput0 in probes { + try probesContainer.encode(createmonitorprobeinput0) + } + } + if let tags = tags { + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + } +} + +extension CreateMonitorInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/monitors" + } +} + +public struct CreateMonitorInput: Swift.Equatable { + /// The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60. + public var aggregationPeriod: Swift.Int? + /// Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request. + public var clientToken: Swift.String? + /// The name identifying the monitor. It can contain only letters, underscores (_), or dashes (-), and can be up to 255 characters. + /// This member is required. + public var monitorName: Swift.String? + /// Displays a list of all of the probes created for a monitor. + public var probes: [NetworkMonitorClientTypes.CreateMonitorProbeInput]? + /// The list of key-value pairs created and assigned to the monitor. + public var tags: [Swift.String:Swift.String]? + + public init( + aggregationPeriod: Swift.Int? = nil, + clientToken: Swift.String? = nil, + monitorName: Swift.String? = nil, + probes: [NetworkMonitorClientTypes.CreateMonitorProbeInput]? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.aggregationPeriod = aggregationPeriod + self.clientToken = clientToken + self.monitorName = monitorName + self.probes = probes + self.tags = tags + } +} + +struct CreateMonitorInputBody: Swift.Equatable { + let monitorName: Swift.String? + let probes: [NetworkMonitorClientTypes.CreateMonitorProbeInput]? + let aggregationPeriod: Swift.Int? + let clientToken: Swift.String? + let tags: [Swift.String:Swift.String]? +} + +extension CreateMonitorInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + case clientToken + case monitorName + case probes + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let monitorNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorName) + monitorName = monitorNameDecoded + let probesContainer = try containerValues.decodeIfPresent([NetworkMonitorClientTypes.CreateMonitorProbeInput?].self, forKey: .probes) + var probesDecoded0:[NetworkMonitorClientTypes.CreateMonitorProbeInput]? = nil + if let probesContainer = probesContainer { + probesDecoded0 = [NetworkMonitorClientTypes.CreateMonitorProbeInput]() + for structure0 in probesContainer { + if let structure0 = structure0 { + probesDecoded0?.append(structure0) + } + } + } + probes = probesDecoded0 + let aggregationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .aggregationPeriod) + aggregationPeriod = aggregationPeriodDecoded + let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) + clientToken = clientTokenDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +extension CreateMonitorOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: CreateMonitorOutputBody = try responseDecoder.decode(responseBody: data) + self.aggregationPeriod = output.aggregationPeriod + self.monitorArn = output.monitorArn + self.monitorName = output.monitorName + self.state = output.state + self.tags = output.tags + } else { + self.aggregationPeriod = nil + self.monitorArn = nil + self.monitorName = nil + self.state = nil + self.tags = nil + } + } +} + +public struct CreateMonitorOutput: Swift.Equatable { + /// The number of seconds that metrics are aggregated by and sent to Amazon CloudWatch. This will be either 30 or 60. + public var aggregationPeriod: Swift.Int? + /// The ARN of the monitor. + /// This member is required. + public var monitorArn: Swift.String? + /// The name of the monitor. + /// This member is required. + public var monitorName: Swift.String? + /// The state of the monitor. + /// This member is required. + public var state: NetworkMonitorClientTypes.MonitorState? + /// The list of key-value pairs assigned to the monitor. + public var tags: [Swift.String:Swift.String]? + + public init( + aggregationPeriod: Swift.Int? = nil, + monitorArn: Swift.String? = nil, + monitorName: Swift.String? = nil, + state: NetworkMonitorClientTypes.MonitorState? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.aggregationPeriod = aggregationPeriod + self.monitorArn = monitorArn + self.monitorName = monitorName + self.state = state + self.tags = tags + } +} + +struct CreateMonitorOutputBody: Swift.Equatable { + let monitorArn: Swift.String? + let monitorName: Swift.String? + let state: NetworkMonitorClientTypes.MonitorState? + let aggregationPeriod: Swift.Int? + let tags: [Swift.String:Swift.String]? +} + +extension CreateMonitorOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + case monitorArn + case monitorName + case state + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let monitorArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorArn) + monitorArn = monitorArnDecoded + let monitorNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorName) + monitorName = monitorNameDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.MonitorState.self, forKey: .state) + state = stateDecoded + let aggregationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .aggregationPeriod) + aggregationPeriod = aggregationPeriodDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +enum CreateMonitorOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension NetworkMonitorClientTypes.CreateMonitorProbeInput: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case destination + case destinationPort + case packetSize + case probeTags + case `protocol` = "protocol" + case sourceArn + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let destination = self.destination { + try encodeContainer.encode(destination, forKey: .destination) + } + if let destinationPort = self.destinationPort { + try encodeContainer.encode(destinationPort, forKey: .destinationPort) + } + if let packetSize = self.packetSize { + try encodeContainer.encode(packetSize, forKey: .packetSize) + } + if let probeTags = probeTags { + var probeTagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .probeTags) + for (dictKey0, tagMap0) in probeTags { + try probeTagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + if let `protocol` = self.`protocol` { + try encodeContainer.encode(`protocol`.rawValue, forKey: .`protocol`) + } + if let sourceArn = self.sourceArn { + try encodeContainer.encode(sourceArn, forKey: .sourceArn) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) + sourceArn = sourceArnDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + let probeTagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .probeTags) + var probeTagsDecoded0: [Swift.String:Swift.String]? = nil + if let probeTagsContainer = probeTagsContainer { + probeTagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in probeTagsContainer { + if let tagvalue0 = tagvalue0 { + probeTagsDecoded0?[key0] = tagvalue0 + } + } + } + probeTags = probeTagsDecoded0 + } +} + +extension NetworkMonitorClientTypes { + /// Creates a monitor probe. + public struct CreateMonitorProbeInput: Swift.Equatable { + /// The destination IP address. This will be either IPV4 or IPV6. + /// This member is required. + public var destination: Swift.String? + /// The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The size of the packets sent between the source and destination. This will be a number between 56 and 8500. + public var packetSize: Swift.Int? + /// The list of key-value pairs created and assigned to the monitor. + public var probeTags: [Swift.String:Swift.String]? + /// The protocol used for the network traffic between the source and destination. This will be either TCP or ICMP. + /// This member is required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The ARN of the subnet. + /// This member is required. + public var sourceArn: Swift.String? + + public init( + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + packetSize: Swift.Int? = nil, + probeTags: [Swift.String:Swift.String]? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + sourceArn: Swift.String? = nil + ) + { + self.destination = destination + self.destinationPort = destinationPort + self.packetSize = packetSize + self.probeTags = probeTags + self.`protocol` = `protocol` + self.sourceArn = sourceArn + } + } + +} + +extension CreateProbeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientToken + case probe + case tags + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let clientToken = self.clientToken { + try encodeContainer.encode(clientToken, forKey: .clientToken) + } + if let probe = self.probe { + try encodeContainer.encode(probe, forKey: .probe) + } + if let tags = tags { + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + } +} + +extension CreateProbeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())/probes" + } +} + +public struct CreateProbeInput: Swift.Equatable { + /// Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request. + public var clientToken: Swift.String? + /// The name of the monitor to associated with the probe. To get a list of available monitors, use ListMonitors. + /// This member is required. + public var monitorName: Swift.String? + /// Describes the details of an individual probe for a monitor. + /// This member is required. + public var probe: NetworkMonitorClientTypes.ProbeInput? + /// The list of key-value pairs created and assigned to the probe. + public var tags: [Swift.String:Swift.String]? + + public init( + clientToken: Swift.String? = nil, + monitorName: Swift.String? = nil, + probe: NetworkMonitorClientTypes.ProbeInput? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.clientToken = clientToken + self.monitorName = monitorName + self.probe = probe + self.tags = tags + } +} + +struct CreateProbeInputBody: Swift.Equatable { + let probe: NetworkMonitorClientTypes.ProbeInput? + let clientToken: Swift.String? + let tags: [Swift.String:Swift.String]? +} + +extension CreateProbeInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientToken + case probe + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let probeDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ProbeInput.self, forKey: .probe) + probe = probeDecoded + let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) + clientToken = clientTokenDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +extension CreateProbeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: CreateProbeOutputBody = try responseDecoder.decode(responseBody: data) + self.`protocol` = output.`protocol` + self.addressFamily = output.addressFamily + self.createdAt = output.createdAt + self.destination = output.destination + self.destinationPort = output.destinationPort + self.modifiedAt = output.modifiedAt + self.packetSize = output.packetSize + self.probeArn = output.probeArn + self.probeId = output.probeId + self.sourceArn = output.sourceArn + self.state = output.state + self.tags = output.tags + self.vpcId = output.vpcId + } else { + self.addressFamily = nil + self.createdAt = nil + self.destination = nil + self.destinationPort = nil + self.modifiedAt = nil + self.packetSize = nil + self.probeArn = nil + self.probeId = nil + self.`protocol` = nil + self.sourceArn = nil + self.state = nil + self.tags = nil + self.vpcId = nil + } + } +} + +public struct CreateProbeOutput: Swift.Equatable { + /// Indicates whether the IP address is IPV4 or IPV6. + public var addressFamily: NetworkMonitorClientTypes.AddressFamily? + /// The time and date that the probe was created. + public var createdAt: ClientRuntime.Date? + /// The destination IP address for the monitor. This will be either an IPv4 or IPv6 address. + /// This member is required. + public var destination: Swift.String? + /// The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The time and date when the probe was last modified. + public var modifiedAt: ClientRuntime.Date? + /// The size of the packets sent between the source and destination. This will be a number between 56 and 8500. + public var packetSize: Swift.Int? + /// The ARN of the probe. + public var probeArn: Swift.String? + /// The ID of the probe for which details are returned. + public var probeId: Swift.String? + /// The protocol used for the network traffic between the source and destination. This will be either TCP or ICMP. + /// This member is required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The ARN of the probe. + /// This member is required. + public var sourceArn: Swift.String? + /// The state of the probe. + public var state: NetworkMonitorClientTypes.ProbeState? + /// The list of key-value pairs assigned to the probe. + public var tags: [Swift.String:Swift.String]? + /// The ID of the source VPC or subnet. + public var vpcId: Swift.String? + + public init( + addressFamily: NetworkMonitorClientTypes.AddressFamily? = nil, + createdAt: ClientRuntime.Date? = nil, + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + modifiedAt: ClientRuntime.Date? = nil, + packetSize: Swift.Int? = nil, + probeArn: Swift.String? = nil, + probeId: Swift.String? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + sourceArn: Swift.String? = nil, + state: NetworkMonitorClientTypes.ProbeState? = nil, + tags: [Swift.String:Swift.String]? = nil, + vpcId: Swift.String? = nil + ) + { + self.addressFamily = addressFamily + self.createdAt = createdAt + self.destination = destination + self.destinationPort = destinationPort + self.modifiedAt = modifiedAt + self.packetSize = packetSize + self.probeArn = probeArn + self.probeId = probeId + self.`protocol` = `protocol` + self.sourceArn = sourceArn + self.state = state + self.tags = tags + self.vpcId = vpcId + } +} + +struct CreateProbeOutputBody: Swift.Equatable { + let probeId: Swift.String? + let probeArn: Swift.String? + let sourceArn: Swift.String? + let destination: Swift.String? + let destinationPort: Swift.Int? + let `protocol`: NetworkMonitorClientTypes.ModelProtocol? + let packetSize: Swift.Int? + let addressFamily: NetworkMonitorClientTypes.AddressFamily? + let vpcId: Swift.String? + let state: NetworkMonitorClientTypes.ProbeState? + let createdAt: ClientRuntime.Date? + let modifiedAt: ClientRuntime.Date? + let tags: [Swift.String:Swift.String]? +} + +extension CreateProbeOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case addressFamily + case createdAt + case destination + case destinationPort + case modifiedAt + case packetSize + case probeArn + case probeId + case `protocol` = "protocol" + case sourceArn + case state + case tags + case vpcId + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let probeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeId) + probeId = probeIdDecoded + let probeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeArn) + probeArn = probeArnDecoded + let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) + sourceArn = sourceArnDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + let addressFamilyDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.AddressFamily.self, forKey: .addressFamily) + addressFamily = addressFamilyDecoded + let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) + vpcId = vpcIdDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ProbeState.self, forKey: .state) + state = stateDecoded + let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .createdAt) + createdAt = createdAtDecoded + let modifiedAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .modifiedAt) + modifiedAt = modifiedAtDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +enum CreateProbeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension DeleteMonitorInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())" + } +} + +public struct DeleteMonitorInput: Swift.Equatable { + /// The name of the monitor to delete. Use the ListMonitors action to get a list of your current monitors. + /// This member is required. + public var monitorName: Swift.String? + + public init( + monitorName: Swift.String? = nil + ) + { + self.monitorName = monitorName + } +} + +struct DeleteMonitorInputBody: Swift.Equatable { +} + +extension DeleteMonitorInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DeleteMonitorOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct DeleteMonitorOutput: Swift.Equatable { + + public init() { } +} + +enum DeleteMonitorOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension DeleteProbeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + guard let probeId = probeId else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())/probes/\(probeId.urlPercentEncoding())" + } +} + +public struct DeleteProbeInput: Swift.Equatable { + /// The name of the monitor to delete. For a list of the available monitors, use the ListMonitors action. + /// This member is required. + public var monitorName: Swift.String? + /// The ID of the probe to delete. Run GetMonitor to get a lst of all probes and probe IDs associated with the monitor. + /// This member is required. + public var probeId: Swift.String? + + public init( + monitorName: Swift.String? = nil, + probeId: Swift.String? = nil + ) + { + self.monitorName = monitorName + self.probeId = probeId + } +} + +struct DeleteProbeInputBody: Swift.Equatable { +} + +extension DeleteProbeInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension DeleteProbeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct DeleteProbeOutput: Swift.Equatable { + + public init() { } +} + +enum DeleteProbeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension GetMonitorInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())" + } +} + +public struct GetMonitorInput: Swift.Equatable { + /// The name of the monitor that details are returned for. + /// This member is required. + public var monitorName: Swift.String? + + public init( + monitorName: Swift.String? = nil + ) + { + self.monitorName = monitorName + } +} + +struct GetMonitorInputBody: Swift.Equatable { +} + +extension GetMonitorInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension GetMonitorOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: GetMonitorOutputBody = try responseDecoder.decode(responseBody: data) + self.aggregationPeriod = output.aggregationPeriod + self.createdAt = output.createdAt + self.modifiedAt = output.modifiedAt + self.monitorArn = output.monitorArn + self.monitorName = output.monitorName + self.probes = output.probes + self.state = output.state + self.tags = output.tags + } else { + self.aggregationPeriod = nil + self.createdAt = nil + self.modifiedAt = nil + self.monitorArn = nil + self.monitorName = nil + self.probes = nil + self.state = nil + self.tags = nil + } + } +} + +public struct GetMonitorOutput: Swift.Equatable { + /// The aggregation period for the specified monitor. + /// This member is required. + public var aggregationPeriod: Swift.Int? + /// The time and date when the monitor was created. + /// This member is required. + public var createdAt: ClientRuntime.Date? + /// The time and date when the monitor was last modified. + /// This member is required. + public var modifiedAt: ClientRuntime.Date? + /// The ARN of the selected monitor. + /// This member is required. + public var monitorArn: Swift.String? + /// The name of the monitor. To get a list of the current monitors and their names, use the ListMonitors action. + /// This member is required. + public var monitorName: Swift.String? + /// The details about each probe associated with that monitor. + public var probes: [NetworkMonitorClientTypes.Probe]? + /// Returns a list of the state of each monitor. + /// This member is required. + public var state: NetworkMonitorClientTypes.MonitorState? + /// The list of key-value pairs assigned to the monitor. + public var tags: [Swift.String:Swift.String]? + + public init( + aggregationPeriod: Swift.Int? = nil, + createdAt: ClientRuntime.Date? = nil, + modifiedAt: ClientRuntime.Date? = nil, + monitorArn: Swift.String? = nil, + monitorName: Swift.String? = nil, + probes: [NetworkMonitorClientTypes.Probe]? = nil, + state: NetworkMonitorClientTypes.MonitorState? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.aggregationPeriod = aggregationPeriod + self.createdAt = createdAt + self.modifiedAt = modifiedAt + self.monitorArn = monitorArn + self.monitorName = monitorName + self.probes = probes + self.state = state + self.tags = tags + } +} + +struct GetMonitorOutputBody: Swift.Equatable { + let monitorArn: Swift.String? + let monitorName: Swift.String? + let state: NetworkMonitorClientTypes.MonitorState? + let aggregationPeriod: Swift.Int? + let tags: [Swift.String:Swift.String]? + let probes: [NetworkMonitorClientTypes.Probe]? + let createdAt: ClientRuntime.Date? + let modifiedAt: ClientRuntime.Date? +} + +extension GetMonitorOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + case createdAt + case modifiedAt + case monitorArn + case monitorName + case probes + case state + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let monitorArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorArn) + monitorArn = monitorArnDecoded + let monitorNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorName) + monitorName = monitorNameDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.MonitorState.self, forKey: .state) + state = stateDecoded + let aggregationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .aggregationPeriod) + aggregationPeriod = aggregationPeriodDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + let probesContainer = try containerValues.decodeIfPresent([NetworkMonitorClientTypes.Probe?].self, forKey: .probes) + var probesDecoded0:[NetworkMonitorClientTypes.Probe]? = nil + if let probesContainer = probesContainer { + probesDecoded0 = [NetworkMonitorClientTypes.Probe]() + for structure0 in probesContainer { + if let structure0 = structure0 { + probesDecoded0?.append(structure0) + } + } + } + probes = probesDecoded0 + let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .createdAt) + createdAt = createdAtDecoded + let modifiedAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .modifiedAt) + modifiedAt = modifiedAtDecoded + } +} + +enum GetMonitorOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension GetProbeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + guard let probeId = probeId else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())/probes/\(probeId.urlPercentEncoding())" + } +} + +public struct GetProbeInput: Swift.Equatable { + /// The name of the monitor associated with the probe. Run ListMonitors to get a list of monitor names. + /// This member is required. + public var monitorName: Swift.String? + /// The ID of the probe to get information about. Run GetMonitor action to get a list of probes and probe IDs for the monitor. + /// This member is required. + public var probeId: Swift.String? + + public init( + monitorName: Swift.String? = nil, + probeId: Swift.String? = nil + ) + { + self.monitorName = monitorName + self.probeId = probeId + } +} + +struct GetProbeInputBody: Swift.Equatable { +} + +extension GetProbeInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension GetProbeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: GetProbeOutputBody = try responseDecoder.decode(responseBody: data) + self.`protocol` = output.`protocol` + self.addressFamily = output.addressFamily + self.createdAt = output.createdAt + self.destination = output.destination + self.destinationPort = output.destinationPort + self.modifiedAt = output.modifiedAt + self.packetSize = output.packetSize + self.probeArn = output.probeArn + self.probeId = output.probeId + self.sourceArn = output.sourceArn + self.state = output.state + self.tags = output.tags + self.vpcId = output.vpcId + } else { + self.addressFamily = nil + self.createdAt = nil + self.destination = nil + self.destinationPort = nil + self.modifiedAt = nil + self.packetSize = nil + self.probeArn = nil + self.probeId = nil + self.`protocol` = nil + self.sourceArn = nil + self.state = nil + self.tags = nil + self.vpcId = nil + } + } +} + +public struct GetProbeOutput: Swift.Equatable { + /// Indicates whether the IP address is IPV4 or IPV6. + public var addressFamily: NetworkMonitorClientTypes.AddressFamily? + /// The time and date that the probe was created. + public var createdAt: ClientRuntime.Date? + /// The destination IP address for the monitor. This will be either an IPv4 or IPv6 address. + /// This member is required. + public var destination: Swift.String? + /// The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The time and date that the probe was last modified. + public var modifiedAt: ClientRuntime.Date? + /// The size of the packets sent between the source and destination. This will be a number between 56 and 8500. + public var packetSize: Swift.Int? + /// The ARN of the probe. + public var probeArn: Swift.String? + /// The ID of the probe for which details are returned. + public var probeId: Swift.String? + /// The protocol used for the network traffic between the source and destination. This will be either TCP or ICMP. + /// This member is required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The ARN of the probe. + /// This member is required. + public var sourceArn: Swift.String? + /// The state of the probe. + public var state: NetworkMonitorClientTypes.ProbeState? + /// The list of key-value pairs assigned to the probe. + public var tags: [Swift.String:Swift.String]? + /// The ID of the source VPC or subnet. + public var vpcId: Swift.String? + + public init( + addressFamily: NetworkMonitorClientTypes.AddressFamily? = nil, + createdAt: ClientRuntime.Date? = nil, + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + modifiedAt: ClientRuntime.Date? = nil, + packetSize: Swift.Int? = nil, + probeArn: Swift.String? = nil, + probeId: Swift.String? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + sourceArn: Swift.String? = nil, + state: NetworkMonitorClientTypes.ProbeState? = nil, + tags: [Swift.String:Swift.String]? = nil, + vpcId: Swift.String? = nil + ) + { + self.addressFamily = addressFamily + self.createdAt = createdAt + self.destination = destination + self.destinationPort = destinationPort + self.modifiedAt = modifiedAt + self.packetSize = packetSize + self.probeArn = probeArn + self.probeId = probeId + self.`protocol` = `protocol` + self.sourceArn = sourceArn + self.state = state + self.tags = tags + self.vpcId = vpcId + } +} + +struct GetProbeOutputBody: Swift.Equatable { + let probeId: Swift.String? + let probeArn: Swift.String? + let sourceArn: Swift.String? + let destination: Swift.String? + let destinationPort: Swift.Int? + let `protocol`: NetworkMonitorClientTypes.ModelProtocol? + let packetSize: Swift.Int? + let addressFamily: NetworkMonitorClientTypes.AddressFamily? + let vpcId: Swift.String? + let state: NetworkMonitorClientTypes.ProbeState? + let createdAt: ClientRuntime.Date? + let modifiedAt: ClientRuntime.Date? + let tags: [Swift.String:Swift.String]? +} + +extension GetProbeOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case addressFamily + case createdAt + case destination + case destinationPort + case modifiedAt + case packetSize + case probeArn + case probeId + case `protocol` = "protocol" + case sourceArn + case state + case tags + case vpcId + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let probeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeId) + probeId = probeIdDecoded + let probeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeArn) + probeArn = probeArnDecoded + let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) + sourceArn = sourceArnDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + let addressFamilyDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.AddressFamily.self, forKey: .addressFamily) + addressFamily = addressFamilyDecoded + let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) + vpcId = vpcIdDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ProbeState.self, forKey: .state) + state = stateDecoded + let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .createdAt) + createdAt = createdAtDecoded + let modifiedAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .modifiedAt) + modifiedAt = modifiedAtDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +enum GetProbeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension InternalServerException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InternalServerExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The request processing has failed because of an unknown error, exception or failure. +public struct InternalServerException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InternalServerException" } + public static var fault: ErrorFault { .server } + public static var isRetryable: Swift.Bool { true } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InternalServerExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension InternalServerExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension ListMonitorsInput: ClientRuntime.QueryItemProvider { + public var queryItems: [ClientRuntime.URLQueryItem] { + get throws { + var items = [ClientRuntime.URLQueryItem]() + if let nextToken = nextToken { + let nextTokenQueryItem = ClientRuntime.URLQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = maxResults { + let maxResultsQueryItem = ClientRuntime.URLQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + if let state = state { + let stateQueryItem = ClientRuntime.URLQueryItem(name: "state".urlPercentEncoding(), value: Swift.String(state).urlPercentEncoding()) + items.append(stateQueryItem) + } + return items + } + } +} + +extension ListMonitorsInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/monitors" + } +} + +public struct ListMonitorsInput: Swift.Equatable { + /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If MaxResults is given a value larger than 100, only 100 results are returned. + public var maxResults: Swift.Int? + /// The token for the next page of results. + public var nextToken: Swift.String? + /// The list of all monitors and their states. + public var state: Swift.String? + + public init( + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + state: Swift.String? = nil + ) + { + self.maxResults = maxResults + self.nextToken = nextToken + self.state = state + } +} + +struct ListMonitorsInputBody: Swift.Equatable { +} + +extension ListMonitorsInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension ListMonitorsOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ListMonitorsOutputBody = try responseDecoder.decode(responseBody: data) + self.monitors = output.monitors + self.nextToken = output.nextToken + } else { + self.monitors = nil + self.nextToken = nil + } + } +} + +public struct ListMonitorsOutput: Swift.Equatable { + /// Lists individual details about each of your monitors. + /// This member is required. + public var monitors: [NetworkMonitorClientTypes.MonitorSummary]? + /// The token for the next page of results. + public var nextToken: Swift.String? + + public init( + monitors: [NetworkMonitorClientTypes.MonitorSummary]? = nil, + nextToken: Swift.String? = nil + ) + { + self.monitors = monitors + self.nextToken = nextToken + } +} + +struct ListMonitorsOutputBody: Swift.Equatable { + let monitors: [NetworkMonitorClientTypes.MonitorSummary]? + let nextToken: Swift.String? +} + +extension ListMonitorsOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case monitors + case nextToken + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let monitorsContainer = try containerValues.decodeIfPresent([NetworkMonitorClientTypes.MonitorSummary?].self, forKey: .monitors) + var monitorsDecoded0:[NetworkMonitorClientTypes.MonitorSummary]? = nil + if let monitorsContainer = monitorsContainer { + monitorsDecoded0 = [NetworkMonitorClientTypes.MonitorSummary]() + for structure0 in monitorsContainer { + if let structure0 = structure0 { + monitorsDecoded0?.append(structure0) + } + } + } + monitors = monitorsDecoded0 + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded + } +} + +enum ListMonitorsOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension ListTagsForResourceInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let resourceArn = resourceArn else { + return nil + } + return "/tags/\(resourceArn.urlPercentEncoding())" + } +} + +public struct ListTagsForResourceInput: Swift.Equatable { + /// The + /// This member is required. + public var resourceArn: Swift.String? + + public init( + resourceArn: Swift.String? = nil + ) + { + self.resourceArn = resourceArn + } +} + +struct ListTagsForResourceInputBody: Swift.Equatable { +} + +extension ListTagsForResourceInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) + self.tags = output.tags + } else { + self.tags = nil + } + } +} + +public struct ListTagsForResourceOutput: Swift.Equatable { + /// Lists the tags assigned to the resource. + public var tags: [Swift.String:Swift.String]? + + public init( + tags: [Swift.String:Swift.String]? = nil + ) + { + self.tags = tags + } +} + +struct ListTagsForResourceOutputBody: Swift.Equatable { + let tags: [Swift.String:Swift.String]? +} + +extension ListTagsForResourceOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension NetworkMonitorClientTypes { + public enum MonitorState: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case active + case deleting + case error + case inactive + case pending + case sdkUnknown(Swift.String) + + public static var allCases: [MonitorState] { + return [ + .active, + .deleting, + .error, + .inactive, + .pending, + .sdkUnknown("") + ] + } + 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 .deleting: return "DELETING" + case .error: return "ERROR" + case .inactive: return "INACTIVE" + case .pending: return "PENDING" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = MonitorState(rawValue: rawValue) ?? MonitorState.sdkUnknown(rawValue) + } + } +} + +extension NetworkMonitorClientTypes.MonitorSummary: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + case monitorArn + case monitorName + case state + case tags + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let aggregationPeriod = self.aggregationPeriod { + try encodeContainer.encode(aggregationPeriod, forKey: .aggregationPeriod) + } + if let monitorArn = self.monitorArn { + try encodeContainer.encode(monitorArn, forKey: .monitorArn) + } + if let monitorName = self.monitorName { + try encodeContainer.encode(monitorName, forKey: .monitorName) + } + if let state = self.state { + try encodeContainer.encode(state.rawValue, forKey: .state) + } + if let tags = tags { + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let monitorArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorArn) + monitorArn = monitorArnDecoded + let monitorNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorName) + monitorName = monitorNameDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.MonitorState.self, forKey: .state) + state = stateDecoded + let aggregationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .aggregationPeriod) + aggregationPeriod = aggregationPeriodDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +extension NetworkMonitorClientTypes { + /// Displays summary information about a monitor. + public struct MonitorSummary: Swift.Equatable { + /// The time, in seconds, that metrics are collected and sent to Amazon CloudWatch. Valid values are either 30 or 60. + public var aggregationPeriod: Swift.Int? + /// The ARN of the monitor. + /// This member is required. + public var monitorArn: Swift.String? + /// The name of the monitor. + /// This member is required. + public var monitorName: Swift.String? + /// The state of the monitor. + /// This member is required. + public var state: NetworkMonitorClientTypes.MonitorState? + /// The list of key-value pairs assigned to the monitor. + public var tags: [Swift.String:Swift.String]? + + public init( + aggregationPeriod: Swift.Int? = nil, + monitorArn: Swift.String? = nil, + monitorName: Swift.String? = nil, + state: NetworkMonitorClientTypes.MonitorState? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.aggregationPeriod = aggregationPeriod + self.monitorArn = monitorArn + self.monitorName = monitorName + self.state = state + self.tags = tags + } + } + +} + +extension NetworkMonitorClientTypes.Probe: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case addressFamily + case createdAt + case destination + case destinationPort + case modifiedAt + case packetSize + case probeArn + case probeId + case `protocol` = "protocol" + case sourceArn + case state + case tags + case vpcId + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let addressFamily = self.addressFamily { + try encodeContainer.encode(addressFamily.rawValue, forKey: .addressFamily) + } + if let createdAt = self.createdAt { + try encodeContainer.encodeTimestamp(createdAt, format: .epochSeconds, forKey: .createdAt) + } + if let destination = self.destination { + try encodeContainer.encode(destination, forKey: .destination) + } + if let destinationPort = self.destinationPort { + try encodeContainer.encode(destinationPort, forKey: .destinationPort) + } + if let modifiedAt = self.modifiedAt { + try encodeContainer.encodeTimestamp(modifiedAt, format: .epochSeconds, forKey: .modifiedAt) + } + if let packetSize = self.packetSize { + try encodeContainer.encode(packetSize, forKey: .packetSize) + } + if let probeArn = self.probeArn { + try encodeContainer.encode(probeArn, forKey: .probeArn) + } + if let probeId = self.probeId { + try encodeContainer.encode(probeId, forKey: .probeId) + } + if let `protocol` = self.`protocol` { + try encodeContainer.encode(`protocol`.rawValue, forKey: .`protocol`) + } + if let sourceArn = self.sourceArn { + try encodeContainer.encode(sourceArn, forKey: .sourceArn) + } + if let state = self.state { + try encodeContainer.encode(state.rawValue, forKey: .state) + } + if let tags = tags { + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + if let vpcId = self.vpcId { + try encodeContainer.encode(vpcId, forKey: .vpcId) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let probeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeId) + probeId = probeIdDecoded + let probeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeArn) + probeArn = probeArnDecoded + let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) + sourceArn = sourceArnDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + let addressFamilyDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.AddressFamily.self, forKey: .addressFamily) + addressFamily = addressFamilyDecoded + let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) + vpcId = vpcIdDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ProbeState.self, forKey: .state) + state = stateDecoded + let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .createdAt) + createdAt = createdAtDecoded + let modifiedAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .modifiedAt) + modifiedAt = modifiedAtDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +extension NetworkMonitorClientTypes { + /// Describes information about a monitor probe. + public struct Probe: Swift.Equatable { + /// The IPv4 or IPv6 address for the probe. + public var addressFamily: NetworkMonitorClientTypes.AddressFamily? + /// The time and date the probe was created. + public var createdAt: ClientRuntime.Date? + /// The destination for the probe. This should be either an IPV4 or IPV6. + /// This member is required. + public var destination: Swift.String? + /// The destination port for the probe. This is required only if the protocol is TCP and must be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The time and date that the probe was last modified. + public var modifiedAt: ClientRuntime.Date? + /// The size of the packets traveling between the source and destination. This must be a number between 56 and + public var packetSize: Swift.Int? + /// The ARN of the probe. + public var probeArn: Swift.String? + /// The ID of the probe. + public var probeId: Swift.String? + /// The network protocol for the destination. This can be either TCP or ICMP. If the protocol is TCP, then port is also required. + /// This member is required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The ARN of the probe source subnet. + /// This member is required. + public var sourceArn: Swift.String? + /// The state of the probe. + public var state: NetworkMonitorClientTypes.ProbeState? + /// The list of key-value pairs created and assigned to the probe. + public var tags: [Swift.String:Swift.String]? + /// The ID of the source VPC subnet. + public var vpcId: Swift.String? + + public init( + addressFamily: NetworkMonitorClientTypes.AddressFamily? = nil, + createdAt: ClientRuntime.Date? = nil, + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + modifiedAt: ClientRuntime.Date? = nil, + packetSize: Swift.Int? = nil, + probeArn: Swift.String? = nil, + probeId: Swift.String? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + sourceArn: Swift.String? = nil, + state: NetworkMonitorClientTypes.ProbeState? = nil, + tags: [Swift.String:Swift.String]? = nil, + vpcId: Swift.String? = nil + ) + { + self.addressFamily = addressFamily + self.createdAt = createdAt + self.destination = destination + self.destinationPort = destinationPort + self.modifiedAt = modifiedAt + self.packetSize = packetSize + self.probeArn = probeArn + self.probeId = probeId + self.`protocol` = `protocol` + self.sourceArn = sourceArn + self.state = state + self.tags = tags + self.vpcId = vpcId + } + } + +} + +extension NetworkMonitorClientTypes.ProbeInput: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case destination + case destinationPort + case packetSize + case `protocol` = "protocol" + case sourceArn + case tags + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let destination = self.destination { + try encodeContainer.encode(destination, forKey: .destination) + } + if let destinationPort = self.destinationPort { + try encodeContainer.encode(destinationPort, forKey: .destinationPort) + } + if let packetSize = self.packetSize { + try encodeContainer.encode(packetSize, forKey: .packetSize) + } + if let `protocol` = self.`protocol` { + try encodeContainer.encode(`protocol`.rawValue, forKey: .`protocol`) + } + if let sourceArn = self.sourceArn { + try encodeContainer.encode(sourceArn, forKey: .sourceArn) + } + if let tags = tags { + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) + sourceArn = sourceArnDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +extension NetworkMonitorClientTypes { + /// Defines a probe when creating a probe or monitor. + public struct ProbeInput: Swift.Equatable { + /// The destination IP address. This will be either IPV4 or IPV6. + /// This member is required. + public var destination: Swift.String? + /// The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The size of the packets sent between the source and destination. This will be a number between 56 and 8500. + public var packetSize: Swift.Int? + /// The protocol used for the network traffic between the source and destination. This will be either TCP or ICMP. + /// This member is required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The ARN of the subnet. + /// This member is required. + public var sourceArn: Swift.String? + /// The list of key-value pairs created and assigned to the monitor. + public var tags: [Swift.String:Swift.String]? + + public init( + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + packetSize: Swift.Int? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + sourceArn: Swift.String? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.destination = destination + self.destinationPort = destinationPort + self.packetSize = packetSize + self.`protocol` = `protocol` + self.sourceArn = sourceArn + self.tags = tags + } + } + +} + +extension NetworkMonitorClientTypes { + public enum ProbeState: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case active + case deleted + case deleting + case error + case inactive + case pending + case sdkUnknown(Swift.String) + + public static var allCases: [ProbeState] { + return [ + .active, + .deleted, + .deleting, + .error, + .inactive, + .pending, + .sdkUnknown("") + ] + } + 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 .deleted: return "DELETED" + case .deleting: return "DELETING" + case .error: return "ERROR" + case .inactive: return "INACTIVE" + case .pending: return "PENDING" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ProbeState(rawValue: rawValue) ?? ProbeState.sdkUnknown(rawValue) + } + } +} + +extension NetworkMonitorClientTypes { + public enum ModelProtocol: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case icmp + case tcp + case sdkUnknown(Swift.String) + + public static var allCases: [ModelProtocol] { + return [ + .icmp, + .tcp, + .sdkUnknown("") + ] + } + 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 .icmp: return "ICMP" + case .tcp: return "TCP" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ModelProtocol(rawValue: rawValue) ?? ModelProtocol.sdkUnknown(rawValue) + } + } +} + +extension ResourceNotFoundException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ResourceNotFoundExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The specified resource does not exist. +public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ResourceNotFoundException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ResourceNotFoundExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ResourceNotFoundExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension ServiceQuotaExceededException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ServiceQuotaExceededExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// This request exceeds a service quota. +public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ServiceQuotaExceededException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ServiceQuotaExceededExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ServiceQuotaExceededExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension TagResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tags + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let tags = tags { + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) + } + } + } +} + +extension TagResourceInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let resourceArn = resourceArn else { + return nil + } + return "/tags/\(resourceArn.urlPercentEncoding())" + } +} + +public struct TagResourceInput: Swift.Equatable { + /// The ARN of the monitor or probe to tag. + /// This member is required. + public var resourceArn: Swift.String? + /// The list of key-value pairs assigned to the monitor or probe. + /// This member is required. + public var tags: [Swift.String:Swift.String]? + + public init( + resourceArn: Swift.String? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.resourceArn = resourceArn + self.tags = tags + } +} + +struct TagResourceInputBody: Swift.Equatable { + let tags: [Swift.String:Swift.String]? +} + +extension TagResourceInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +extension TagResourceOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct TagResourceOutput: Swift.Equatable { + + public init() { } +} + +enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension ThrottlingException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ThrottlingExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The request was denied due to request throttling +public struct ThrottlingException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ThrottlingException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { true } + public static var isThrottling: Swift.Bool { true } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ThrottlingExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ThrottlingExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension UntagResourceInput: ClientRuntime.QueryItemProvider { + public var queryItems: [ClientRuntime.URLQueryItem] { + get throws { + var items = [ClientRuntime.URLQueryItem]() + guard let tagKeys = tagKeys else { + let message = "Creating a URL Query Item failed. tagKeys is required and must not be nil." + throw ClientRuntime.ClientError.unknownError(message) + } + tagKeys.forEach { queryItemValue in + let queryItem = ClientRuntime.URLQueryItem(name: "tagKeys".urlPercentEncoding(), value: Swift.String(queryItemValue).urlPercentEncoding()) + items.append(queryItem) + } + return items + } + } +} + +extension UntagResourceInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let resourceArn = resourceArn else { + return nil + } + return "/tags/\(resourceArn.urlPercentEncoding())" + } +} + +public struct UntagResourceInput: Swift.Equatable { + /// The ARN of the monitor or probe that the tag should be removed from. + /// This member is required. + public var resourceArn: Swift.String? + /// The key-value pa + /// This member is required. + public var tagKeys: [Swift.String]? + + public init( + resourceArn: Swift.String? = nil, + tagKeys: [Swift.String]? = nil + ) + { + self.resourceArn = resourceArn + self.tagKeys = tagKeys + } +} + +struct UntagResourceInputBody: Swift.Equatable { +} + +extension UntagResourceInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension UntagResourceOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + } +} + +public struct UntagResourceOutput: Swift.Equatable { + + public init() { } +} + +enum UntagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension UpdateMonitorInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let aggregationPeriod = self.aggregationPeriod { + try encodeContainer.encode(aggregationPeriod, forKey: .aggregationPeriod) + } + } +} + +extension UpdateMonitorInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())" + } +} + +public struct UpdateMonitorInput: Swift.Equatable { + /// The aggregation time, in seconds, to change to. This must be either 30 or 60. + /// This member is required. + public var aggregationPeriod: Swift.Int? + /// The name of the monitor to update. Run ListMonitors to get a list of monitor names. + /// This member is required. + public var monitorName: Swift.String? + + public init( + aggregationPeriod: Swift.Int? = nil, + monitorName: Swift.String? = nil + ) + { + self.aggregationPeriod = aggregationPeriod + self.monitorName = monitorName + } +} + +struct UpdateMonitorInputBody: Swift.Equatable { + let aggregationPeriod: Swift.Int? +} + +extension UpdateMonitorInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let aggregationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .aggregationPeriod) + aggregationPeriod = aggregationPeriodDecoded + } +} + +extension UpdateMonitorOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: UpdateMonitorOutputBody = try responseDecoder.decode(responseBody: data) + self.aggregationPeriod = output.aggregationPeriod + self.monitorArn = output.monitorArn + self.monitorName = output.monitorName + self.state = output.state + self.tags = output.tags + } else { + self.aggregationPeriod = nil + self.monitorArn = nil + self.monitorName = nil + self.state = nil + self.tags = nil + } + } +} + +public struct UpdateMonitorOutput: Swift.Equatable { + /// The changed aggregation period. + public var aggregationPeriod: Swift.Int? + /// The ARN of the monitor that was updated. + /// This member is required. + public var monitorArn: Swift.String? + /// The name of the monitor that was updated. + /// This member is required. + public var monitorName: Swift.String? + /// The state of the updated monitor. + /// This member is required. + public var state: NetworkMonitorClientTypes.MonitorState? + /// The list of key-value pairs associated with the monitor. + public var tags: [Swift.String:Swift.String]? + + public init( + aggregationPeriod: Swift.Int? = nil, + monitorArn: Swift.String? = nil, + monitorName: Swift.String? = nil, + state: NetworkMonitorClientTypes.MonitorState? = nil, + tags: [Swift.String:Swift.String]? = nil + ) + { + self.aggregationPeriod = aggregationPeriod + self.monitorArn = monitorArn + self.monitorName = monitorName + self.state = state + self.tags = tags + } +} + +struct UpdateMonitorOutputBody: Swift.Equatable { + let monitorArn: Swift.String? + let monitorName: Swift.String? + let state: NetworkMonitorClientTypes.MonitorState? + let aggregationPeriod: Swift.Int? + let tags: [Swift.String:Swift.String]? +} + +extension UpdateMonitorOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aggregationPeriod + case monitorArn + case monitorName + case state + case tags + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let monitorArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorArn) + monitorArn = monitorArnDecoded + let monitorNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitorName) + monitorName = monitorNameDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.MonitorState.self, forKey: .state) + state = stateDecoded + let aggregationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .aggregationPeriod) + aggregationPeriod = aggregationPeriodDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +enum UpdateMonitorOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension UpdateProbeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case destination + case destinationPort + case packetSize + case `protocol` = "protocol" + case state + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let destination = self.destination { + try encodeContainer.encode(destination, forKey: .destination) + } + if let destinationPort = self.destinationPort { + try encodeContainer.encode(destinationPort, forKey: .destinationPort) + } + if let packetSize = self.packetSize { + try encodeContainer.encode(packetSize, forKey: .packetSize) + } + if let `protocol` = self.`protocol` { + try encodeContainer.encode(`protocol`.rawValue, forKey: .`protocol`) + } + if let state = self.state { + try encodeContainer.encode(state.rawValue, forKey: .state) + } + } +} + +extension UpdateProbeInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let monitorName = monitorName else { + return nil + } + guard let probeId = probeId else { + return nil + } + return "/monitors/\(monitorName.urlPercentEncoding())/probes/\(probeId.urlPercentEncoding())" + } +} + +public struct UpdateProbeInput: Swift.Equatable { + /// The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address. + public var destination: Swift.String? + /// The updated port for the probe destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The name of the monitor that the probe was updated for. + /// This member is required. + public var monitorName: Swift.String? + /// he updated packets size for network traffic between the source and destination. This must be a number between 56 and 8500. + public var packetSize: Swift.Int? + /// Run GetMonitor to get a list of probes and probe IDs. + /// This member is required. + public var probeId: Swift.String? + /// The updated network protocol for the destination. This can be either TCP or ICMP. If the protocol is TCP, then port is also required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The state of the probe update. + public var state: NetworkMonitorClientTypes.ProbeState? + + public init( + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + monitorName: Swift.String? = nil, + packetSize: Swift.Int? = nil, + probeId: Swift.String? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + state: NetworkMonitorClientTypes.ProbeState? = nil + ) + { + self.destination = destination + self.destinationPort = destinationPort + self.monitorName = monitorName + self.packetSize = packetSize + self.probeId = probeId + self.`protocol` = `protocol` + self.state = state + } +} + +struct UpdateProbeInputBody: Swift.Equatable { + let state: NetworkMonitorClientTypes.ProbeState? + let destination: Swift.String? + let destinationPort: Swift.Int? + let `protocol`: NetworkMonitorClientTypes.ModelProtocol? + let packetSize: Swift.Int? +} + +extension UpdateProbeInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case destination + case destinationPort + case packetSize + case `protocol` = "protocol" + case state + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ProbeState.self, forKey: .state) + state = stateDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + } +} + +extension UpdateProbeOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: UpdateProbeOutputBody = try responseDecoder.decode(responseBody: data) + self.`protocol` = output.`protocol` + self.addressFamily = output.addressFamily + self.createdAt = output.createdAt + self.destination = output.destination + self.destinationPort = output.destinationPort + self.modifiedAt = output.modifiedAt + self.packetSize = output.packetSize + self.probeArn = output.probeArn + self.probeId = output.probeId + self.sourceArn = output.sourceArn + self.state = output.state + self.tags = output.tags + self.vpcId = output.vpcId + } else { + self.addressFamily = nil + self.createdAt = nil + self.destination = nil + self.destinationPort = nil + self.modifiedAt = nil + self.packetSize = nil + self.probeArn = nil + self.probeId = nil + self.`protocol` = nil + self.sourceArn = nil + self.state = nil + self.tags = nil + self.vpcId = nil + } + } +} + +public struct UpdateProbeOutput: Swift.Equatable { + /// The updated IP address family. This will be either IPV4 or IPV6. + public var addressFamily: NetworkMonitorClientTypes.AddressFamily? + /// The time and date that the probe was created. + public var createdAt: ClientRuntime.Date? + /// The updated destination IP address for the probe. + /// This member is required. + public var destination: Swift.String? + /// The updated destination port. This will be a number between 1 and 65536. + public var destinationPort: Swift.Int? + /// The time and date that the probe was last updated. + public var modifiedAt: ClientRuntime.Date? + /// The updated packet size for the probe. + public var packetSize: Swift.Int? + /// The updated ARN of the probe. + public var probeArn: Swift.String? + /// The updated ID of the probe. + public var probeId: Swift.String? + /// The updated protocol for the probe. + /// This member is required. + public var `protocol`: NetworkMonitorClientTypes.ModelProtocol? + /// The updated ARN of the source subnet. + /// This member is required. + public var sourceArn: Swift.String? + /// The state of the updated probe. + public var state: NetworkMonitorClientTypes.ProbeState? + /// Update tags for a probe. + public var tags: [Swift.String:Swift.String]? + /// The updated ID of the source VPC subnet ID. + public var vpcId: Swift.String? + + public init( + addressFamily: NetworkMonitorClientTypes.AddressFamily? = nil, + createdAt: ClientRuntime.Date? = nil, + destination: Swift.String? = nil, + destinationPort: Swift.Int? = nil, + modifiedAt: ClientRuntime.Date? = nil, + packetSize: Swift.Int? = nil, + probeArn: Swift.String? = nil, + probeId: Swift.String? = nil, + `protocol`: NetworkMonitorClientTypes.ModelProtocol? = nil, + sourceArn: Swift.String? = nil, + state: NetworkMonitorClientTypes.ProbeState? = nil, + tags: [Swift.String:Swift.String]? = nil, + vpcId: Swift.String? = nil + ) + { + self.addressFamily = addressFamily + self.createdAt = createdAt + self.destination = destination + self.destinationPort = destinationPort + self.modifiedAt = modifiedAt + self.packetSize = packetSize + self.probeArn = probeArn + self.probeId = probeId + self.`protocol` = `protocol` + self.sourceArn = sourceArn + self.state = state + self.tags = tags + self.vpcId = vpcId + } +} + +struct UpdateProbeOutputBody: Swift.Equatable { + let probeId: Swift.String? + let probeArn: Swift.String? + let sourceArn: Swift.String? + let destination: Swift.String? + let destinationPort: Swift.Int? + let `protocol`: NetworkMonitorClientTypes.ModelProtocol? + let packetSize: Swift.Int? + let addressFamily: NetworkMonitorClientTypes.AddressFamily? + let vpcId: Swift.String? + let state: NetworkMonitorClientTypes.ProbeState? + let createdAt: ClientRuntime.Date? + let modifiedAt: ClientRuntime.Date? + let tags: [Swift.String:Swift.String]? +} + +extension UpdateProbeOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case addressFamily + case createdAt + case destination + case destinationPort + case modifiedAt + case packetSize + case probeArn + case probeId + case `protocol` = "protocol" + case sourceArn + case state + case tags + case vpcId + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let probeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeId) + probeId = probeIdDecoded + let probeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .probeArn) + probeArn = probeArnDecoded + let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) + sourceArn = sourceArnDecoded + let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) + destination = destinationDecoded + let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) + destinationPort = destinationPortDecoded + let protocolDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ModelProtocol.self, forKey: .protocol) + `protocol` = protocolDecoded + let packetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetSize) + packetSize = packetSizeDecoded + let addressFamilyDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.AddressFamily.self, forKey: .addressFamily) + addressFamily = addressFamilyDecoded + let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) + vpcId = vpcIdDecoded + let stateDecoded = try containerValues.decodeIfPresent(NetworkMonitorClientTypes.ProbeState.self, forKey: .state) + state = stateDecoded + let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .createdAt) + createdAt = createdAtDecoded + let modifiedAtDecoded = try containerValues.decodeTimestampIfPresent(.epochSeconds, forKey: .modifiedAt) + modifiedAt = modifiedAtDecoded + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 + } + } + } + tags = tagsDecoded0 + } +} + +enum UpdateProbeOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension ValidationException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ValidationExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// One of the parameters for the request is not valid. +public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ValidationException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ValidationExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ValidationExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} diff --git a/Sources/Services/AWSOmics/OmicsClient.swift b/Sources/Services/AWSOmics/OmicsClient.swift index b59e7f89b47..85de46db070 100644 --- a/Sources/Services/AWSOmics/OmicsClient.swift +++ b/Sources/Services/AWSOmics/OmicsClient.swift @@ -2508,7 +2508,7 @@ extension OmicsClient: OmicsClientProtocol { /// Performs the `ListMultipartReadSetUploads` operation on the `Omics` service. /// - /// Lists all multipart read set uploads and their statuses. + /// Lists multipart read set uploads and for in progress uploads. Once the upload is completed, a read set is created and the upload will no longer be returned in the respone. /// /// - Parameter ListMultipartReadSetUploadsInput : [no documentation found] /// diff --git a/Sources/Services/AWSOmics/OmicsClientProtocol.swift b/Sources/Services/AWSOmics/OmicsClientProtocol.swift index 28cb78b782e..bc27c1e4af6 100644 --- a/Sources/Services/AWSOmics/OmicsClientProtocol.swift +++ b/Sources/Services/AWSOmics/OmicsClientProtocol.swift @@ -917,7 +917,7 @@ public protocol OmicsClientProtocol { func listAnnotationStoreVersions(input: ListAnnotationStoreVersionsInput) async throws -> ListAnnotationStoreVersionsOutput /// Performs the `ListMultipartReadSetUploads` operation on the `Omics` service. /// - /// Lists all multipart read set uploads and their statuses. + /// Lists multipart read set uploads and for in progress uploads. Once the upload is completed, a read set is created and the upload will no longer be returned in the respone. /// /// - Parameter ListMultipartReadSetUploadsInput : [no documentation found] /// diff --git a/Sources/Services/AWSOmics/models/Models.swift b/Sources/Services/AWSOmics/models/Models.swift index cfec97bf81b..63228d9db04 100644 --- a/Sources/Services/AWSOmics/models/Models.swift +++ b/Sources/Services/AWSOmics/models/Models.swift @@ -3533,7 +3533,7 @@ public struct CreateWorkflowInput: Swift.Equatable { /// To ensure that requests don't run multiple times, specify a unique ID for each request. /// This member is required. public var requestId: Swift.String? - /// A storage capacity for the workflow in gigabytes. + /// A storage capacity for the workflow in gibibytes. public var storageCapacity: Swift.Int? /// Tags for the workflow. public var tags: [Swift.String:Swift.String]? diff --git a/Sources/Services/AWSOpenSearch/models/Models.swift b/Sources/Services/AWSOpenSearch/models/Models.swift index bc5de4a9d19..abfcf6866c5 100644 --- a/Sources/Services/AWSOpenSearch/models/Models.swift +++ b/Sources/Services/AWSOpenSearch/models/Models.swift @@ -2926,7 +2926,7 @@ public struct CreateDomainInput: Swift.Equatable { public var encryptionAtRestOptions: OpenSearchClientTypes.EncryptionAtRestOptions? /// String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the OpenSearch Service domain. For example, OpenSearch_1.0 or Elasticsearch_7.9. For more information, see [Creating and managing Amazon OpenSearch Service domains](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains). public var engineVersion: Swift.String? - /// The type of IP addresses supported by the endpoint for the domain. + /// Specify either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. If you set your IP address type to dual stack, you can't change your address type later. public var ipAddressType: OpenSearchClientTypes.IPAddressType? /// Key-value pairs to configure log publishing. public var logPublishingOptions: [Swift.String:OpenSearchClientTypes.LogPublishingOption]? @@ -6808,7 +6808,7 @@ extension OpenSearchClientTypes { public var encryptionAtRestOptions: OpenSearchClientTypes.EncryptionAtRestOptionsStatus? /// The OpenSearch or Elasticsearch version that the domain is running. public var engineVersion: OpenSearchClientTypes.VersionStatus? - /// The type of IP addresses supported by the endpoint for the domain. + /// Choose either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. If you set your IP address type to dual stack, you can't change your address type later. public var ipAddressType: OpenSearchClientTypes.IPAddressTypeStatus? /// Key-value pairs to configure log publishing. public var logPublishingOptions: OpenSearchClientTypes.LogPublishingOptionsStatus? @@ -6926,6 +6926,8 @@ extension OpenSearchClientTypes { /// * Policy-Min-TLS-1-0-2019-07: TLS security policy that supports TLS version 1.0 to TLS version 1.2 /// /// * Policy-Min-TLS-1-2-2019-07: TLS security policy that supports only TLS version 1.2 + /// + /// * Policy-Min-TLS-1-2-PFS-2023-10: TLS security policy that supports TLS version 1.2 to TLS version 1.3 with perfect forward secrecy cipher suites public var tlsSecurityPolicy: OpenSearchClientTypes.TLSSecurityPolicy? public init( @@ -7774,9 +7776,9 @@ extension OpenSearchClientTypes { public var encryptionAtRestOptions: OpenSearchClientTypes.EncryptionAtRestOptions? /// Domain-specific endpoint used to submit index, search, and data upload requests to the domain. public var endpoint: Swift.String? - /// The domain endpoint to which index and search requests are submitted. For example, search-imdb-movies-oopcnjfn6ugo.eu-west-1.es.amazonaws.com or doc-imdb-movies-oopcnjfn6u.eu-west-1.es.amazonaws.com. + /// If IPAddressType to set to dualstack, a version 2 domain endpoint is provisioned. This endpoint functions like a normal endpoint, except that it works with both IPv4 and IPv6 IP addresses. Normal endpoints work only with IPv4 IP addresses. public var endpointV2: Swift.String? - /// The key-value pair that exists if the OpenSearch Service domain uses VPC endpoints.. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'. + /// The key-value pair that exists if the OpenSearch Service domain uses VPC endpoints. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'. public var endpoints: [Swift.String:Swift.String]? /// Version of OpenSearch or Elasticsearch that the domain is running, in the format Elasticsearch_X.Y or OpenSearch_X.Y. public var engineVersion: Swift.String? @@ -15538,12 +15540,14 @@ extension OpenSearchClientTypes { public enum TLSSecurityPolicy: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case policyMinTls10201907 case policyMinTls12201907 + case policyMinTls12Pfs202310 case sdkUnknown(Swift.String) public static var allCases: [TLSSecurityPolicy] { return [ .policyMinTls10201907, .policyMinTls12201907, + .policyMinTls12Pfs202310, .sdkUnknown("") ] } @@ -15555,6 +15559,7 @@ extension OpenSearchClientTypes { switch self { case .policyMinTls10201907: return "Policy-Min-TLS-1-0-2019-07" case .policyMinTls12201907: return "Policy-Min-TLS-1-2-2019-07" + case .policyMinTls12Pfs202310: return "Policy-Min-TLS-1-2-PFS-2023-10" case let .sdkUnknown(s): return s } } @@ -15913,7 +15918,7 @@ public struct UpdateDomainConfigInput: Swift.Equatable { public var ebsOptions: OpenSearchClientTypes.EBSOptions? /// Encryption at rest options for the domain. public var encryptionAtRestOptions: OpenSearchClientTypes.EncryptionAtRestOptions? - /// The type of IP addresses supported by the endpoint for the domain. + /// Specify either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. If your IP address type is currently set to dual stack, you can't change it. public var ipAddressType: OpenSearchClientTypes.IPAddressType? /// Options to publish OpenSearch logs to Amazon CloudWatch Logs. public var logPublishingOptions: [Swift.String:OpenSearchClientTypes.LogPublishingOption]? diff --git a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift index 89de173093a..ebb25fb65cd 100644 --- a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift +++ b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift @@ -311,7 +311,7 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// Performs the `ExportKey` operation on the `PaymentCryptographyControlPlane` service. /// - /// Exports a key from Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ExportKey you can export symmetric keys using either symmetric and asymmetric key exchange mechanisms. Using this operation, you can share your Amazon Web Services Payment Cryptography generated keys with other service partners to perform cryptographic operations outside of Amazon Web Services Payment Cryptography For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm . Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK). After which you can export working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. You can also use ExportKey functionality to generate and export an IPEK (Initial Pin Encryption Key) from Amazon Web Services Payment Cryptography using either TR-31 or TR-34 export key exchange. IPEK is generated from BDK (Base Derivation Key) and ExportDukptInitialKey attribute KSN (KeySerialNumber). The generated IPEK does not persist within Amazon Web Services Payment Cryptography and has to be re-generated each time during export. To export KEK or IPEK using TR-34 Using this operation, you can export initial key using TR-34 asymmetric key exchange. You can only export KEK generated within Amazon Web Services Payment Cryptography. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During key export process, KDH is Amazon Web Services Payment Cryptography which initiates key export and KRD is the user receiving the key. To initiate TR-34 key export, the KRD must obtain an export token by calling [GetParametersForExport]. This operation also generates a key pair for the purpose of key export, signs the key and returns back the signing public key certificate (also known as KDH signing certificate) and root certificate chain. The KDH uses the private key to sign the the export payload and the signing public key certificate is provided to KRD to verify the signature. The KRD can import the root certificate into its Hardware Security Module (HSM), as required. The export token and the associated KDH signing certificate expires after 7 days. Next the KRD generates a key pair for the the purpose of encrypting the KDH key and provides the public key cerificate (also known as KRD wrapping certificate) back to KDH. The KRD will also import the root cerificate chain into Amazon Web Services Payment Cryptography by calling [ImportKey] for RootCertificatePublicKey. The KDH, Amazon Web Services Payment Cryptography, will use the KRD wrapping cerificate to encrypt (wrap) the key under export and signs it with signing private key to generate a TR-34 WrappedKeyBlock. For more information on TR-34 key export, see section [Exporting symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-export.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: + /// Exports a key from Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ExportKey you can export symmetric keys using either symmetric and asymmetric key exchange mechanisms. Using this operation, you can share your Amazon Web Services Payment Cryptography generated keys with other service partners to perform cryptographic operations outside of Amazon Web Services Payment Cryptography For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm and RSA wrap and unwrap key exchange mechanism. Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK). After which you can export working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. With RSA wrap and unwrap, you can exchange both 3DES and AES-128 keys. The keys are imported in a WrappedKeyCryptogram format and you will need to specify the key attributes during import. You can also use ExportKey functionality to generate and export an IPEK (Initial Pin Encryption Key) from Amazon Web Services Payment Cryptography using either TR-31 or TR-34 export key exchange. IPEK is generated from BDK (Base Derivation Key) and ExportDukptInitialKey attribute KSN (KeySerialNumber). The generated IPEK does not persist within Amazon Web Services Payment Cryptography and has to be re-generated each time during export. To export initial keys (KEK) or IPEK using TR-34 Using this operation, you can export initial key using TR-34 asymmetric key exchange. You can only export KEK generated within Amazon Web Services Payment Cryptography. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During key export process, KDH is Amazon Web Services Payment Cryptography which initiates key export and KRD is the user receiving the key. To initiate TR-34 key export, the KRD must obtain an export token by calling [GetParametersForExport]. This operation also generates a key pair for the purpose of key export, signs the key and returns back the signing public key certificate (also known as KDH signing certificate) and root certificate chain. The KDH uses the private key to sign the the export payload and the signing public key certificate is provided to KRD to verify the signature. The KRD can import the root certificate into its Hardware Security Module (HSM), as required. The export token and the associated KDH signing certificate expires after 7 days. Next the KRD generates a key pair for the the purpose of encrypting the KDH key and provides the public key cerificate (also known as KRD wrapping certificate) back to KDH. The KRD will also import the root cerificate chain into Amazon Web Services Payment Cryptography by calling [ImportKey] for RootCertificatePublicKey. The KDH, Amazon Web Services Payment Cryptography, will use the KRD wrapping cerificate to encrypt (wrap) the key under export and signs it with signing private key to generate a TR-34 WrappedKeyBlock. For more information on TR-34 key export, see section [Exporting symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-export.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: /// /// * ExportAttributes: Specify export attributes in case of IPEK export. This parameter is optional for KEK export. /// @@ -326,7 +326,16 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// * WrappingKeyCertificate: The public key certificate in PEM format (base64 encoded) of the KRD wrapping key Amazon Web Services Payment Cryptography uses for encryption of the TR-34 export payload. This certificate must be signed by the root certificate (CertificateAuthorityPublicKeyIdentifier) imported into Amazon Web Services Payment Cryptography. /// /// - /// When this operation is successful, Amazon Web Services Payment Cryptography returns the KEK or IPEK as a TR-34 WrappedKeyBlock. To export WK (Working Key) or IPEK using TR-31 Using this operation, you can export working keys or IPEK using TR-31 symmetric key exchange. In TR-31, you must use an initial key such as KEK to encrypt or wrap the key under export. To establish a KEK, you can use [CreateKey] or [ImportKey]. Set the following parameters: + /// When this operation is successful, Amazon Web Services Payment Cryptography returns the KEK or IPEK as a TR-34 WrappedKeyBlock. To export initial keys (KEK) or IPEK using RSA Wrap and Unwrap Using this operation, you can export initial key using asymmetric RSA wrap and unwrap key exchange method. To initiate export, generate an asymmetric key pair on the receiving HSM and obtain the public key certificate in PEM format (base64 encoded) for the purpose of wrapping and the root certifiate chain. Import the root certificate into Amazon Web Services Payment Cryptography by calling [ImportKey] for RootCertificatePublicKey. Next call ExportKey and set the following parameters: + /// + /// * CertificateAuthorityPublicKeyIdentifier: The KeyARN of the certificate chain that signed wrapping key certificate. + /// + /// * KeyMaterial: Set to KeyCryptogram. + /// + /// * WrappingKeyCertificate: The public key certificate in PEM format (base64 encoded) obtained by the receiving HSM and signed by the root certificate (CertificateAuthorityPublicKeyIdentifier) imported into Amazon Web Services Payment Cryptography. The receiving HSM uses its private key component to unwrap the WrappedKeyCryptogram. + /// + /// + /// When this operation is successful, Amazon Web Services Payment Cryptography returns the WrappedKeyCryptogram. To export working keys or IPEK using TR-31 Using this operation, you can export working keys or IPEK using TR-31 symmetric key exchange. In TR-31, you must use an initial key such as KEK to encrypt or wrap the key under export. To establish a KEK, you can use [CreateKey] or [ImportKey]. Set the following parameters: /// /// * ExportAttributes: Specify export attributes in case of IPEK export. This parameter is optional for KEK export. /// @@ -335,7 +344,7 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// * KeyMaterial: Use Tr31KeyBlock parameters. /// /// - /// When this operation is successful, Amazon Web Services Payment Cryptography returns the WK or IPEK as a TR-31 WrappedKeyBlock. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: + /// When this operation is successful, Amazon Web Services Payment Cryptography returns the working key or IPEK as a TR-31 WrappedKeyBlock. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: /// /// * [GetParametersForExport] /// @@ -568,7 +577,7 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// Performs the `GetParametersForImport` operation on the `PaymentCryptographyControlPlane` service. /// - /// Gets the import token and the wrapping key certificate in PEM format (base64 encoded) to initiate a TR-34 WrappedKeyBlock. The wrapping key certificate wraps the key under import. The import token and wrapping key certificate must be in place and operational before calling [ImportKey]. The import token expires in 7 days. You can use the same import token to import multiple keys into your service account. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: + /// Gets the import token and the wrapping key certificate in PEM format (base64 encoded) to initiate a TR-34 WrappedKeyBlock or a RSA WrappedKeyCryptogram import into Amazon Web Services Payment Cryptography. The wrapping key certificate wraps the key under import. The import token and wrapping key certificate must be in place and operational before calling [ImportKey]. The import token expires in 7 days. You can use the same import token to import multiple keys into your service account. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: /// /// * [GetParametersForExport] /// @@ -678,7 +687,7 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// Performs the `ImportKey` operation on the `PaymentCryptographyControlPlane` service. /// - /// Imports symmetric keys and public key certificates in PEM format (base64 encoded) into Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ImportKey you can import symmetric keys using either symmetric and asymmetric key exchange mechanisms. For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm . Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK) or Zone Master Key (ZMK). After which you can import working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate Using this operation, you can import the public component (in PEM cerificate format) of your private root key. You can use the imported public root key certificate for digital signatures, for example signing wrapping key or signing key in TR-34, within your Amazon Web Services Payment Cryptography account. Set the following parameters: + /// Imports symmetric keys and public key certificates in PEM format (base64 encoded) into Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ImportKey you can import symmetric keys using either symmetric and asymmetric key exchange mechanisms. For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm and RSA wrap and unwrap key exchange mechanisms. Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK) or Zone Master Key (ZMK). After which you can import working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. With RSA wrap and unwrap, you can exchange both 3DES and AES-128 keys. The keys are imported in a WrappedKeyCryptogram format and you will need to specify the key attributes during import. You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate Using this operation, you can import the public component (in PEM cerificate format) of your private root key. You can use the imported public root key certificate for digital signatures, for example signing wrapping key or signing key in TR-34, within your Amazon Web Services Payment Cryptography account. Set the following parameters: /// /// * KeyMaterial: RootCertificatePublicKey /// @@ -702,7 +711,7 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// * PublicKeyCertificate: The trusted public key certificate in PEM format (base64 encoded) under import. /// /// - /// To import KEK or ZMK using TR-34 Using this operation, you can import initial key using TR-34 asymmetric key exchange. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During the key import process, KDH is the user who initiates the key import and KRD is Amazon Web Services Payment Cryptography who receives the key. To initiate TR-34 key import, the KDH must obtain an import token by calling [GetParametersForImport]. This operation generates an encryption keypair for the purpose of key import, signs the key and returns back the wrapping key certificate (also known as KRD wrapping certificate) and the root certificate chain. The KDH must trust and install the KRD wrapping certificate on its HSM and use it to encrypt (wrap) the KDH key during TR-34 WrappedKeyBlock generation. The import token and associated KRD wrapping certificate expires after 7 days. Next the KDH generates a key pair for the purpose of signing the encrypted KDH key and provides the public certificate of the signing key to Amazon Web Services Payment Cryptography. The KDH will also need to import the root certificate chain of the KDH signing certificate by calling ImportKey for RootCertificatePublicKey. For more information on TR-34 key import, see section [Importing symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-import.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: + /// To import initial keys (KEK or ZMK or similar) using TR-34 Using this operation, you can import initial key using TR-34 asymmetric key exchange. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During the key import process, KDH is the user who initiates the key import and KRD is Amazon Web Services Payment Cryptography who receives the key. To initiate TR-34 key import, the KDH must obtain an import token by calling [GetParametersForImport]. This operation generates an encryption keypair for the purpose of key import, signs the key and returns back the wrapping key certificate (also known as KRD wrapping certificate) and the root certificate chain. The KDH must trust and install the KRD wrapping certificate on its HSM and use it to encrypt (wrap) the KDH key during TR-34 WrappedKeyBlock generation. The import token and associated KRD wrapping certificate expires after 7 days. Next the KDH generates a key pair for the purpose of signing the encrypted KDH key and provides the public certificate of the signing key to Amazon Web Services Payment Cryptography. The KDH will also need to import the root certificate chain of the KDH signing certificate by calling ImportKey for RootCertificatePublicKey. For more information on TR-34 key import, see section [Importing symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-import.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: /// /// * KeyMaterial: Use Tr34KeyBlock parameters. /// @@ -715,7 +724,7 @@ extension PaymentCryptographyClient: PaymentCryptographyClientProtocol { /// * SigningKeyCertificate: The public key certificate in PEM format (base64 encoded) of the KDH signing key generated under the root certificate (CertificateAuthorityPublicKeyIdentifier) imported in Amazon Web Services Payment Cryptography. /// /// - /// To import WK (Working Key) using TR-31 Amazon Web Services Payment Cryptography uses TR-31 symmetric key exchange norm to import working keys. A KEK must be established within Amazon Web Services Payment Cryptography by using TR-34 key import or by using [CreateKey]. To initiate a TR-31 key import, set the following parameters: + /// To import initial keys (KEK or ZMK or similar) using RSA Wrap and Unwrap Using this operation, you can import initial key using asymmetric RSA wrap and unwrap key exchange method. To initiate import, call [GetParametersForImport] with KeyMaterial set to KEY_CRYPTOGRAM to generate an import token. This operation also generates an encryption keypair for the purpose of key import, signs the key and returns back the wrapping key certificate in PEM format (base64 encoded) and its root certificate chain. The import token and associated KRD wrapping certificate expires after 7 days. You must trust and install the wrapping certificate and its certificate chain on the sending HSM and use it to wrap the key under export for WrappedKeyCryptogram generation. Next call ImportKey with KeyMaterial set to KEY_CRYPTOGRAM and provide the ImportToken and KeyAttributes for the key under import. To import working keys using TR-31 Amazon Web Services Payment Cryptography uses TR-31 symmetric key exchange norm to import working keys. A KEK must be established within Amazon Web Services Payment Cryptography by using TR-34 key import or by using [CreateKey]. To initiate a TR-31 key import, set the following parameters: /// /// * KeyMaterial: Use Tr31KeyBlock parameters. /// diff --git a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClientProtocol.swift b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClientProtocol.swift index 60c95eb95ac..38345da837f 100644 --- a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClientProtocol.swift +++ b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClientProtocol.swift @@ -112,7 +112,7 @@ public protocol PaymentCryptographyClientProtocol { func deleteKey(input: DeleteKeyInput) async throws -> DeleteKeyOutput /// Performs the `ExportKey` operation on the `PaymentCryptographyControlPlane` service. /// - /// Exports a key from Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ExportKey you can export symmetric keys using either symmetric and asymmetric key exchange mechanisms. Using this operation, you can share your Amazon Web Services Payment Cryptography generated keys with other service partners to perform cryptographic operations outside of Amazon Web Services Payment Cryptography For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm . Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK). After which you can export working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. You can also use ExportKey functionality to generate and export an IPEK (Initial Pin Encryption Key) from Amazon Web Services Payment Cryptography using either TR-31 or TR-34 export key exchange. IPEK is generated from BDK (Base Derivation Key) and ExportDukptInitialKey attribute KSN (KeySerialNumber). The generated IPEK does not persist within Amazon Web Services Payment Cryptography and has to be re-generated each time during export. To export KEK or IPEK using TR-34 Using this operation, you can export initial key using TR-34 asymmetric key exchange. You can only export KEK generated within Amazon Web Services Payment Cryptography. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During key export process, KDH is Amazon Web Services Payment Cryptography which initiates key export and KRD is the user receiving the key. To initiate TR-34 key export, the KRD must obtain an export token by calling [GetParametersForExport]. This operation also generates a key pair for the purpose of key export, signs the key and returns back the signing public key certificate (also known as KDH signing certificate) and root certificate chain. The KDH uses the private key to sign the the export payload and the signing public key certificate is provided to KRD to verify the signature. The KRD can import the root certificate into its Hardware Security Module (HSM), as required. The export token and the associated KDH signing certificate expires after 7 days. Next the KRD generates a key pair for the the purpose of encrypting the KDH key and provides the public key cerificate (also known as KRD wrapping certificate) back to KDH. The KRD will also import the root cerificate chain into Amazon Web Services Payment Cryptography by calling [ImportKey] for RootCertificatePublicKey. The KDH, Amazon Web Services Payment Cryptography, will use the KRD wrapping cerificate to encrypt (wrap) the key under export and signs it with signing private key to generate a TR-34 WrappedKeyBlock. For more information on TR-34 key export, see section [Exporting symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-export.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: + /// Exports a key from Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ExportKey you can export symmetric keys using either symmetric and asymmetric key exchange mechanisms. Using this operation, you can share your Amazon Web Services Payment Cryptography generated keys with other service partners to perform cryptographic operations outside of Amazon Web Services Payment Cryptography For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm and RSA wrap and unwrap key exchange mechanism. Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK). After which you can export working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. With RSA wrap and unwrap, you can exchange both 3DES and AES-128 keys. The keys are imported in a WrappedKeyCryptogram format and you will need to specify the key attributes during import. You can also use ExportKey functionality to generate and export an IPEK (Initial Pin Encryption Key) from Amazon Web Services Payment Cryptography using either TR-31 or TR-34 export key exchange. IPEK is generated from BDK (Base Derivation Key) and ExportDukptInitialKey attribute KSN (KeySerialNumber). The generated IPEK does not persist within Amazon Web Services Payment Cryptography and has to be re-generated each time during export. To export initial keys (KEK) or IPEK using TR-34 Using this operation, you can export initial key using TR-34 asymmetric key exchange. You can only export KEK generated within Amazon Web Services Payment Cryptography. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During key export process, KDH is Amazon Web Services Payment Cryptography which initiates key export and KRD is the user receiving the key. To initiate TR-34 key export, the KRD must obtain an export token by calling [GetParametersForExport]. This operation also generates a key pair for the purpose of key export, signs the key and returns back the signing public key certificate (also known as KDH signing certificate) and root certificate chain. The KDH uses the private key to sign the the export payload and the signing public key certificate is provided to KRD to verify the signature. The KRD can import the root certificate into its Hardware Security Module (HSM), as required. The export token and the associated KDH signing certificate expires after 7 days. Next the KRD generates a key pair for the the purpose of encrypting the KDH key and provides the public key cerificate (also known as KRD wrapping certificate) back to KDH. The KRD will also import the root cerificate chain into Amazon Web Services Payment Cryptography by calling [ImportKey] for RootCertificatePublicKey. The KDH, Amazon Web Services Payment Cryptography, will use the KRD wrapping cerificate to encrypt (wrap) the key under export and signs it with signing private key to generate a TR-34 WrappedKeyBlock. For more information on TR-34 key export, see section [Exporting symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-export.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: /// /// * ExportAttributes: Specify export attributes in case of IPEK export. This parameter is optional for KEK export. /// @@ -127,7 +127,16 @@ public protocol PaymentCryptographyClientProtocol { /// * WrappingKeyCertificate: The public key certificate in PEM format (base64 encoded) of the KRD wrapping key Amazon Web Services Payment Cryptography uses for encryption of the TR-34 export payload. This certificate must be signed by the root certificate (CertificateAuthorityPublicKeyIdentifier) imported into Amazon Web Services Payment Cryptography. /// /// - /// When this operation is successful, Amazon Web Services Payment Cryptography returns the KEK or IPEK as a TR-34 WrappedKeyBlock. To export WK (Working Key) or IPEK using TR-31 Using this operation, you can export working keys or IPEK using TR-31 symmetric key exchange. In TR-31, you must use an initial key such as KEK to encrypt or wrap the key under export. To establish a KEK, you can use [CreateKey] or [ImportKey]. Set the following parameters: + /// When this operation is successful, Amazon Web Services Payment Cryptography returns the KEK or IPEK as a TR-34 WrappedKeyBlock. To export initial keys (KEK) or IPEK using RSA Wrap and Unwrap Using this operation, you can export initial key using asymmetric RSA wrap and unwrap key exchange method. To initiate export, generate an asymmetric key pair on the receiving HSM and obtain the public key certificate in PEM format (base64 encoded) for the purpose of wrapping and the root certifiate chain. Import the root certificate into Amazon Web Services Payment Cryptography by calling [ImportKey] for RootCertificatePublicKey. Next call ExportKey and set the following parameters: + /// + /// * CertificateAuthorityPublicKeyIdentifier: The KeyARN of the certificate chain that signed wrapping key certificate. + /// + /// * KeyMaterial: Set to KeyCryptogram. + /// + /// * WrappingKeyCertificate: The public key certificate in PEM format (base64 encoded) obtained by the receiving HSM and signed by the root certificate (CertificateAuthorityPublicKeyIdentifier) imported into Amazon Web Services Payment Cryptography. The receiving HSM uses its private key component to unwrap the WrappedKeyCryptogram. + /// + /// + /// When this operation is successful, Amazon Web Services Payment Cryptography returns the WrappedKeyCryptogram. To export working keys or IPEK using TR-31 Using this operation, you can export working keys or IPEK using TR-31 symmetric key exchange. In TR-31, you must use an initial key such as KEK to encrypt or wrap the key under export. To establish a KEK, you can use [CreateKey] or [ImportKey]. Set the following parameters: /// /// * ExportAttributes: Specify export attributes in case of IPEK export. This parameter is optional for KEK export. /// @@ -136,7 +145,7 @@ public protocol PaymentCryptographyClientProtocol { /// * KeyMaterial: Use Tr31KeyBlock parameters. /// /// - /// When this operation is successful, Amazon Web Services Payment Cryptography returns the WK or IPEK as a TR-31 WrappedKeyBlock. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: + /// When this operation is successful, Amazon Web Services Payment Cryptography returns the working key or IPEK as a TR-31 WrappedKeyBlock. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: /// /// * [GetParametersForExport] /// @@ -233,7 +242,7 @@ public protocol PaymentCryptographyClientProtocol { func getParametersForExport(input: GetParametersForExportInput) async throws -> GetParametersForExportOutput /// Performs the `GetParametersForImport` operation on the `PaymentCryptographyControlPlane` service. /// - /// Gets the import token and the wrapping key certificate in PEM format (base64 encoded) to initiate a TR-34 WrappedKeyBlock. The wrapping key certificate wraps the key under import. The import token and wrapping key certificate must be in place and operational before calling [ImportKey]. The import token expires in 7 days. You can use the same import token to import multiple keys into your service account. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: + /// Gets the import token and the wrapping key certificate in PEM format (base64 encoded) to initiate a TR-34 WrappedKeyBlock or a RSA WrappedKeyCryptogram import into Amazon Web Services Payment Cryptography. The wrapping key certificate wraps the key under import. The import token and wrapping key certificate must be in place and operational before calling [ImportKey]. The import token expires in 7 days. You can use the same import token to import multiple keys into your service account. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: /// /// * [GetParametersForExport] /// @@ -275,7 +284,7 @@ public protocol PaymentCryptographyClientProtocol { func getPublicKeyCertificate(input: GetPublicKeyCertificateInput) async throws -> GetPublicKeyCertificateOutput /// Performs the `ImportKey` operation on the `PaymentCryptographyControlPlane` service. /// - /// Imports symmetric keys and public key certificates in PEM format (base64 encoded) into Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ImportKey you can import symmetric keys using either symmetric and asymmetric key exchange mechanisms. For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm . Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK) or Zone Master Key (ZMK). After which you can import working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate Using this operation, you can import the public component (in PEM cerificate format) of your private root key. You can use the imported public root key certificate for digital signatures, for example signing wrapping key or signing key in TR-34, within your Amazon Web Services Payment Cryptography account. Set the following parameters: + /// Imports symmetric keys and public key certificates in PEM format (base64 encoded) into Amazon Web Services Payment Cryptography. Amazon Web Services Payment Cryptography simplifies key exchange by replacing the existing paper-based approach with a modern electronic approach. With ImportKey you can import symmetric keys using either symmetric and asymmetric key exchange mechanisms. For symmetric key exchange, Amazon Web Services Payment Cryptography uses the ANSI X9 TR-31 norm in accordance with PCI PIN guidelines. And for asymmetric key exchange, Amazon Web Services Payment Cryptography supports ANSI X9 TR-34 norm and RSA wrap and unwrap key exchange mechanisms. Asymmetric key exchange methods are typically used to establish bi-directional trust between the two parties exhanging keys and are used for initial key exchange such as Key Encryption Key (KEK) or Zone Master Key (ZMK). After which you can import working keys using symmetric method to perform various cryptographic operations within Amazon Web Services Payment Cryptography. The TR-34 norm is intended for exchanging 3DES keys only and keys are imported in a WrappedKeyBlock format. Key attributes (such as KeyUsage, KeyAlgorithm, KeyModesOfUse, Exportability) are contained within the key block. With RSA wrap and unwrap, you can exchange both 3DES and AES-128 keys. The keys are imported in a WrappedKeyCryptogram format and you will need to specify the key attributes during import. You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate You can also import a root public key certificate, used to sign other public key certificates, or a trusted public key certificate under an already established root public key certificate. To import a public root key certificate Using this operation, you can import the public component (in PEM cerificate format) of your private root key. You can use the imported public root key certificate for digital signatures, for example signing wrapping key or signing key in TR-34, within your Amazon Web Services Payment Cryptography account. Set the following parameters: /// /// * KeyMaterial: RootCertificatePublicKey /// @@ -299,7 +308,7 @@ public protocol PaymentCryptographyClientProtocol { /// * PublicKeyCertificate: The trusted public key certificate in PEM format (base64 encoded) under import. /// /// - /// To import KEK or ZMK using TR-34 Using this operation, you can import initial key using TR-34 asymmetric key exchange. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During the key import process, KDH is the user who initiates the key import and KRD is Amazon Web Services Payment Cryptography who receives the key. To initiate TR-34 key import, the KDH must obtain an import token by calling [GetParametersForImport]. This operation generates an encryption keypair for the purpose of key import, signs the key and returns back the wrapping key certificate (also known as KRD wrapping certificate) and the root certificate chain. The KDH must trust and install the KRD wrapping certificate on its HSM and use it to encrypt (wrap) the KDH key during TR-34 WrappedKeyBlock generation. The import token and associated KRD wrapping certificate expires after 7 days. Next the KDH generates a key pair for the purpose of signing the encrypted KDH key and provides the public certificate of the signing key to Amazon Web Services Payment Cryptography. The KDH will also need to import the root certificate chain of the KDH signing certificate by calling ImportKey for RootCertificatePublicKey. For more information on TR-34 key import, see section [Importing symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-import.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: + /// To import initial keys (KEK or ZMK or similar) using TR-34 Using this operation, you can import initial key using TR-34 asymmetric key exchange. In TR-34 terminology, the sending party of the key is called Key Distribution Host (KDH) and the receiving party of the key is called Key Receiving Device (KRD). During the key import process, KDH is the user who initiates the key import and KRD is Amazon Web Services Payment Cryptography who receives the key. To initiate TR-34 key import, the KDH must obtain an import token by calling [GetParametersForImport]. This operation generates an encryption keypair for the purpose of key import, signs the key and returns back the wrapping key certificate (also known as KRD wrapping certificate) and the root certificate chain. The KDH must trust and install the KRD wrapping certificate on its HSM and use it to encrypt (wrap) the KDH key during TR-34 WrappedKeyBlock generation. The import token and associated KRD wrapping certificate expires after 7 days. Next the KDH generates a key pair for the purpose of signing the encrypted KDH key and provides the public certificate of the signing key to Amazon Web Services Payment Cryptography. The KDH will also need to import the root certificate chain of the KDH signing certificate by calling ImportKey for RootCertificatePublicKey. For more information on TR-34 key import, see section [Importing symmetric keys](https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-import.html) in the Amazon Web Services Payment Cryptography User Guide. Set the following parameters: /// /// * KeyMaterial: Use Tr34KeyBlock parameters. /// @@ -312,7 +321,7 @@ public protocol PaymentCryptographyClientProtocol { /// * SigningKeyCertificate: The public key certificate in PEM format (base64 encoded) of the KDH signing key generated under the root certificate (CertificateAuthorityPublicKeyIdentifier) imported in Amazon Web Services Payment Cryptography. /// /// - /// To import WK (Working Key) using TR-31 Amazon Web Services Payment Cryptography uses TR-31 symmetric key exchange norm to import working keys. A KEK must be established within Amazon Web Services Payment Cryptography by using TR-34 key import or by using [CreateKey]. To initiate a TR-31 key import, set the following parameters: + /// To import initial keys (KEK or ZMK or similar) using RSA Wrap and Unwrap Using this operation, you can import initial key using asymmetric RSA wrap and unwrap key exchange method. To initiate import, call [GetParametersForImport] with KeyMaterial set to KEY_CRYPTOGRAM to generate an import token. This operation also generates an encryption keypair for the purpose of key import, signs the key and returns back the wrapping key certificate in PEM format (base64 encoded) and its root certificate chain. The import token and associated KRD wrapping certificate expires after 7 days. You must trust and install the wrapping certificate and its certificate chain on the sending HSM and use it to wrap the key under export for WrappedKeyCryptogram generation. Next call ImportKey with KeyMaterial set to KEY_CRYPTOGRAM and provide the ImportToken and KeyAttributes for the key under import. To import working keys using TR-31 Amazon Web Services Payment Cryptography uses TR-31 symmetric key exchange norm to import working keys. A KEK must be established within Amazon Web Services Payment Cryptography by using TR-34 key import or by using [CreateKey]. To initiate a TR-31 key import, set the following parameters: /// /// * KeyMaterial: Use Tr31KeyBlock parameters. /// diff --git a/Sources/Services/AWSPaymentCryptography/models/Models.swift b/Sources/Services/AWSPaymentCryptography/models/Models.swift index d07e4ba3bd9..9255817c16c 100644 --- a/Sources/Services/AWSPaymentCryptography/models/Models.swift +++ b/Sources/Services/AWSPaymentCryptography/models/Models.swift @@ -719,6 +719,68 @@ extension PaymentCryptographyClientTypes { } +extension PaymentCryptographyClientTypes.ExportKeyCryptogram: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateAuthorityPublicKeyIdentifier = "CertificateAuthorityPublicKeyIdentifier" + case wrappingKeyCertificate = "WrappingKeyCertificate" + case wrappingSpec = "WrappingSpec" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let certificateAuthorityPublicKeyIdentifier = self.certificateAuthorityPublicKeyIdentifier { + try encodeContainer.encode(certificateAuthorityPublicKeyIdentifier, forKey: .certificateAuthorityPublicKeyIdentifier) + } + if let wrappingKeyCertificate = self.wrappingKeyCertificate { + try encodeContainer.encode(wrappingKeyCertificate, forKey: .wrappingKeyCertificate) + } + if let wrappingSpec = self.wrappingSpec { + try encodeContainer.encode(wrappingSpec.rawValue, forKey: .wrappingSpec) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let certificateAuthorityPublicKeyIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateAuthorityPublicKeyIdentifier) + certificateAuthorityPublicKeyIdentifier = certificateAuthorityPublicKeyIdentifierDecoded + let wrappingKeyCertificateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .wrappingKeyCertificate) + wrappingKeyCertificate = wrappingKeyCertificateDecoded + let wrappingSpecDecoded = try containerValues.decodeIfPresent(PaymentCryptographyClientTypes.WrappingKeySpec.self, forKey: .wrappingSpec) + wrappingSpec = wrappingSpecDecoded + } +} + +extension PaymentCryptographyClientTypes.ExportKeyCryptogram: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "ExportKeyCryptogram(certificateAuthorityPublicKeyIdentifier: \(Swift.String(describing: certificateAuthorityPublicKeyIdentifier)), wrappingSpec: \(Swift.String(describing: wrappingSpec)), wrappingKeyCertificate: \"CONTENT_REDACTED\")"} +} + +extension PaymentCryptographyClientTypes { + /// Parameter information for key material export using asymmetric RSA wrap and unwrap key exchange method. + public struct ExportKeyCryptogram: Swift.Equatable { + /// The KeyARN of the certificate chain that signs the wrapping key certificate during RSA wrap and unwrap key export. + /// This member is required. + public var certificateAuthorityPublicKeyIdentifier: Swift.String? + /// The wrapping key certificate in PEM format (base64 encoded). Amazon Web Services Payment Cryptography uses this certificate to wrap the key under export. + /// This member is required. + public var wrappingKeyCertificate: Swift.String? + /// The wrapping spec for the key under export. + public var wrappingSpec: PaymentCryptographyClientTypes.WrappingKeySpec? + + public init( + certificateAuthorityPublicKeyIdentifier: Swift.String? = nil, + wrappingKeyCertificate: Swift.String? = nil, + wrappingSpec: PaymentCryptographyClientTypes.WrappingKeySpec? = nil + ) + { + self.certificateAuthorityPublicKeyIdentifier = certificateAuthorityPublicKeyIdentifier + self.wrappingKeyCertificate = wrappingKeyCertificate + self.wrappingSpec = wrappingSpec + } + } + +} + extension ExportKeyInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case exportAttributes = "ExportAttributes" @@ -794,6 +856,7 @@ extension ExportKeyInputBody: Swift.Decodable { extension PaymentCryptographyClientTypes.ExportKeyMaterial: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case keycryptogram = "KeyCryptogram" case tr31keyblock = "Tr31KeyBlock" case tr34keyblock = "Tr34KeyBlock" case sdkUnknown @@ -802,6 +865,8 @@ extension PaymentCryptographyClientTypes.ExportKeyMaterial: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) switch self { + case let .keycryptogram(keycryptogram): + try container.encode(keycryptogram, forKey: .keycryptogram) case let .tr31keyblock(tr31keyblock): try container.encode(tr31keyblock, forKey: .tr31keyblock) case let .tr34keyblock(tr34keyblock): @@ -823,17 +888,24 @@ extension PaymentCryptographyClientTypes.ExportKeyMaterial: Swift.Codable { self = .tr34keyblock(tr34keyblock) return } + let keycryptogramDecoded = try values.decodeIfPresent(PaymentCryptographyClientTypes.ExportKeyCryptogram.self, forKey: .keycryptogram) + if let keycryptogram = keycryptogramDecoded { + self = .keycryptogram(keycryptogram) + return + } self = .sdkUnknown("") } } extension PaymentCryptographyClientTypes { - /// Parameter information for key material export from Amazon Web Services Payment Cryptography using TR-31 or TR-34 key exchange method. + /// Parameter information for key material export from Amazon Web Services Payment Cryptography using TR-31 or TR-34 or RSA wrap and unwrap key exchange method. public enum ExportKeyMaterial: Swift.Equatable { /// Parameter information for key material export using symmetric TR-31 key exchange method. case tr31keyblock(PaymentCryptographyClientTypes.ExportTr31KeyBlock) /// Parameter information for key material export using the asymmetric TR-34 key exchange method. case tr34keyblock(PaymentCryptographyClientTypes.ExportTr34KeyBlock) + /// Parameter information for key material export using asymmetric RSA wrap and unwrap key exchange method + case keycryptogram(PaymentCryptographyClientTypes.ExportKeyCryptogram) case sdkUnknown(Swift.String) } @@ -852,7 +924,7 @@ extension ExportKeyOutput: ClientRuntime.HttpResponseBinding { } public struct ExportKeyOutput: Swift.Equatable { - /// The key material under export as a TR-34 WrappedKeyBlock or a TR-31 WrappedKeyBlock. + /// The key material under export as a TR-34 WrappedKeyBlock or a TR-31 WrappedKeyBlock. or a RSA WrappedKeyCryptogram. public var wrappedKey: PaymentCryptographyClientTypes.WrappedKey? public init( @@ -1419,10 +1491,10 @@ extension GetParametersForImportInput: ClientRuntime.URLPathProvider { } public struct GetParametersForImportInput: Swift.Equatable { - /// The method to use for key material import. Import token is only required for TR-34 WrappedKeyBlock (TR34_KEY_BLOCK). Import token is not required for TR-31, root public key cerificate or trusted public key certificate. + /// The method to use for key material import. Import token is only required for TR-34 WrappedKeyBlock (TR34_KEY_BLOCK) and RSA WrappedKeyCryptogram (KEY_CRYPTOGRAM). Import token is not required for TR-31, root public key cerificate or trusted public key certificate. /// This member is required. public var keyMaterialType: PaymentCryptographyClientTypes.KeyMaterialType? - /// The wrapping key algorithm to generate a wrapping key certificate. This certificate wraps the key under import. At this time, RSA_2048, RSA_3072, RSA_4096 are the only allowed algorithms for TR-34 WrappedKeyBlock import. + /// The wrapping key algorithm to generate a wrapping key certificate. This certificate wraps the key under import. At this time, RSA_2048 is the allowed algorithm for TR-34 WrappedKeyBlock import. Additionally, RSA_2048, RSA_3072, RSA_4096 are the allowed algorithms for RSA WrappedKeyCryptogram import. /// This member is required. public var wrappingKeyAlgorithm: PaymentCryptographyClientTypes.KeyAlgorithm? @@ -1488,7 +1560,7 @@ public struct GetParametersForImportOutput: Swift.Equatable { /// The validity period of the import token. /// This member is required. public var parametersValidUntilTimestamp: ClientRuntime.Date? - /// The algorithm of the wrapping key for use within TR-34 WrappedKeyBlock. + /// The algorithm of the wrapping key for use within TR-34 WrappedKeyBlock or RSA WrappedKeyCryptogram. /// This member is required. public var wrappingKeyAlgorithm: PaymentCryptographyClientTypes.KeyAlgorithm? /// The wrapping key certificate in PEM format (base64 encoded) of the wrapping key for use within the TR-34 key block. The certificate expires in 7 days. @@ -1685,6 +1757,85 @@ enum GetPublicKeyCertificateOutputError: ClientRuntime.HttpResponseErrorBinding } } +extension PaymentCryptographyClientTypes.ImportKeyCryptogram: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case exportable = "Exportable" + case importToken = "ImportToken" + case keyAttributes = "KeyAttributes" + case wrappedKeyCryptogram = "WrappedKeyCryptogram" + case wrappingSpec = "WrappingSpec" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let exportable = self.exportable { + try encodeContainer.encode(exportable, forKey: .exportable) + } + if let importToken = self.importToken { + try encodeContainer.encode(importToken, forKey: .importToken) + } + if let keyAttributes = self.keyAttributes { + try encodeContainer.encode(keyAttributes, forKey: .keyAttributes) + } + if let wrappedKeyCryptogram = self.wrappedKeyCryptogram { + try encodeContainer.encode(wrappedKeyCryptogram, forKey: .wrappedKeyCryptogram) + } + if let wrappingSpec = self.wrappingSpec { + try encodeContainer.encode(wrappingSpec.rawValue, forKey: .wrappingSpec) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let keyAttributesDecoded = try containerValues.decodeIfPresent(PaymentCryptographyClientTypes.KeyAttributes.self, forKey: .keyAttributes) + keyAttributes = keyAttributesDecoded + let exportableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .exportable) + exportable = exportableDecoded + let wrappedKeyCryptogramDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .wrappedKeyCryptogram) + wrappedKeyCryptogram = wrappedKeyCryptogramDecoded + let importTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importToken) + importToken = importTokenDecoded + let wrappingSpecDecoded = try containerValues.decodeIfPresent(PaymentCryptographyClientTypes.WrappingKeySpec.self, forKey: .wrappingSpec) + wrappingSpec = wrappingSpecDecoded + } +} + +extension PaymentCryptographyClientTypes { + /// Parameter information for key material import using asymmetric RSA wrap and unwrap key exchange method. + public struct ImportKeyCryptogram: Swift.Equatable { + /// Specifies whether the key is exportable from the service. + /// This member is required. + public var exportable: Swift.Bool? + /// The import token that initiates key import using the asymmetric RSA wrap and unwrap key exchange method into AWS Payment Cryptography. It expires after 7 days. You can use the same import token to import multiple keys to the same service account. + /// This member is required. + public var importToken: Swift.String? + /// The role of the key, the algorithm it supports, and the cryptographic operations allowed with the key. This data is immutable after the key is created. + /// This member is required. + public var keyAttributes: PaymentCryptographyClientTypes.KeyAttributes? + /// The RSA wrapped key cryptogram under import. + /// This member is required. + public var wrappedKeyCryptogram: Swift.String? + /// The wrapping spec for the wrapped key cryptogram. + public var wrappingSpec: PaymentCryptographyClientTypes.WrappingKeySpec? + + public init( + exportable: Swift.Bool? = nil, + importToken: Swift.String? = nil, + keyAttributes: PaymentCryptographyClientTypes.KeyAttributes? = nil, + wrappedKeyCryptogram: Swift.String? = nil, + wrappingSpec: PaymentCryptographyClientTypes.WrappingKeySpec? = nil + ) + { + self.exportable = exportable + self.importToken = importToken + self.keyAttributes = keyAttributes + self.wrappedKeyCryptogram = wrappedKeyCryptogram + self.wrappingSpec = wrappingSpec + } + } + +} + extension ImportKeyInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enabled = "Enabled" @@ -1783,6 +1934,7 @@ extension ImportKeyInputBody: Swift.Decodable { extension PaymentCryptographyClientTypes.ImportKeyMaterial: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case keycryptogram = "KeyCryptogram" case rootcertificatepublickey = "RootCertificatePublicKey" case tr31keyblock = "Tr31KeyBlock" case tr34keyblock = "Tr34KeyBlock" @@ -1793,6 +1945,8 @@ extension PaymentCryptographyClientTypes.ImportKeyMaterial: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) switch self { + case let .keycryptogram(keycryptogram): + try container.encode(keycryptogram, forKey: .keycryptogram) case let .rootcertificatepublickey(rootcertificatepublickey): try container.encode(rootcertificatepublickey, forKey: .rootcertificatepublickey) case let .tr31keyblock(tr31keyblock): @@ -1828,12 +1982,17 @@ extension PaymentCryptographyClientTypes.ImportKeyMaterial: Swift.Codable { self = .tr34keyblock(tr34keyblock) return } + let keycryptogramDecoded = try values.decodeIfPresent(PaymentCryptographyClientTypes.ImportKeyCryptogram.self, forKey: .keycryptogram) + if let keycryptogram = keycryptogramDecoded { + self = .keycryptogram(keycryptogram) + return + } self = .sdkUnknown("") } } extension PaymentCryptographyClientTypes { - /// Parameter information for key material import into Amazon Web Services Payment Cryptography using TR-31 or TR-34 key exchange method. + /// Parameter information for key material import into Amazon Web Services Payment Cryptography using TR-31 or TR-34 or RSA wrap and unwrap key exchange method. public enum ImportKeyMaterial: Swift.Equatable { /// Parameter information for root public key certificate import. case rootcertificatepublickey(PaymentCryptographyClientTypes.RootCertificatePublicKey) @@ -1843,6 +2002,8 @@ extension PaymentCryptographyClientTypes { case tr31keyblock(PaymentCryptographyClientTypes.ImportTr31KeyBlock) /// Parameter information for key material import using the asymmetric TR-34 key exchange method. case tr34keyblock(PaymentCryptographyClientTypes.ImportTr34KeyBlock) + /// Parameter information for key material import using asymmetric RSA wrap and unwrap key exchange method. + case keycryptogram(PaymentCryptographyClientTypes.ImportKeyCryptogram) case sdkUnknown(Swift.String) } @@ -2459,6 +2620,7 @@ extension PaymentCryptographyClientTypes { extension PaymentCryptographyClientTypes { public enum KeyMaterialType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case keyCryptogram case rootPublicKeyCertificate case tr31KeyBlock case tr34KeyBlock @@ -2467,6 +2629,7 @@ extension PaymentCryptographyClientTypes { public static var allCases: [KeyMaterialType] { return [ + .keyCryptogram, .rootPublicKeyCertificate, .tr31KeyBlock, .tr34KeyBlock, @@ -2480,6 +2643,7 @@ extension PaymentCryptographyClientTypes { } public var rawValue: Swift.String { switch self { + case .keyCryptogram: return "KEY_CRYPTOGRAM" case .rootPublicKeyCertificate: return "ROOT_PUBLIC_KEY_CERTIFICATE" case .tr31KeyBlock: return "TR31_KEY_BLOCK" case .tr34KeyBlock: return "TR34_KEY_BLOCK" @@ -2789,6 +2953,7 @@ extension PaymentCryptographyClientTypes { case tr31K1KeyBlockProtectionKey case tr31K2Tr34AsymmetricKey case tr31K3AsymmetricKeyForKeyAgreement + case tr31M1Iso97971MacKey case tr31M3Iso97973MacKey case tr31M6Iso97975CmacKey case tr31M7HmacKey @@ -2815,6 +2980,7 @@ extension PaymentCryptographyClientTypes { .tr31K1KeyBlockProtectionKey, .tr31K2Tr34AsymmetricKey, .tr31K3AsymmetricKeyForKeyAgreement, + .tr31M1Iso97971MacKey, .tr31M3Iso97973MacKey, .tr31M6Iso97975CmacKey, .tr31M7HmacKey, @@ -2846,6 +3012,7 @@ extension PaymentCryptographyClientTypes { case .tr31K1KeyBlockProtectionKey: return "TR31_K1_KEY_BLOCK_PROTECTION_KEY" case .tr31K2Tr34AsymmetricKey: return "TR31_K2_TR34_ASYMMETRIC_KEY" case .tr31K3AsymmetricKeyForKeyAgreement: return "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT" + case .tr31M1Iso97971MacKey: return "TR31_M1_ISO_9797_1_MAC_KEY" case .tr31M3Iso97973MacKey: return "TR31_M3_ISO_9797_3_MAC_KEY" case .tr31M6Iso97975CmacKey: return "TR31_M6_ISO_9797_5_CMAC_KEY" case .tr31M7HmacKey: return "TR31_M7_HMAC_KEY" @@ -4518,3 +4685,35 @@ extension PaymentCryptographyClientTypes { } } } + +extension PaymentCryptographyClientTypes { + public enum WrappingKeySpec: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case rsaOaepSha256 + case rsaOaepSha512 + case sdkUnknown(Swift.String) + + public static var allCases: [WrappingKeySpec] { + return [ + .rsaOaepSha256, + .rsaOaepSha512, + .sdkUnknown("") + ] + } + 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 .rsaOaepSha256: return "RSA_OAEP_SHA_256" + case .rsaOaepSha512: return "RSA_OAEP_SHA_512" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = WrappingKeySpec(rawValue: rawValue) ?? WrappingKeySpec.sdkUnknown(rawValue) + } + } +} diff --git a/Sources/Services/AWSPersonalize/PersonalizeClient.swift b/Sources/Services/AWSPersonalize/PersonalizeClient.swift index 07fb8fd8bdd..fdf089b00ba 100644 --- a/Sources/Services/AWSPersonalize/PersonalizeClient.swift +++ b/Sources/Services/AWSPersonalize/PersonalizeClient.swift @@ -173,7 +173,7 @@ extension PersonalizeClient: PersonalizeClientProtocol { /// Performs the `CreateCampaign` operation on the `AmazonPersonalize` service. /// - /// Creates a campaign that deploys a solution version. When a client calls the [GetRecommendations](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) and [GetPersonalizedRanking](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetPersonalizedRanking.html) APIs, a campaign is specified in the request. Minimum Provisioned TPS and Auto-Scaling A high minProvisionedTPS will increase your bill. We recommend starting with 1 for minProvisionedTPS (the default). Track your usage using Amazon CloudWatch metrics, and increase the minProvisionedTPS as necessary. A transaction is a single GetRecommendations or GetPersonalizedRanking call. Transactions per second (TPS) is the throughput and unit of billing for Amazon Personalize. The minimum provisioned TPS (minProvisionedTPS) specifies the baseline throughput provisioned by Amazon Personalize, and thus, the minimum billing charge. If your TPS increases beyond minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS. There's a short time delay while the capacity is increased that might cause loss of transactions. The actual TPS used is calculated as the average requests/second within a 5-minute window. You pay for maximum of either the minimum provisioned TPS or the actual TPS. We recommend starting with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary. Status A campaign can be in one of the following states: + /// Creates a campaign that deploys a solution version. When a client calls the [GetRecommendations](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) and [GetPersonalizedRanking](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetPersonalizedRanking.html) APIs, a campaign is specified in the request. Minimum Provisioned TPS and Auto-Scaling A high minProvisionedTPS will increase your cost. We recommend starting with 1 for minProvisionedTPS (the default). Track your usage using Amazon CloudWatch metrics, and increase the minProvisionedTPS as necessary. When you create an Amazon Personalize campaign, you can specify the minimum provisioned transactions per second (minProvisionedTPS) for the campaign. This is the baseline transaction throughput for the campaign provisioned by Amazon Personalize. It sets the minimum billing charge for the campaign while it is active. A transaction is a single GetRecommendations or GetPersonalizedRanking request. The default minProvisionedTPS is 1. If your TPS increases beyond the minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS. There's a short time delay while the capacity is increased that might cause loss of transactions. When your traffic reduces, capacity returns to the minProvisionedTPS. You are charged for the the minimum provisioned TPS or, if your requests exceed the minProvisionedTPS, the actual TPS. The actual TPS is the total number of recommendation requests you make. We recommend starting with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary. For more information about campaign costs, see [Amazon Personalize pricing](https://aws.amazon.com/personalize/pricing/). Status A campaign can be in one of the following states: /// /// * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED /// diff --git a/Sources/Services/AWSPersonalize/PersonalizeClientProtocol.swift b/Sources/Services/AWSPersonalize/PersonalizeClientProtocol.swift index 0a41483e8dd..ce742d8eb47 100644 --- a/Sources/Services/AWSPersonalize/PersonalizeClientProtocol.swift +++ b/Sources/Services/AWSPersonalize/PersonalizeClientProtocol.swift @@ -42,7 +42,7 @@ public protocol PersonalizeClientProtocol { func createBatchSegmentJob(input: CreateBatchSegmentJobInput) async throws -> CreateBatchSegmentJobOutput /// Performs the `CreateCampaign` operation on the `AmazonPersonalize` service. /// - /// Creates a campaign that deploys a solution version. When a client calls the [GetRecommendations](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) and [GetPersonalizedRanking](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetPersonalizedRanking.html) APIs, a campaign is specified in the request. Minimum Provisioned TPS and Auto-Scaling A high minProvisionedTPS will increase your bill. We recommend starting with 1 for minProvisionedTPS (the default). Track your usage using Amazon CloudWatch metrics, and increase the minProvisionedTPS as necessary. A transaction is a single GetRecommendations or GetPersonalizedRanking call. Transactions per second (TPS) is the throughput and unit of billing for Amazon Personalize. The minimum provisioned TPS (minProvisionedTPS) specifies the baseline throughput provisioned by Amazon Personalize, and thus, the minimum billing charge. If your TPS increases beyond minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS. There's a short time delay while the capacity is increased that might cause loss of transactions. The actual TPS used is calculated as the average requests/second within a 5-minute window. You pay for maximum of either the minimum provisioned TPS or the actual TPS. We recommend starting with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary. Status A campaign can be in one of the following states: + /// Creates a campaign that deploys a solution version. When a client calls the [GetRecommendations](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) and [GetPersonalizedRanking](https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetPersonalizedRanking.html) APIs, a campaign is specified in the request. Minimum Provisioned TPS and Auto-Scaling A high minProvisionedTPS will increase your cost. We recommend starting with 1 for minProvisionedTPS (the default). Track your usage using Amazon CloudWatch metrics, and increase the minProvisionedTPS as necessary. When you create an Amazon Personalize campaign, you can specify the minimum provisioned transactions per second (minProvisionedTPS) for the campaign. This is the baseline transaction throughput for the campaign provisioned by Amazon Personalize. It sets the minimum billing charge for the campaign while it is active. A transaction is a single GetRecommendations or GetPersonalizedRanking request. The default minProvisionedTPS is 1. If your TPS increases beyond the minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS. There's a short time delay while the capacity is increased that might cause loss of transactions. When your traffic reduces, capacity returns to the minProvisionedTPS. You are charged for the the minimum provisioned TPS or, if your requests exceed the minProvisionedTPS, the actual TPS. The actual TPS is the total number of recommendation requests you make. We recommend starting with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary. For more information about campaign costs, see [Amazon Personalize pricing](https://aws.amazon.com/personalize/pricing/). Status A campaign can be in one of the following states: /// /// * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED /// diff --git a/Sources/Services/AWSPersonalize/models/Models.swift b/Sources/Services/AWSPersonalize/models/Models.swift index 48ce63063df..2048f8667fb 100644 --- a/Sources/Services/AWSPersonalize/models/Models.swift +++ b/Sources/Services/AWSPersonalize/models/Models.swift @@ -1233,7 +1233,7 @@ extension PersonalizeClientTypes.CampaignConfig: Swift.Codable { extension PersonalizeClientTypes { /// The configuration details of a campaign. public struct CampaignConfig: Swift.Equatable { - /// Whether metadata with recommendations is enabled for the campaign. If enabled, you can specify the columns from your Items dataset in your request for recommendations. Amazon Personalize returns this data for each item in the recommendation response. If you enable metadata in recommendations, you will incur additional costs. For more information, see [Amazon Personalize pricing](https://aws.amazon.com/personalize/pricing/). + /// Whether metadata with recommendations is enabled for the campaign. If enabled, you can specify the columns from your Items dataset in your request for recommendations. Amazon Personalize returns this data for each item in the recommendation response. For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-return-metadata). If you enable metadata in recommendations, you will incur additional costs. For more information, see [Amazon Personalize pricing](https://aws.amazon.com/personalize/pricing/). public var enableMetadataWithRecommendations: Swift.Bool? /// Specifies the exploration configuration hyperparameters, including explorationWeight and explorationItemAgeCutOff, you want to use to configure the amount of item exploration Amazon Personalize uses when recommending items. Provide itemExplorationConfig data only if your solution uses the [User-Personalization](https://docs.aws.amazon.com/personalize/latest/dg/native-recipe-new-item-USER_PERSONALIZATION.html) recipe. public var itemExplorationConfig: [Swift.String:Swift.String]? @@ -3696,11 +3696,11 @@ public struct CreateSolutionInput: Swift.Equatable { /// The name for the solution. /// This member is required. public var name: Swift.String? - /// We don't recommend enabling automated machine learning. Instead, match your use case to the available Amazon Personalize recipes. For more information, see [Determining your use case.](https://docs.aws.amazon.com/personalize/latest/dg/determining-use-case.html) Whether to perform automated machine learning (AutoML). The default is false. For this case, you must specify recipeArn. When set to true, Amazon Personalize analyzes your training data and selects the optimal USER_PERSONALIZATION recipe and hyperparameters. In this case, you must omit recipeArn. Amazon Personalize determines the optimal recipe by running tests with different values for the hyperparameters. AutoML lengthens the training process as compared to selecting a specific recipe. + /// We don't recommend enabling automated machine learning. Instead, match your use case to the available Amazon Personalize recipes. For more information, see [Choosing a recipe](https://docs.aws.amazon.com/personalize/latest/dg/working-with-predefined-recipes.html). Whether to perform automated machine learning (AutoML). The default is false. For this case, you must specify recipeArn. When set to true, Amazon Personalize analyzes your training data and selects the optimal USER_PERSONALIZATION recipe and hyperparameters. In this case, you must omit recipeArn. Amazon Personalize determines the optimal recipe by running tests with different values for the hyperparameters. AutoML lengthens the training process as compared to selecting a specific recipe. public var performAutoML: Swift.Bool? /// Whether to perform hyperparameter optimization (HPO) on the specified or selected recipe. The default is false. When performing AutoML, this parameter is always true and you should not set it to false. public var performHPO: Swift.Bool? - /// The ARN of the recipe to use for model training. This is required when performAutoML is false. + /// The Amazon Resource Name (ARN) of the recipe to use for model training. This is required when performAutoML is false. For information about different Amazon Personalize recipes and their ARNs, see [Choosing a recipe](https://docs.aws.amazon.com/personalize/latest/dg/working-with-predefined-recipes.html). public var recipeArn: Swift.String? /// The configuration to use with the solution. When performAutoML is set to true, Amazon Personalize only evaluates the autoMLConfig section of the solution configuration. Amazon Personalize doesn't support configuring the hpoObjective at this time. public var solutionConfig: PersonalizeClientTypes.SolutionConfig? @@ -12244,7 +12244,7 @@ extension PersonalizeClientTypes.RecommenderConfig: Swift.Codable { extension PersonalizeClientTypes { /// The configuration details of the recommender. public struct RecommenderConfig: Swift.Equatable { - /// Whether metadata with recommendations is enabled for the recommender. If enabled, you can specify the columns from your Items dataset in your request for recommendations. Amazon Personalize returns this data for each item in the recommendation response. If you enable metadata in recommendations, you will incur additional costs. For more information, see [Amazon Personalize pricing](https://aws.amazon.com/personalize/pricing/). + /// Whether metadata with recommendations is enabled for the recommender. If enabled, you can specify the columns from your Items dataset in your request for recommendations. Amazon Personalize returns this data for each item in the recommendation response. For information about enabling metadata for a recommender, see [Enabling metadata in recommendations for a recommender](https://docs.aws.amazon.com/personalize/latest/dg/creating-recommenders.html#create-recommender-return-metadata). If you enable metadata in recommendations, you will incur additional costs. For more information, see [Amazon Personalize pricing](https://aws.amazon.com/personalize/pricing/). public var enableMetadataWithRecommendations: Swift.Bool? /// Specifies the exploration configuration hyperparameters, including explorationWeight and explorationItemAgeCutOff, you want to use to configure the amount of item exploration Amazon Personalize uses when recommending items. Provide itemExplorationConfig data only if your recommenders generate personalized recommendations for a user (not popular items or similar items). public var itemExplorationConfig: [Swift.String:Swift.String]? diff --git a/Sources/Services/AWSPersonalizeRuntime/models/Models.swift b/Sources/Services/AWSPersonalizeRuntime/models/Models.swift index 4307795221e..38b4f9658b6 100644 --- a/Sources/Services/AWSPersonalizeRuntime/models/Models.swift +++ b/Sources/Services/AWSPersonalizeRuntime/models/Models.swift @@ -251,7 +251,7 @@ public struct GetPersonalizedRankingInput: Swift.Equatable { /// A list of items (by itemId) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. If you are including metadata in recommendations, the maximum is 50. Otherwise, the maximum is 500. /// This member is required. public var inputList: [Swift.String]? - /// If you enabled metadata in recommendations when you created or updated the campaign, specify metadata columns from your Items dataset to include in the personalized ranking. The map key is ITEMS and the value is a list of column names from your Items dataset. The maximum number of columns you can provide is 10. For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html). + /// If you enabled metadata in recommendations when you created or updated the campaign, specify metadata columns from your Items dataset to include in the personalized ranking. The map key is ITEMS and the value is a list of column names from your Items dataset. The maximum number of columns you can provide is 10. For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-return-metadata). public var metadataColumns: [Swift.String:[Swift.String]]? /// The user for which you want the campaign to provide a personalized ranking. /// This member is required. @@ -512,7 +512,7 @@ public struct GetRecommendationsInput: Swift.Equatable { public var filterValues: [Swift.String:Swift.String]? /// The item ID to provide recommendations for. Required for RELATED_ITEMS recipe type. public var itemId: Swift.String? - /// If you enabled metadata in recommendations when you created or updated the campaign or recommender, specify the metadata columns from your Items dataset to include in item recommendations. The map key is ITEMS and the value is a list of column names from your Items dataset. The maximum number of columns you can provide is 10. For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html). For information about enabling metadata for a recommender, see [Enabling metadata in recommendations for a recommender](https://docs.aws.amazon.com/personalize/latest/dg/create-recommender-return-metadata.html). + /// If you enabled metadata in recommendations when you created or updated the campaign or recommender, specify the metadata columns from your Items dataset to include in item recommendations. The map key is ITEMS and the value is a list of column names from your Items dataset. The maximum number of columns you can provide is 10. For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-return-metadata). For information about enabling metadata for a recommender, see [Enabling metadata in recommendations for a recommender](https://docs.aws.amazon.com/personalize/latest/dg/creating-recommenders.html#create-recommender-return-metadata). public var metadataColumns: [Swift.String:[Swift.String]]? /// The number of results to return. The default is 25. If you are including metadata in recommendations, the maximum is 50. Otherwise, the maximum is 500. public var numResults: Swift.Int? diff --git a/Sources/Services/AWSQConnect/QConnectClient.swift b/Sources/Services/AWSQConnect/QConnectClient.swift index c49fa21db32..e06bb0ccac4 100644 --- a/Sources/Services/AWSQConnect/QConnectClient.swift +++ b/Sources/Services/AWSQConnect/QConnectClient.swift @@ -967,6 +967,7 @@ extension QConnectClient: QConnectClientProtocol { /// Performs the `GetRecommendations` operation on the `WisdomService` service. /// /// Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use [NotifyRecommendationsReceived](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_NotifyRecommendationsReceived.html). This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use [QueryAssistant](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_QueryAssistant.html). + @available(*, deprecated, message: "GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter GetRecommendationsInput : [no documentation found] /// @@ -1470,6 +1471,7 @@ extension QConnectClient: QConnectClientProtocol { /// Performs the `QueryAssistant` operation on the `WisdomService` service. /// /// Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use [GetRecommendations](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_GetRecommendations.html). + @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter QueryAssistantInput : [no documentation found] /// diff --git a/Sources/Services/AWSQConnect/QConnectClientProtocol.swift b/Sources/Services/AWSQConnect/QConnectClientProtocol.swift index dfa7f6d6fe1..d524695badd 100644 --- a/Sources/Services/AWSQConnect/QConnectClientProtocol.swift +++ b/Sources/Services/AWSQConnect/QConnectClientProtocol.swift @@ -310,6 +310,7 @@ public protocol QConnectClientProtocol { /// Performs the `GetRecommendations` operation on the `WisdomService` service. /// /// Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use [NotifyRecommendationsReceived](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_NotifyRecommendationsReceived.html). This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use [QueryAssistant](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_QueryAssistant.html). + @available(*, deprecated, message: "GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter GetRecommendationsInput : [no documentation found] /// @@ -470,6 +471,7 @@ public protocol QConnectClientProtocol { /// Performs the `QueryAssistant` operation on the `WisdomService` service. /// /// Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use [GetRecommendations](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_GetRecommendations.html). + @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter QueryAssistantInput : [no documentation found] /// diff --git a/Sources/Services/AWSQuickSight/QuickSightClient.swift b/Sources/Services/AWSQuickSight/QuickSightClient.swift index f50eaab3de3..6ab52908b83 100644 --- a/Sources/Services/AWSQuickSight/QuickSightClient.swift +++ b/Sources/Services/AWSQuickSight/QuickSightClient.swift @@ -7323,6 +7323,7 @@ extension QuickSightClient: QuickSightClientProtocol { /// - `InvalidParameterValueException` : One or more parameters has a value that isn't valid. /// - `ResourceNotFoundException` : One or more resources can't be found. /// - `ThrottlingException` : Access is throttled. + /// - `UnsupportedUserEditionException` : This error indicates that you are calling an operation on an Amazon QuickSight subscription where the edition doesn't include support for that operation. Amazon Amazon QuickSight currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition. public func updateDashboardLinks(input: UpdateDashboardLinksInput) async throws -> UpdateDashboardLinksOutput { let context = ClientRuntime.HttpContextBuilder() diff --git a/Sources/Services/AWSQuickSight/QuickSightClientProtocol.swift b/Sources/Services/AWSQuickSight/QuickSightClientProtocol.swift index 06a30fd2749..acabdb657e5 100644 --- a/Sources/Services/AWSQuickSight/QuickSightClientProtocol.swift +++ b/Sources/Services/AWSQuickSight/QuickSightClientProtocol.swift @@ -2780,6 +2780,7 @@ public protocol QuickSightClientProtocol { /// - `InvalidParameterValueException` : One or more parameters has a value that isn't valid. /// - `ResourceNotFoundException` : One or more resources can't be found. /// - `ThrottlingException` : Access is throttled. + /// - `UnsupportedUserEditionException` : This error indicates that you are calling an operation on an Amazon QuickSight subscription where the edition doesn't include support for that operation. Amazon Amazon QuickSight currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition. func updateDashboardLinks(input: UpdateDashboardLinksInput) async throws -> UpdateDashboardLinksOutput /// Performs the `UpdateDashboardPermissions` operation on the `QuickSight_20180401` service. /// diff --git a/Sources/Services/AWSQuickSight/models/Models.swift b/Sources/Services/AWSQuickSight/models/Models.swift index 46b3de3f12c..b5c969dff8e 100644 --- a/Sources/Services/AWSQuickSight/models/Models.swift +++ b/Sources/Services/AWSQuickSight/models/Models.swift @@ -76253,6 +76253,7 @@ extension QuickSightClientTypes.TopicDetails: Swift.Codable { case dataSets = "DataSets" case description = "Description" case name = "Name" + case userExperienceVersion = "UserExperienceVersion" } public func encode(to encoder: Swift.Encoder) throws { @@ -76269,6 +76270,9 @@ extension QuickSightClientTypes.TopicDetails: Swift.Codable { if let name = self.name { try encodeContainer.encode(name, forKey: .name) } + if let userExperienceVersion = self.userExperienceVersion { + try encodeContainer.encode(userExperienceVersion.rawValue, forKey: .userExperienceVersion) + } } public init(from decoder: Swift.Decoder) throws { @@ -76277,6 +76281,8 @@ extension QuickSightClientTypes.TopicDetails: Swift.Codable { name = nameDecoded let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) description = descriptionDecoded + let userExperienceVersionDecoded = try containerValues.decodeIfPresent(QuickSightClientTypes.TopicUserExperienceVersion.self, forKey: .userExperienceVersion) + userExperienceVersion = userExperienceVersionDecoded let dataSetsContainer = try containerValues.decodeIfPresent([QuickSightClientTypes.DatasetMetadata?].self, forKey: .dataSets) var dataSetsDecoded0:[QuickSightClientTypes.DatasetMetadata]? = nil if let dataSetsContainer = dataSetsContainer { @@ -76300,16 +76306,20 @@ extension QuickSightClientTypes { public var description: Swift.String? /// The name of the topic. public var name: Swift.String? + /// The user experience version of a topic. + public var userExperienceVersion: QuickSightClientTypes.TopicUserExperienceVersion? public init( dataSets: [QuickSightClientTypes.DatasetMetadata]? = nil, description: Swift.String? = nil, - name: Swift.String? = nil + name: Swift.String? = nil, + userExperienceVersion: QuickSightClientTypes.TopicUserExperienceVersion? = nil ) { self.dataSets = dataSets self.description = description self.name = name + self.userExperienceVersion = userExperienceVersion } } @@ -77300,6 +77310,38 @@ extension QuickSightClientTypes { } } +extension QuickSightClientTypes { + public enum TopicUserExperienceVersion: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case legacy + case newReaderExperience + case sdkUnknown(Swift.String) + + public static var allCases: [TopicUserExperienceVersion] { + return [ + .legacy, + .newReaderExperience, + .sdkUnknown("") + ] + } + 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 .legacy: return "LEGACY" + case .newReaderExperience: return "NEW_READER_EXPERIENCE" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = TopicUserExperienceVersion(rawValue: rawValue) ?? TopicUserExperienceVersion.sdkUnknown(rawValue) + } + } +} + extension QuickSightClientTypes.TotalAggregationComputation: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case computationId = "ComputationId" @@ -79975,6 +80017,7 @@ enum UpdateDashboardLinksOutputError: ClientRuntime.HttpResponseErrorBinding { case "InvalidParameterValueException": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnsupportedUserEditionException": return try await UnsupportedUserEditionException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } diff --git a/Sources/Services/AWSRDS/RDSClient.swift b/Sources/Services/AWSRDS/RDSClient.swift index 3dd2ba5a1e0..5d86a111e30 100644 --- a/Sources/Services/AWSRDS/RDSClient.swift +++ b/Sources/Services/AWSRDS/RDSClient.swift @@ -4724,6 +4724,53 @@ extension RDSClient: RDSClientProtocol { return result } + /// Performs the `DisableHttpEndpoint` operation on the `AmazonRDSv19` service. + /// + /// Disables the HTTP endpoint for the specified DB cluster. Disabling this endpoint disables RDS Data API. For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. This operation applies only to Aurora PostgreSQL Serverless v2 and provisioned DB clusters. To disable the HTTP endpoint for Aurora Serverless v1 DB clusters, use the EnableHttpEndpoint parameter of the ModifyDBCluster operation. + /// + /// - Parameter DisableHttpEndpointInput : [no documentation found] + /// + /// - Returns: `DisableHttpEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidResourceStateFault` : The operation can't be performed because another operation is in progress. + /// - `ResourceNotFoundFault` : The specified resource ID was not found. + public func disableHttpEndpoint(input: DisableHttpEndpointInput) async throws -> DisableHttpEndpointOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "disableHttpEndpoint") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "rds") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "disableHttpEndpoint") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.FormURLReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: FormURLReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableHttpEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `DownloadDBLogFilePortion` operation on the `AmazonRDSv19` service. /// /// Downloads all or a portion of the specified log file, up to 1 MB in size. This command doesn't apply to RDS Custom. @@ -4771,6 +4818,53 @@ extension RDSClient: RDSClientProtocol { return result } + /// Performs the `EnableHttpEndpoint` operation on the `AmazonRDSv19` service. + /// + /// Enables the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled. When enabled, this endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the Aurora DB cluster. You can also query your database from inside the RDS console with the RDS query editor. For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. This operation applies only to Aurora PostgreSQL Serverless v2 and provisioned DB clusters. To enable the HTTP endpoint for Aurora Serverless v1 DB clusters, use the EnableHttpEndpoint parameter of the ModifyDBCluster operation. + /// + /// - Parameter EnableHttpEndpointInput : [no documentation found] + /// + /// - Returns: `EnableHttpEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidResourceStateFault` : The operation can't be performed because another operation is in progress. + /// - `ResourceNotFoundFault` : The specified resource ID was not found. + public func enableHttpEndpoint(input: EnableHttpEndpointInput) async throws -> EnableHttpEndpointOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "enableHttpEndpoint") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "rds") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "enableHttpEndpoint") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.FormURLReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: FormURLReadWrite.writingClosure())) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableHttpEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + /// Performs the `FailoverDBCluster` operation on the `AmazonRDSv19` service. /// /// Forces a failover for a DB cluster. For an Aurora DB cluster, failover for a DB cluster promotes one of the Aurora Replicas (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer). For a Multi-AZ DB cluster, failover for a DB cluster promotes one of the readable standby DB instances (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer). An Amazon Aurora DB cluster automatically fails over to an Aurora Replica, if one exists, when the primary DB instance fails. A Multi-AZ DB cluster automatically fails over to a readable standby DB instance when the primary DB instance fails. To simulate a failure of a primary instance for testing, you can force a failover. Because each instance in a DB cluster has its own endpoint address, make sure to clean up and re-establish any existing connections that use those endpoint addresses when the failover is complete. For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the Amazon RDS User Guide. diff --git a/Sources/Services/AWSRDS/RDSClientProtocol.swift b/Sources/Services/AWSRDS/RDSClientProtocol.swift index bccc39fe5d3..a5978619c11 100644 --- a/Sources/Services/AWSRDS/RDSClientProtocol.swift +++ b/Sources/Services/AWSRDS/RDSClientProtocol.swift @@ -1479,6 +1479,20 @@ public protocol RDSClientProtocol { /// - `DBInstanceNotFoundFault` : DBInstanceIdentifier doesn't refer to an existing DB instance. /// - `InvalidDBInstanceStateFault` : The DB instance isn't in a valid state. func describeValidDBInstanceModifications(input: DescribeValidDBInstanceModificationsInput) async throws -> DescribeValidDBInstanceModificationsOutput + /// Performs the `DisableHttpEndpoint` operation on the `AmazonRDSv19` service. + /// + /// Disables the HTTP endpoint for the specified DB cluster. Disabling this endpoint disables RDS Data API. For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. This operation applies only to Aurora PostgreSQL Serverless v2 and provisioned DB clusters. To disable the HTTP endpoint for Aurora Serverless v1 DB clusters, use the EnableHttpEndpoint parameter of the ModifyDBCluster operation. + /// + /// - Parameter DisableHttpEndpointInput : [no documentation found] + /// + /// - Returns: `DisableHttpEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidResourceStateFault` : The operation can't be performed because another operation is in progress. + /// - `ResourceNotFoundFault` : The specified resource ID was not found. + func disableHttpEndpoint(input: DisableHttpEndpointInput) async throws -> DisableHttpEndpointOutput /// Performs the `DownloadDBLogFilePortion` operation on the `AmazonRDSv19` service. /// /// Downloads all or a portion of the specified log file, up to 1 MB in size. This command doesn't apply to RDS Custom. @@ -1493,6 +1507,20 @@ public protocol RDSClientProtocol { /// - `DBInstanceNotFoundFault` : DBInstanceIdentifier doesn't refer to an existing DB instance. /// - `DBLogFileNotFoundFault` : LogFileName doesn't refer to an existing DB log file. func downloadDBLogFilePortion(input: DownloadDBLogFilePortionInput) async throws -> DownloadDBLogFilePortionOutput + /// Performs the `EnableHttpEndpoint` operation on the `AmazonRDSv19` service. + /// + /// Enables the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled. When enabled, this endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the Aurora DB cluster. You can also query your database from inside the RDS console with the RDS query editor. For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. This operation applies only to Aurora PostgreSQL Serverless v2 and provisioned DB clusters. To enable the HTTP endpoint for Aurora Serverless v1 DB clusters, use the EnableHttpEndpoint parameter of the ModifyDBCluster operation. + /// + /// - Parameter EnableHttpEndpointInput : [no documentation found] + /// + /// - Returns: `EnableHttpEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidResourceStateFault` : The operation can't be performed because another operation is in progress. + /// - `ResourceNotFoundFault` : The specified resource ID was not found. + func enableHttpEndpoint(input: EnableHttpEndpointInput) async throws -> EnableHttpEndpointOutput /// Performs the `FailoverDBCluster` operation on the `AmazonRDSv19` service. /// /// Forces a failover for a DB cluster. For an Aurora DB cluster, failover for a DB cluster promotes one of the Aurora Replicas (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer). For a Multi-AZ DB cluster, failover for a DB cluster promotes one of the readable standby DB instances (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer). An Amazon Aurora DB cluster automatically fails over to an Aurora Replica, if one exists, when the primary DB instance fails. A Multi-AZ DB cluster automatically fails over to a readable standby DB instance when the primary DB instance fails. To simulate a failure of a primary instance for testing, you can force a failover. Because each instance in a DB cluster has its own endpoint address, make sure to clean up and re-establish any existing connections that use those endpoint addresses when the failover is complete. For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the Amazon RDS User Guide. diff --git a/Sources/Services/AWSRDS/models/Models.swift b/Sources/Services/AWSRDS/models/Models.swift index 99abeafb0de..d3b95ee8b2f 100644 --- a/Sources/Services/AWSRDS/models/Models.swift +++ b/Sources/Services/AWSRDS/models/Models.swift @@ -5580,7 +5580,14 @@ public struct CreateDBClusterInput: Swift.Equatable { public var enableCloudwatchLogsExports: [Swift.String]? /// Specifies whether to enable this DB cluster to forward write operations to the primary cluster of a global cluster (Aurora global database). By default, write operations are not allowed on Aurora DB clusters that are secondary clusters in an Aurora global database. You can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter enabled, a secondary cluster can forward writes to the current primary cluster, and the resulting changes are replicated back to this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the primary is demoted by a global cluster API operation, but it does nothing until then. Valid for Cluster Type: Aurora DB clusters only public var enableGlobalWriteForwarding: Swift.Bool? - /// Specifies whether to enable the HTTP endpoint for an Aurora Serverless v1 DB cluster. By default, the HTTP endpoint is disabled. When enabled, the HTTP endpoint provides a connectionless web service API for running SQL queries on the Aurora Serverless v1 DB cluster. You can also query your database from inside the RDS console with the query editor. For more information, see [Using the Data API for Aurora Serverless v1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only + /// Specifies whether to enable the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled. When enabled, the HTTP endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the DB cluster. You can also query your database from inside the RDS console with the RDS query editor. RDS Data API is supported with the following DB clusters: + /// + /// * Aurora PostgreSQL Serverless v2 and provisioned + /// + /// * Aurora PostgreSQL and Aurora MySQL Serverless v1 + /// + /// + /// For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only public var enableHttpEndpoint: Swift.Bool? /// Specifies whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled. For more information, see [ IAM Database Authentication](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only public var enableIAMDatabaseAuthentication: Swift.Bool? @@ -12324,7 +12331,7 @@ extension RDSClientTypes { public var globalWriteForwardingStatus: RDSClientTypes.WriteForwardingStatus? /// The ID that Amazon Route 53 assigns when you create a hosted zone. public var hostedZoneId: Swift.String? - /// Indicates whether the HTTP endpoint for an Aurora Serverless v1 DB cluster is enabled. When enabled, the HTTP endpoint provides a connectionless web service API for running SQL queries on the Aurora Serverless v1 DB cluster. You can also query your database from inside the RDS console with the query editor. For more information, see [Using the Data API for Aurora Serverless v1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. + /// Indicates whether the HTTP endpoint is enabled for an Aurora DB cluster. When enabled, the HTTP endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the DB cluster. You can also query your database from inside the RDS console with the RDS query editor. For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. public var httpEndpointEnabled: Swift.Bool? /// Indicates whether the mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled. public var iamDatabaseAuthenticationEnabled: Swift.Bool? @@ -33106,6 +33113,114 @@ enum DescribeValidDBInstanceModificationsOutputError: ClientRuntime.HttpResponse } } +extension DisableHttpEndpointInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let resourceArn = resourceArn { + try container.encode(resourceArn, forKey: ClientRuntime.Key("ResourceArn")) + } + try container.encode("DisableHttpEndpoint", forKey:ClientRuntime.Key("Action")) + try container.encode("2014-10-31", forKey:ClientRuntime.Key("Version")) + } +} + +extension DisableHttpEndpointInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct DisableHttpEndpointInput: Swift.Equatable { + /// The Amazon Resource Name (ARN) of the DB cluster. + /// This member is required. + public var resourceArn: Swift.String? + + public init( + resourceArn: Swift.String? = nil + ) + { + self.resourceArn = resourceArn + } +} + +struct DisableHttpEndpointInputBody: Swift.Equatable { + let resourceArn: Swift.String? +} + +extension DisableHttpEndpointInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + } +} + +extension DisableHttpEndpointOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: DisableHttpEndpointOutputBody = try responseDecoder.decode(responseBody: data) + self.httpEndpointEnabled = output.httpEndpointEnabled + self.resourceArn = output.resourceArn + } else { + self.httpEndpointEnabled = nil + self.resourceArn = nil + } + } +} + +public struct DisableHttpEndpointOutput: Swift.Equatable { + /// Indicates whether the HTTP endpoint is enabled or disabled for the DB cluster. + public var httpEndpointEnabled: Swift.Bool? + /// The ARN of the DB cluster. + public var resourceArn: Swift.String? + + public init( + httpEndpointEnabled: Swift.Bool? = nil, + resourceArn: Swift.String? = nil + ) + { + self.httpEndpointEnabled = httpEndpointEnabled + self.resourceArn = resourceArn + } +} + +struct DisableHttpEndpointOutputBody: Swift.Equatable { + let resourceArn: Swift.String? + let httpEndpointEnabled: Swift.Bool? +} + +extension DisableHttpEndpointOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case httpEndpointEnabled = "HttpEndpointEnabled" + case resourceArn = "ResourceArn" + } + + public init(from decoder: Swift.Decoder) throws { + let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) + let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisableHttpEndpointResult")) + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + let httpEndpointEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .httpEndpointEnabled) + httpEndpointEnabled = httpEndpointEnabledDecoded + } +} + +enum DisableHttpEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) + switch restXMLError.errorCode { + case "InvalidResourceStateFault": return try await InvalidResourceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + } + } +} + extension RDSClientTypes.DocLink: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case text = "Text" @@ -33660,6 +33775,114 @@ extension Ec2ImagePropertiesNotSupportedFaultBody: Swift.Decodable { } } +extension EnableHttpEndpointInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let resourceArn = resourceArn { + try container.encode(resourceArn, forKey: ClientRuntime.Key("ResourceArn")) + } + try container.encode("EnableHttpEndpoint", forKey:ClientRuntime.Key("Action")) + try container.encode("2014-10-31", forKey:ClientRuntime.Key("Version")) + } +} + +extension EnableHttpEndpointInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + return "/" + } +} + +public struct EnableHttpEndpointInput: Swift.Equatable { + /// The Amazon Resource Name (ARN) of the DB cluster. + /// This member is required. + public var resourceArn: Swift.String? + + public init( + resourceArn: Swift.String? = nil + ) + { + self.resourceArn = resourceArn + } +} + +struct EnableHttpEndpointInputBody: Swift.Equatable { + let resourceArn: Swift.String? +} + +extension EnableHttpEndpointInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + } +} + +extension EnableHttpEndpointOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: EnableHttpEndpointOutputBody = try responseDecoder.decode(responseBody: data) + self.httpEndpointEnabled = output.httpEndpointEnabled + self.resourceArn = output.resourceArn + } else { + self.httpEndpointEnabled = nil + self.resourceArn = nil + } + } +} + +public struct EnableHttpEndpointOutput: Swift.Equatable { + /// Indicates whether the HTTP endpoint is enabled or disabled for the DB cluster. + public var httpEndpointEnabled: Swift.Bool? + /// The ARN of the DB cluster. + public var resourceArn: Swift.String? + + public init( + httpEndpointEnabled: Swift.Bool? = nil, + resourceArn: Swift.String? = nil + ) + { + self.httpEndpointEnabled = httpEndpointEnabled + self.resourceArn = resourceArn + } +} + +struct EnableHttpEndpointOutputBody: Swift.Equatable { + let resourceArn: Swift.String? + let httpEndpointEnabled: Swift.Bool? +} + +extension EnableHttpEndpointOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case httpEndpointEnabled = "HttpEndpointEnabled" + case resourceArn = "ResourceArn" + } + + public init(from decoder: Swift.Decoder) throws { + let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) + let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnableHttpEndpointResult")) + let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) + resourceArn = resourceArnDecoded + let httpEndpointEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .httpEndpointEnabled) + httpEndpointEnabled = httpEndpointEnabledDecoded + } +} + +enum EnableHttpEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) + switch restXMLError.errorCode { + case "InvalidResourceStateFault": return try await InvalidResourceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + } + } +} + extension RDSClientTypes.Endpoint: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" @@ -37792,6 +38015,60 @@ extension InvalidOptionGroupStateFaultBody: Swift.Decodable { } } +extension InvalidResourceStateFault { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { + let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) + self.properties.message = output.error.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The operation can't be performed because another operation is in progress. +public struct InvalidResourceStateFault: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidResourceStateFault" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InvalidResourceStateFaultBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidResourceStateFaultBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension InvalidRestoreFault { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { @@ -40166,7 +40443,7 @@ public struct ModifyDBClusterInput: Swift.Equatable { public var domainIAMRoleName: Swift.String? /// Specifies whether to enable this DB cluster to forward write operations to the primary cluster of a global cluster (Aurora global database). By default, write operations are not allowed on Aurora DB clusters that are secondary clusters in an Aurora global database. You can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter enabled, a secondary cluster can forward writes to the current primary cluster, and the resulting changes are replicated back to this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the primary is demoted by a global cluster API operation, but it does nothing until then. Valid for Cluster Type: Aurora DB clusters only public var enableGlobalWriteForwarding: Swift.Bool? - /// Specifies whether to enable the HTTP endpoint for an Aurora Serverless v1 DB cluster. By default, the HTTP endpoint is disabled. When enabled, the HTTP endpoint provides a connectionless web service API for running SQL queries on the Aurora Serverless v1 DB cluster. You can also query your database from inside the RDS console with the query editor. For more information, see [Using the Data API for Aurora Serverless v1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only + /// Specifies whether to enable the HTTP endpoint for an Aurora Serverless v1 DB cluster. By default, the HTTP endpoint isn't enabled. When enabled, the HTTP endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the Aurora Serverless v1 DB cluster. You can also query your database from inside the RDS console with the RDS query editor. For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. This parameter applies only to Aurora Serverless v1 DB clusters. To enable or disable the HTTP endpoint for an Aurora PostgreSQL Serverless v2 or provisioned DB cluster, use the EnableHttpEndpoint and DisableHttpEndpoint operations. Valid for Cluster Type: Aurora DB clusters only public var enableHttpEndpoint: Swift.Bool? /// Specifies whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled. For more information, see [ IAM Database Authentication](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only public var enableIAMDatabaseAuthentication: Swift.Bool? diff --git a/Sources/Services/AWSRDSData/RDSDataClient.swift b/Sources/Services/AWSRDSData/RDSDataClient.swift index c1ca79fe1f7..9564681c455 100644 --- a/Sources/Services/AWSRDSData/RDSDataClient.swift +++ b/Sources/Services/AWSRDSData/RDSDataClient.swift @@ -78,12 +78,25 @@ extension RDSDataClient: RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. public func batchExecuteStatement(input: BatchExecuteStatementInput) async throws -> BatchExecuteStatementOutput { let context = ClientRuntime.HttpContextBuilder() @@ -129,12 +142,25 @@ extension RDSDataClient: RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. public func beginTransaction(input: BeginTransactionInput) async throws -> BeginTransactionOutput { let context = ClientRuntime.HttpContextBuilder() @@ -180,13 +206,26 @@ extension RDSDataClient: RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. /// - `NotFoundException` : The resourceArn, secretArn, or transactionId value can't be found. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. public func commitTransaction(input: CommitTransactionInput) async throws -> CommitTransactionOutput { let context = ClientRuntime.HttpContextBuilder() @@ -223,7 +262,7 @@ extension RDSDataClient: RDSDataClientProtocol { /// Performs the `ExecuteSql` operation on the `RdsDataService` service. /// - /// Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation. + /// Runs one or more SQL statements. This operation isn't supported for Aurora PostgreSQL Serverless v2 and provisioned DB clusters, and for Aurora Serverless v1 DB clusters, the operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation. @available(*, deprecated, message: "The ExecuteSql API is deprecated, please use the ExecuteStatement API. API deprecated since 2019-03-21") /// /// - Parameter ExecuteSqlInput : The request parameters represent the input of a request to run one or more SQL statements. @@ -233,11 +272,11 @@ extension RDSDataClient: RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) /// - `ForbiddenException` : There are insufficient privileges to make the call. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. public func executeSql(input: ExecuteSqlInput) async throws -> ExecuteSqlOutput { let context = ClientRuntime.HttpContextBuilder() @@ -283,12 +322,32 @@ extension RDSDataClient: RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. + /// - `UnsupportedResultException` : There was a problem with the result because of one of the following conditions: + /// + /// * It contained an unsupported data type. + /// + /// * It contained a multidimensional array. + /// + /// * The size was too large. public func executeStatement(input: ExecuteStatementInput) async throws -> ExecuteStatementOutput { let context = ClientRuntime.HttpContextBuilder() @@ -334,13 +393,26 @@ extension RDSDataClient: RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. /// - `NotFoundException` : The resourceArn, secretArn, or transactionId value can't be found. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. public func rollbackTransaction(input: RollbackTransactionInput) async throws -> RollbackTransactionOutput { let context = ClientRuntime.HttpContextBuilder() diff --git a/Sources/Services/AWSRDSData/RDSDataClientProtocol.swift b/Sources/Services/AWSRDSData/RDSDataClientProtocol.swift index 8aed57ebdf2..9025cb0991c 100644 --- a/Sources/Services/AWSRDSData/RDSDataClientProtocol.swift +++ b/Sources/Services/AWSRDSData/RDSDataClientProtocol.swift @@ -2,7 +2,14 @@ import ClientRuntime -/// Amazon RDS Data Service Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless v1 DB cluster. To run these statements, you work with the Data Service API. The Data Service API isn't supported on Amazon Aurora Serverless v2 DB clusters. For more information about the Data Service API, see [Using the Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. +/// RDS Data API Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora DB cluster. To run these statements, you use the RDS Data API (Data API). Data API is available with the following types of Aurora databases: +/// +/// * Aurora PostgreSQL - Serverless v2, Serverless v1, and provisioned +/// +/// * Aurora MySQL - Serverless v1 only +/// +/// +/// For more information about the Data API, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide. public protocol RDSDataClientProtocol { /// Performs the `BatchExecuteStatement` operation on the `RdsDataService` service. /// @@ -15,12 +22,25 @@ public protocol RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. func batchExecuteStatement(input: BatchExecuteStatementInput) async throws -> BatchExecuteStatementOutput /// Performs the `BeginTransaction` operation on the `RdsDataService` service. /// @@ -33,12 +53,25 @@ public protocol RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. func beginTransaction(input: BeginTransactionInput) async throws -> BeginTransactionOutput /// Performs the `CommitTransaction` operation on the `RdsDataService` service. /// @@ -51,17 +84,30 @@ public protocol RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. /// - `NotFoundException` : The resourceArn, secretArn, or transactionId value can't be found. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. func commitTransaction(input: CommitTransactionInput) async throws -> CommitTransactionOutput /// Performs the `ExecuteSql` operation on the `RdsDataService` service. /// - /// Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation. + /// Runs one or more SQL statements. This operation isn't supported for Aurora PostgreSQL Serverless v2 and provisioned DB clusters, and for Aurora Serverless v1 DB clusters, the operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation. @available(*, deprecated, message: "The ExecuteSql API is deprecated, please use the ExecuteStatement API. API deprecated since 2019-03-21") /// /// - Parameter ExecuteSqlInput : The request parameters represent the input of a request to run one or more SQL statements. @@ -71,11 +117,11 @@ public protocol RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) /// - `ForbiddenException` : There are insufficient privileges to make the call. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. func executeSql(input: ExecuteSqlInput) async throws -> ExecuteSqlOutput /// Performs the `ExecuteStatement` operation on the `RdsDataService` service. /// @@ -88,12 +134,32 @@ public protocol RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. + /// - `UnsupportedResultException` : There was a problem with the result because of one of the following conditions: + /// + /// * It contained an unsupported data type. + /// + /// * It contained a multidimensional array. + /// + /// * The size was too large. func executeStatement(input: ExecuteStatementInput) async throws -> ExecuteStatementOutput /// Performs the `RollbackTransaction` operation on the `RdsDataService` service. /// @@ -106,13 +172,26 @@ public protocol RDSDataClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ - /// - `AccessDeniedException` : You do not have sufficient access to perform this action. - /// - `BadRequestException` : There is an error in the call or in a SQL statement. + /// - `AccessDeniedException` : You don't have sufficient access to perform this action. + /// - `BadRequestException` : There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) + /// - `DatabaseErrorException` : There was an error in processing the SQL statement. + /// - `DatabaseNotFoundException` : The DB cluster doesn't have a DB instance. + /// - `DatabaseUnavailableException` : The writer instance in the DB cluster isn't available. /// - `ForbiddenException` : There are insufficient privileges to make the call. + /// - `HttpEndpointNotEnabledException` : The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. /// - `InternalServerErrorException` : An internal error occurred. + /// - `InvalidSecretException` : The Secrets Manager secret used with the request isn't valid. /// - `NotFoundException` : The resourceArn, secretArn, or transactionId value can't be found. - /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter is not available. + /// - `SecretsErrorException` : There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: + /// + /// * RDS Data API timed out retrieving the secret. + /// + /// * The secret provided wasn't found. + /// + /// * The secret couldn't be decrypted. + /// - `ServiceUnavailableError` : The service specified by the resourceArn parameter isn't available. /// - `StatementTimeoutException` : The execution of the SQL statement timed out. + /// - `TransactionNotFoundException` : The transaction ID wasn't found. func rollbackTransaction(input: RollbackTransactionInput) async throws -> RollbackTransactionOutput } diff --git a/Sources/Services/AWSRDSData/models/Models.swift b/Sources/Services/AWSRDSData/models/Models.swift index 6889c86cb61..252a0742ab4 100644 --- a/Sources/Services/AWSRDSData/models/Models.swift +++ b/Sources/Services/AWSRDSData/models/Models.swift @@ -17,7 +17,7 @@ extension AccessDeniedException { } } -/// You do not have sufficient access to perform this action. +/// You don't have sufficient access to perform this action. public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -209,7 +209,7 @@ extension BadRequestException { } } -/// There is an error in the call or in a SQL statement. +/// There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) public struct BadRequestException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -461,10 +461,17 @@ enum BatchExecuteStatementOutputError: ClientRuntime.HttpResponseErrorBinding { switch restJSONError.errorType { case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseErrorException": return try await DatabaseErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseNotFoundException": return try await DatabaseNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseUnavailableException": return try await DatabaseUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ForbiddenException": return try await ForbiddenException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "HttpEndpointNotEnabledException": return try await HttpEndpointNotEnabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecretException": return try await InvalidSecretException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "SecretsErrorException": return try await SecretsErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceUnavailableError": return try await ServiceUnavailableError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "StatementTimeoutException": return try await StatementTimeoutException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "TransactionNotFoundException": return try await TransactionNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } @@ -604,10 +611,17 @@ enum BeginTransactionOutputError: ClientRuntime.HttpResponseErrorBinding { switch restJSONError.errorType { case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseErrorException": return try await DatabaseErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseNotFoundException": return try await DatabaseNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseUnavailableException": return try await DatabaseUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ForbiddenException": return try await ForbiddenException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "HttpEndpointNotEnabledException": return try await HttpEndpointNotEnabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecretException": return try await InvalidSecretException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "SecretsErrorException": return try await SecretsErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceUnavailableError": return try await ServiceUnavailableError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "StatementTimeoutException": return try await StatementTimeoutException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "TransactionNotFoundException": return try await TransactionNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } @@ -901,16 +915,154 @@ enum CommitTransactionOutputError: ClientRuntime.HttpResponseErrorBinding { switch restJSONError.errorType { case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseErrorException": return try await DatabaseErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseNotFoundException": return try await DatabaseNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseUnavailableException": return try await DatabaseUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ForbiddenException": return try await ForbiddenException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "HttpEndpointNotEnabledException": return try await HttpEndpointNotEnabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecretException": return try await InvalidSecretException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "SecretsErrorException": return try await SecretsErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceUnavailableError": return try await ServiceUnavailableError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "StatementTimeoutException": return try await StatementTimeoutException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "TransactionNotFoundException": return try await TransactionNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } +extension DatabaseErrorException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: DatabaseErrorExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// There was an error in processing the SQL statement. +public struct DatabaseErrorException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "DatabaseErrorException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct DatabaseErrorExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension DatabaseErrorExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension DatabaseNotFoundException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: DatabaseNotFoundExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The DB cluster doesn't have a DB instance. +public struct DatabaseNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "DatabaseNotFoundException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct DatabaseNotFoundExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension DatabaseNotFoundExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension DatabaseUnavailableException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The writer instance in the DB cluster isn't available. +public struct DatabaseUnavailableException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + public static var typeName: Swift.String { "DatabaseUnavailableException" } + public static var fault: ErrorFault { .server } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init() { } +} + extension RDSDataClientTypes { public enum DecimalReturnType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case doubleOrLong @@ -1414,10 +1566,18 @@ enum ExecuteStatementOutputError: ClientRuntime.HttpResponseErrorBinding { switch restJSONError.errorType { case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseErrorException": return try await DatabaseErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseNotFoundException": return try await DatabaseNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseUnavailableException": return try await DatabaseUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ForbiddenException": return try await ForbiddenException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "HttpEndpointNotEnabledException": return try await HttpEndpointNotEnabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecretException": return try await InvalidSecretException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "SecretsErrorException": return try await SecretsErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceUnavailableError": return try await ServiceUnavailableError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "StatementTimeoutException": return try await StatementTimeoutException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "TransactionNotFoundException": return try await TransactionNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "UnsupportedResultException": return try await UnsupportedResultException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } @@ -1576,6 +1736,61 @@ extension ForbiddenExceptionBody: Swift.Decodable { } } +extension HttpEndpointNotEnabledException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: HttpEndpointNotEnabledExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. +public struct HttpEndpointNotEnabledException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "HttpEndpointNotEnabledException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct HttpEndpointNotEnabledExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension HttpEndpointNotEnabledExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension InternalServerErrorException { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { self.httpResponse = httpResponse @@ -1597,6 +1812,61 @@ public struct InternalServerErrorException: ClientRuntime.ModeledError, AWSClien public init() { } } +extension InvalidSecretException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidSecretExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The Secrets Manager secret used with the request isn't valid. +public struct InvalidSecretException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidSecretException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InvalidSecretExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidSecretExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension RDSDataClientTypes { public enum LongReturnType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case long @@ -2046,16 +2316,84 @@ enum RollbackTransactionOutputError: ClientRuntime.HttpResponseErrorBinding { switch restJSONError.errorType { case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseErrorException": return try await DatabaseErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseNotFoundException": return try await DatabaseNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "DatabaseUnavailableException": return try await DatabaseUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ForbiddenException": return try await ForbiddenException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "HttpEndpointNotEnabledException": return try await HttpEndpointNotEnabledException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "InternalServerErrorException": return try await InternalServerErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecretException": return try await InvalidSecretException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "SecretsErrorException": return try await SecretsErrorException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "ServiceUnavailableError": return try await ServiceUnavailableError(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) case "StatementTimeoutException": return try await StatementTimeoutException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "TransactionNotFoundException": return try await TransactionNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } +extension SecretsErrorException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: SecretsErrorExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions: +/// +/// * RDS Data API timed out retrieving the secret. +/// +/// * The secret provided wasn't found. +/// +/// * The secret couldn't be decrypted. +public struct SecretsErrorException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "SecretsErrorException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct SecretsErrorExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension SecretsErrorExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension ServiceUnavailableError { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { self.httpResponse = httpResponse @@ -2064,7 +2402,7 @@ extension ServiceUnavailableError { } } -/// The service specified by the resourceArn parameter is not available. +/// The service specified by the resourceArn parameter isn't available. public struct ServiceUnavailableError: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public static var typeName: Swift.String { "ServiceUnavailableError" } public static var fault: ErrorFault { .server } @@ -2302,6 +2640,61 @@ extension RDSDataClientTypes { } +extension TransactionNotFoundException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: TransactionNotFoundExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The transaction ID wasn't found. +public struct TransactionNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "TransactionNotFoundException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct TransactionNotFoundExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension TransactionNotFoundExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension RDSDataClientTypes { public enum TypeHint: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case date @@ -2346,6 +2739,67 @@ extension RDSDataClientTypes { } } +extension UnsupportedResultException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: UnsupportedResultExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// There was a problem with the result because of one of the following conditions: +/// +/// * It contained an unsupported data type. +/// +/// * It contained a multidimensional array. +/// +/// * The size was too large. +public struct UnsupportedResultException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "UnsupportedResultException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct UnsupportedResultExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension UnsupportedResultExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension RDSDataClientTypes.UpdateResult: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case generatedFields diff --git a/Sources/Services/AWSRedshiftServerless/models/Models.swift b/Sources/Services/AWSRedshiftServerless/models/Models.swift index c630324ff00..73ee5fc0530 100644 --- a/Sources/Services/AWSRedshiftServerless/models/Models.swift +++ b/Sources/Services/AWSRedshiftServerless/models/Models.swift @@ -159,7 +159,7 @@ extension RedshiftServerlessClientTypes.ConfigParameter: Swift.Codable { extension RedshiftServerlessClientTypes { /// An array of key-value pairs to set for advanced control over Amazon Redshift Serverless. public struct ConfigParameter: Swift.Equatable { - /// The key of the parameter. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). + /// The key of the parameter. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, require_ssl, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). public var parameterKey: Swift.String? /// The value of the parameter to set. public var parameterValue: Swift.String? @@ -1801,7 +1801,7 @@ extension CreateWorkgroupInput: ClientRuntime.URLPathProvider { public struct CreateWorkgroupInput: Swift.Equatable { /// The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). public var baseCapacity: Swift.Int? - /// An array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [ Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). + /// An array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, require_ssl, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [ Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). public var configParameters: [RedshiftServerlessClientTypes.ConfigParameter]? /// The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. public var enhancedVpcRouting: Swift.Bool? @@ -9853,7 +9853,7 @@ extension UpdateWorkgroupInput: ClientRuntime.URLPathProvider { public struct UpdateWorkgroupInput: Swift.Equatable { /// The new base data warehouse capacity in Redshift Processing Units (RPUs). public var baseCapacity: Swift.Int? - /// An array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [ Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). + /// An array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, require_ssl, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [ Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). public var configParameters: [RedshiftServerlessClientTypes.ConfigParameter]? /// The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC. public var enhancedVpcRouting: Swift.Bool? @@ -10583,7 +10583,7 @@ extension RedshiftServerlessClientTypes { public struct Workgroup: Swift.Equatable { /// The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). public var baseCapacity: Swift.Int? - /// An array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [ Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). + /// An array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, require_ssl, and query monitoring metrics that let you define performance boundaries. For more information about query monitoring rules and available metrics, see [ Query monitoring metrics for Amazon Redshift Serverless](https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless). public var configParameters: [RedshiftServerlessClientTypes.ConfigParameter]? /// The creation date of the workgroup. public var creationDate: ClientRuntime.Date? diff --git a/Sources/Services/AWSRekognition/RekognitionClient.swift b/Sources/Services/AWSRekognition/RekognitionClient.swift index d056d44406f..c741ac2189f 100644 --- a/Sources/Services/AWSRekognition/RekognitionClient.swift +++ b/Sources/Services/AWSRekognition/RekognitionClient.swift @@ -1310,7 +1310,7 @@ extension RekognitionClient: RekognitionClientProtocol { /// Performs the `DetectCustomLabels` operation on the `RekognitionService` service. /// - /// This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. + /// This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). Note that for the DetectCustomLabelsLabels operation, Polygons are not returned in the Geometry section of the response. To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. /// /// - Parameter DetectCustomLabelsInput : [no documentation found] /// diff --git a/Sources/Services/AWSRekognition/RekognitionClientProtocol.swift b/Sources/Services/AWSRekognition/RekognitionClientProtocol.swift index 1f5a4cdfd42..4b1602e00b3 100644 --- a/Sources/Services/AWSRekognition/RekognitionClientProtocol.swift +++ b/Sources/Services/AWSRekognition/RekognitionClientProtocol.swift @@ -34,10 +34,14 @@ import ClientRuntime /// /// * [GetCelebrityInfo](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetCelebrityInfo.html) /// +/// * [GetMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetMediaAnalysisJob.html) +/// /// * [IndexFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html) /// /// * [ListCollections](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListCollections.html) /// +/// * [ListMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListMediaAnalysisJob.html) +/// /// * [ListFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html) /// /// * [ListUsers](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html) @@ -52,6 +56,8 @@ import ClientRuntime /// /// * [SearchUsersByImage](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html) /// +/// * [StartMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html) +/// /// /// Amazon Rekognition Custom Labels /// @@ -605,7 +611,7 @@ public protocol RekognitionClientProtocol { func describeStreamProcessor(input: DescribeStreamProcessorInput) async throws -> DescribeStreamProcessorOutput /// Performs the `DetectCustomLabels` operation on the `RekognitionService` service. /// - /// This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. + /// This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). Note that for the DetectCustomLabelsLabels operation, Polygons are not returned in the Geometry section of the response. To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. /// /// - Parameter DetectCustomLabelsInput : [no documentation found] /// diff --git a/Sources/Services/AWSRekognition/models/Models.swift b/Sources/Services/AWSRekognition/models/Models.swift index 795ba42e6e6..50f822d44f2 100644 --- a/Sources/Services/AWSRekognition/models/Models.swift +++ b/Sources/Services/AWSRekognition/models/Models.swift @@ -283,7 +283,7 @@ extension AssociateFacesOutput: ClientRuntime.HttpResponseBinding { } public struct AssociateFacesOutput: Swift.Equatable { - /// An array of AssociatedFace objects containing FaceIDs that are successfully associated with the UserID is returned. Returned if the AssociateFaces action is successful. + /// An array of AssociatedFace objects containing FaceIDs that have been successfully associated with the UserID. Returned if the AssociateFaces action is successful. public var associatedFaces: [RekognitionClientTypes.AssociatedFace]? /// An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully associated along with the reasons. Returned if the AssociateFaces action is successful. public var unsuccessfulFaceAssociations: [RekognitionClientTypes.UnsuccessfulFaceAssociation]? @@ -1835,6 +1835,51 @@ extension RekognitionClientTypes { } } +extension RekognitionClientTypes.ContentType: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case confidence = "Confidence" + case name = "Name" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let confidence = self.confidence { + try encodeContainer.encode(confidence, forKey: .confidence) + } + if let name = self.name { + try encodeContainer.encode(name, forKey: .name) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let confidenceDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .confidence) + confidence = confidenceDecoded + let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) + name = nameDecoded + } +} + +extension RekognitionClientTypes { + /// Contains information regarding the confidence and name of a detected content type. + public struct ContentType: Swift.Equatable { + /// The confidence level of the label given + public var confidence: Swift.Float? + /// The name of the label + public var name: Swift.String? + + public init( + confidence: Swift.Float? = nil, + name: Swift.String? = nil + ) + { + self.confidence = confidence + self.name = name + } + } + +} + extension CopyProjectVersionInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case destinationProjectArn = "DestinationProjectArn" @@ -6541,11 +6586,13 @@ extension DetectModerationLabelsOutput: ClientRuntime.HttpResponseBinding { if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { let output: DetectModerationLabelsOutputBody = try responseDecoder.decode(responseBody: data) + self.contentTypes = output.contentTypes self.humanLoopActivationOutput = output.humanLoopActivationOutput self.moderationLabels = output.moderationLabels self.moderationModelVersion = output.moderationModelVersion self.projectVersion = output.projectVersion } else { + self.contentTypes = nil self.humanLoopActivationOutput = nil self.moderationLabels = nil self.moderationModelVersion = nil @@ -6555,6 +6602,8 @@ extension DetectModerationLabelsOutput: ClientRuntime.HttpResponseBinding { } public struct DetectModerationLabelsOutput: Swift.Equatable { + /// A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game. + public var contentTypes: [RekognitionClientTypes.ContentType]? /// Shows the results of the human in the loop evaluation. public var humanLoopActivationOutput: RekognitionClientTypes.HumanLoopActivationOutput? /// Array of detected Moderation labels and the time, in milliseconds from the start of the video, they were detected. @@ -6565,12 +6614,14 @@ public struct DetectModerationLabelsOutput: Swift.Equatable { public var projectVersion: Swift.String? public init( + contentTypes: [RekognitionClientTypes.ContentType]? = nil, humanLoopActivationOutput: RekognitionClientTypes.HumanLoopActivationOutput? = nil, moderationLabels: [RekognitionClientTypes.ModerationLabel]? = nil, moderationModelVersion: Swift.String? = nil, projectVersion: Swift.String? = nil ) { + self.contentTypes = contentTypes self.humanLoopActivationOutput = humanLoopActivationOutput self.moderationLabels = moderationLabels self.moderationModelVersion = moderationModelVersion @@ -6583,10 +6634,12 @@ struct DetectModerationLabelsOutputBody: Swift.Equatable { let moderationModelVersion: Swift.String? let humanLoopActivationOutput: RekognitionClientTypes.HumanLoopActivationOutput? let projectVersion: Swift.String? + let contentTypes: [RekognitionClientTypes.ContentType]? } extension DetectModerationLabelsOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { + case contentTypes = "ContentTypes" case humanLoopActivationOutput = "HumanLoopActivationOutput" case moderationLabels = "ModerationLabels" case moderationModelVersion = "ModerationModelVersion" @@ -6612,6 +6665,17 @@ extension DetectModerationLabelsOutputBody: Swift.Decodable { humanLoopActivationOutput = humanLoopActivationOutputDecoded let projectVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .projectVersion) projectVersion = projectVersionDecoded + let contentTypesContainer = try containerValues.decodeIfPresent([RekognitionClientTypes.ContentType?].self, forKey: .contentTypes) + var contentTypesDecoded0:[RekognitionClientTypes.ContentType]? = nil + if let contentTypesContainer = contentTypesContainer { + contentTypesDecoded0 = [RekognitionClientTypes.ContentType]() + for structure0 in contentTypesContainer { + if let structure0 = structure0 { + contentTypesDecoded0?.append(structure0) + } + } + } + contentTypes = contentTypesDecoded0 } } @@ -15341,6 +15405,41 @@ extension RekognitionClientTypes { } +extension RekognitionClientTypes.MediaAnalysisModelVersions: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case moderation = "Moderation" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let moderation = self.moderation { + try encodeContainer.encode(moderation, forKey: .moderation) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let moderationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .moderation) + moderation = moderationDecoded + } +} + +extension RekognitionClientTypes { + /// Object containing information about the model versions of selected features in a given job. + public struct MediaAnalysisModelVersions: Swift.Equatable { + /// The Moderation base model version. + public var moderation: Swift.String? + + public init( + moderation: Swift.String? = nil + ) + { + self.moderation = moderation + } + } + +} + extension RekognitionClientTypes.MediaAnalysisOperationsConfig: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case detectModerationLabels = "DetectModerationLabels" @@ -15424,11 +15523,15 @@ extension RekognitionClientTypes { extension RekognitionClientTypes.MediaAnalysisResults: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case modelVersions = "ModelVersions" case s3Object = "S3Object" } public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let modelVersions = self.modelVersions { + try encodeContainer.encode(modelVersions, forKey: .modelVersions) + } if let s3Object = self.s3Object { try encodeContainer.encode(s3Object, forKey: .s3Object) } @@ -15438,19 +15541,25 @@ extension RekognitionClientTypes.MediaAnalysisResults: Swift.Codable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let s3ObjectDecoded = try containerValues.decodeIfPresent(RekognitionClientTypes.S3Object.self, forKey: .s3Object) s3Object = s3ObjectDecoded + let modelVersionsDecoded = try containerValues.decodeIfPresent(RekognitionClientTypes.MediaAnalysisModelVersions.self, forKey: .modelVersions) + modelVersions = modelVersionsDecoded } } extension RekognitionClientTypes { /// Contains the results for a media analysis job created with StartMediaAnalysisJob. public struct MediaAnalysisResults: Swift.Equatable { + /// Information about the model versions for the features selected in a given job. + public var modelVersions: RekognitionClientTypes.MediaAnalysisModelVersions? /// Provides the S3 bucket name and object name. The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations. For Amazon Rekognition to process an S3 object, the user must have permission to access the S3 object. For more information, see How Amazon Rekognition works with IAM in the Amazon Rekognition Developer Guide. public var s3Object: RekognitionClientTypes.S3Object? public init( + modelVersions: RekognitionClientTypes.MediaAnalysisModelVersions? = nil, s3Object: RekognitionClientTypes.S3Object? = nil ) { + self.modelVersions = modelVersions self.s3Object = s3Object } } @@ -15462,6 +15571,7 @@ extension RekognitionClientTypes.ModerationLabel: Swift.Codable { case confidence = "Confidence" case name = "Name" case parentName = "ParentName" + case taxonomyLevel = "TaxonomyLevel" } public func encode(to encoder: Swift.Encoder) throws { @@ -15475,6 +15585,9 @@ extension RekognitionClientTypes.ModerationLabel: Swift.Codable { if let parentName = self.parentName { try encodeContainer.encode(parentName, forKey: .parentName) } + if let taxonomyLevel = self.taxonomyLevel { + try encodeContainer.encode(taxonomyLevel, forKey: .taxonomyLevel) + } } public init(from decoder: Swift.Decoder) throws { @@ -15485,6 +15598,8 @@ extension RekognitionClientTypes.ModerationLabel: Swift.Codable { name = nameDecoded let parentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentName) parentName = parentNameDecoded + let taxonomyLevelDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .taxonomyLevel) + taxonomyLevel = taxonomyLevelDecoded } } @@ -15497,16 +15612,20 @@ extension RekognitionClientTypes { public var name: Swift.String? /// The name for the parent label. Labels at the top level of the hierarchy have the parent label "". public var parentName: Swift.String? + /// The level of the moderation label with regard to its taxonomy, from 1 to 3. + public var taxonomyLevel: Swift.Int? public init( confidence: Swift.Float? = nil, name: Swift.String? = nil, - parentName: Swift.String? = nil + parentName: Swift.String? = nil, + taxonomyLevel: Swift.Int? = nil ) { self.confidence = confidence self.name = name self.parentName = parentName + self.taxonomyLevel = taxonomyLevel } } diff --git a/Sources/Services/AWSRoute53/models/Models.swift b/Sources/Services/AWSRoute53/models/Models.swift index e2fa8e1aba7..cb6e5aaa5a2 100644 --- a/Sources/Services/AWSRoute53/models/Models.swift +++ b/Sources/Services/AWSRoute53/models/Models.swift @@ -358,7 +358,7 @@ extension Route53ClientTypes { /// * For edge-optimized APIs, specify the value of distributionHostedZoneId. /// /// - /// Amazon Virtual Private Cloud interface VPC endpoint Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId using the CLI command [describe-vpc-endpoints](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html). CloudFront distribution Specify Z2FDTNDATAQYW2. Alias resource record sets for CloudFront can't be created in a private zone. Elastic Beanstalk environment Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see [Elastic Beanstalk endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html) in the the Amazon Web Services General Reference. ELB load balancer Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID: + /// Amazon Virtual Private Cloud interface VPC endpoint Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId using the CLI command [describe-vpc-endpoints](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html). CloudFront distribution Specify Z2FDTNDATAQYW2. Alias resource record sets for CloudFront can't be created in a private zone. Elastic Beanstalk environment Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see [Elastic Beanstalk endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html) in the Amazon Web Services General Reference. ELB load balancer Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID: /// /// * [Elastic Load Balancing endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/elb.html) topic in the Amazon Web Services General Reference: Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers. /// @@ -1832,6 +1832,7 @@ extension Route53ClientTypes { case apSoutheast3 case apSoutheast4 case caCentral1 + case caWest1 case cnNorth1 case cnNorthwest1 case euCentral1 @@ -1871,6 +1872,7 @@ extension Route53ClientTypes { .apSoutheast3, .apSoutheast4, .caCentral1, + .caWest1, .cnNorth1, .cnNorthwest1, .euCentral1, @@ -1915,6 +1917,7 @@ extension Route53ClientTypes { case .apSoutheast3: return "ap-southeast-3" case .apSoutheast4: return "ap-southeast-4" case .caCentral1: return "ca-central-1" + case .caWest1: return "ca-west-1" case .cnNorth1: return "cn-north-1" case .cnNorthwest1: return "cn-northwest-1" case .euCentral1: return "eu-central-1" @@ -2214,6 +2217,49 @@ extension ConflictingTypesBody: Swift.Decodable { } } +extension Route53ClientTypes.Coordinates: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case latitude = "Latitude" + case longitude = "Longitude" + } + + static func writingClosure(_ value: Route53ClientTypes.Coordinates?, to writer: SmithyXML.Writer) throws { + guard let value else { writer.detach(); return } + try writer[.init("Latitude")].write(value.latitude) + try writer[.init("Longitude")].write(value.longitude) + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let latitudeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .latitude) + latitude = latitudeDecoded + let longitudeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .longitude) + longitude = longitudeDecoded + } +} + +extension Route53ClientTypes { + /// A complex type that lists the coordinates for a geoproximity resource record. + public struct Coordinates: Swift.Equatable { + /// Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90). + /// This member is required. + public var latitude: Swift.String? + /// Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180). + /// This member is required. + public var longitude: Swift.String? + + public init( + latitude: Swift.String? = nil, + longitude: Swift.String? = nil + ) + { + self.latitude = latitude + self.longitude = longitude + } + } + +} + extension CreateCidrCollectionInput { enum CodingKeys: Swift.String, Swift.CodingKey { case callerReference = "CallerReference" @@ -3738,7 +3784,7 @@ extension Route53ClientTypes.DNSSECStatus: Swift.Decodable { } extension Route53ClientTypes { - /// A string repesenting the status of DNSSEC signing. + /// A string representing the status of DNSSEC signing. public struct DNSSECStatus: Swift.Equatable { /// A string that represents the current hosted zone signing status. Status can have one of the following values: SIGNING DNSSEC signing is enabled for the hosted zone. NOT_SIGNING DNSSEC signing is not enabled for the hosted zone. DELETING DNSSEC signing is in the process of being removed for the hosted zone. ACTION_NEEDED There is a problem with signing in the hosted zone that requires you to take action to resolve. For example, the customer managed key might have been deleted, or the permissions for the customer managed key might have been changed. INTERNAL_FAILURE There was an error during a request. Before you can continue to work with DNSSEC signing, including with key-signing keys (KSKs), you must correct the problem by enabling or disabling DNSSEC signing for the hosted zone. public var serveSignature: Swift.String? @@ -5236,7 +5282,7 @@ extension Route53ClientTypes { /// /// Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error. public var continentCode: Swift.String? - /// For geolocation resource record sets, the two-letter code for a country. Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Route 53 also supports the contry code UA forr Ukraine. + /// For geolocation resource record sets, the two-letter code for a country. Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Route 53 also supports the country code UA for Ukraine. public var countryCode: Swift.String? /// For geolocation resource record sets, the two-letter code for a state of the United States. Route 53 doesn't support any other values for SubdivisionCode. For a list of state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations](https://pe.usps.com/text/pub28/28apb.htm) on the United States Postal Service website. If you specify subdivisioncode, you must also specify US for CountryCode. public var subdivisionCode: Swift.String? @@ -5328,6 +5374,67 @@ extension Route53ClientTypes { } +extension Route53ClientTypes.GeoProximityLocation: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case awsRegion = "AWSRegion" + case bias = "Bias" + case coordinates = "Coordinates" + case localZoneGroup = "LocalZoneGroup" + } + + static func writingClosure(_ value: Route53ClientTypes.GeoProximityLocation?, to writer: SmithyXML.Writer) throws { + guard let value else { writer.detach(); return } + try writer[.init("AWSRegion")].write(value.awsRegion) + try writer[.init("Bias")].write(value.bias) + try writer[.init("Coordinates")].write(value.coordinates, writingClosure: Route53ClientTypes.Coordinates.writingClosure(_:to:)) + try writer[.init("LocalZoneGroup")].write(value.localZoneGroup) + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let awsRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsRegion) + awsRegion = awsRegionDecoded + let localZoneGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localZoneGroup) + localZoneGroup = localZoneGroupDecoded + let coordinatesDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.Coordinates.self, forKey: .coordinates) + coordinates = coordinatesDecoded + let biasDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bias) + bias = biasDecoded + } +} + +extension Route53ClientTypes { + /// (Resource record sets only): A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query and your resources. Only one of , LocalZoneGroup, Coordinates, or Amazon Web ServicesRegion is allowed per request at a time. For more information about geoproximity routing, see [Geoproximity routing](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-geoproximity.html) in the Amazon Route 53 Developer Guide. + public struct GeoProximityLocation: Swift.Equatable { + /// The Amazon Web Services Region the resource you are directing DNS traffic to, is in. + public var awsRegion: Swift.String? + /// The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource. To use Bias to change the size of the geographic region, specify the applicable value for the bias: + /// + /// * To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions. + /// + /// * To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions. + public var bias: Swift.Int? + /// Contains the longitude and latitude for a geographic region. + public var coordinates: Route53ClientTypes.Coordinates? + /// Specifies an Amazon Web Services Local Zone Group. A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is us-east-1-bue-1a the Local Zone Group is us-east-1-bue-1. You can identify the Local Zones Group for a specific Local Zone by using the [describe-availability-zones](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-availability-zones.html) CLI command: This command returns: "GroupName": "us-west-2-den-1", specifying that the Local Zone us-west-2-den-1a belongs to the Local Zone Group us-west-2-den-1. + public var localZoneGroup: Swift.String? + + public init( + awsRegion: Swift.String? = nil, + bias: Swift.Int? = nil, + coordinates: Route53ClientTypes.Coordinates? = nil, + localZoneGroup: Swift.String? = nil + ) + { + self.awsRegion = awsRegion + self.bias = bias + self.coordinates = coordinates + self.localZoneGroup = localZoneGroup + } + } + +} + extension GetAccountLimitInput: ClientRuntime.URLPathProvider { public var urlPath: Swift.String? { guard let type = type else { @@ -5645,7 +5752,7 @@ public struct GetDNSSECOutput: Swift.Equatable { /// The key-signing keys (KSKs) in your account. /// This member is required. public var keySigningKeys: [Route53ClientTypes.KeySigningKey]? - /// A string repesenting the status of DNSSEC. + /// A string representing the status of DNSSEC. /// This member is required. public var status: Route53ClientTypes.DNSSECStatus? @@ -5753,7 +5860,7 @@ public struct GetGeoLocationInput: Swift.Equatable { /// /// * SA: South America public var continentCode: Swift.String? - /// Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Route 53 also supports the contry code UA forr Ukraine. + /// Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Route 53 also supports the country code UA for Ukraine. public var countryCode: Swift.String? /// The code for the subdivision, such as a particular state within the United States. For a list of US state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations](https://pe.usps.com/text/pub28/28apb.htm) on the United States Postal Service website. For a list of all supported subdivision codes, use the [ListGeoLocations](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html) API. public var subdivisionCode: Swift.String? @@ -7272,7 +7379,7 @@ extension Route53ClientTypes { /// /// * CALCULATED: For health checks that monitor the status of other health checks, Route 53 adds up the number of health checks that Route 53 health checkers consider to be healthy and compares that number with the value of HealthThreshold. /// - /// * RECOVERY_CONTROL: The health check is assocated with a Route53 Application Recovery Controller routing control. If the routing control state is ON, the health check is considered healthy. If the state is OFF, the health check is considered unhealthy. + /// * RECOVERY_CONTROL: The health check is associated with a Route53 Application Recovery Controller routing control. If the routing control state is ON, the health check is considered healthy. If the state is OFF, the health check is considered unhealthy. /// /// /// For more information, see [How Route 53 Determines Whether an Endpoint Is Healthy](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) in the Amazon Route 53 Developer Guide. @@ -13549,6 +13656,7 @@ extension Route53ClientTypes.ResourceRecordSet: Swift.Decodable { case cidrRoutingConfig = "CidrRoutingConfig" case failover = "Failover" case geoLocation = "GeoLocation" + case geoProximityLocation = "GeoProximityLocation" case healthCheckId = "HealthCheckId" case multiValueAnswer = "MultiValueAnswer" case name = "Name" @@ -13567,6 +13675,7 @@ extension Route53ClientTypes.ResourceRecordSet: Swift.Decodable { try writer[.init("CidrRoutingConfig")].write(value.cidrRoutingConfig, writingClosure: Route53ClientTypes.CidrRoutingConfig.writingClosure(_:to:)) try writer[.init("Failover")].write(value.failover) try writer[.init("GeoLocation")].write(value.geoLocation, writingClosure: Route53ClientTypes.GeoLocation.writingClosure(_:to:)) + try writer[.init("GeoProximityLocation")].write(value.geoProximityLocation, writingClosure: Route53ClientTypes.GeoProximityLocation.writingClosure(_:to:)) try writer[.init("HealthCheckId")].write(value.healthCheckId) try writer[.init("MultiValueAnswer")].write(value.multiValueAnswer) try writer[.init("Name")].write(value.name) @@ -13626,6 +13735,8 @@ extension Route53ClientTypes.ResourceRecordSet: Swift.Decodable { trafficPolicyInstanceId = trafficPolicyInstanceIdDecoded let cidrRoutingConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.CidrRoutingConfig.self, forKey: .cidrRoutingConfig) cidrRoutingConfig = cidrRoutingConfigDecoded + let geoProximityLocationDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.GeoProximityLocation.self, forKey: .geoProximityLocation) + geoProximityLocation = geoProximityLocationDecoded } } @@ -13657,8 +13768,10 @@ extension Route53ClientTypes { /// /// * [Configuring Failover in a Private Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) public var failover: Route53ClientTypes.ResourceRecordSetFailover? - /// Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF. Although creating geolocation and geolocation alias resource record sets in a private hosted zone is allowed, it's not supported. If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource. You can't create two geolocation resource record sets that specify the same geographic location. The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements. Geolocation works by mapping IP addresses to locations. However, some IP addresses aren't mapped to geographic locations, so even if you create geolocation resource record sets that cover all seven continents, Route 53 will receive some DNS queries from locations that it can't identify. We recommend that you create a resource record set for which the value of CountryCode is *. Two groups of queries are routed to the resource that you specify in this record: queries that come from locations for which you haven't created geolocation resource record sets and queries from IP addresses that aren't mapped to a location. If you don't create a * resource record set, Route 53 returns a "no answer" response for queries from those locations. You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets. + /// Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF. If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource. You can't create two geolocation resource record sets that specify the same geographic location. The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements. Geolocation works by mapping IP addresses to locations. However, some IP addresses aren't mapped to geographic locations, so even if you create geolocation resource record sets that cover all seven continents, Route 53 will receive some DNS queries from locations that it can't identify. We recommend that you create a resource record set for which the value of CountryCode is *. Two groups of queries are routed to the resource that you specify in this record: queries that come from locations for which you haven't created geolocation resource record sets and queries from IP addresses that aren't mapped to a location. If you don't create a * resource record set, Route 53 returns a "no answer" response for queries from those locations. You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets. public var geoLocation: Route53ClientTypes.GeoLocation? + /// GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources. + public var geoProximityLocation: Route53ClientTypes.GeoProximityLocation? /// If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include the HealthCheckId element and specify the ID of the applicable health check. Route 53 determines whether a resource record set is healthy based on one of the following: /// /// * By periodically sending a request to the endpoint that is specified in the health check @@ -13732,9 +13845,6 @@ extension Route53ClientTypes { /// * The * can't replace any of the middle labels, for example, marketing.*.example.com. /// /// * If you include * in any position other than the leftmost label in a domain name, DNS treats it as an * character (ASCII 42), not as a wildcard. You can't use the * wildcard for resource records sets that have a type of NS. - /// - /// - /// You can use the * wildcard as the leftmost label in a domain name, for example, *.example.com. You can't use an * for one of the middle labels, for example, marketing.*.example.com. In addition, the * must replace the entire label; for example, you can't specify prod*.example.com. /// This member is required. public var name: Swift.String? /// Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. The resource typically is an Amazon Web Services resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type. When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set. Note the following: @@ -13798,6 +13908,7 @@ extension Route53ClientTypes { cidrRoutingConfig: Route53ClientTypes.CidrRoutingConfig? = nil, failover: Route53ClientTypes.ResourceRecordSetFailover? = nil, geoLocation: Route53ClientTypes.GeoLocation? = nil, + geoProximityLocation: Route53ClientTypes.GeoProximityLocation? = nil, healthCheckId: Swift.String? = nil, multiValueAnswer: Swift.Bool? = nil, name: Swift.String? = nil, @@ -13814,6 +13925,7 @@ extension Route53ClientTypes { self.cidrRoutingConfig = cidrRoutingConfig self.failover = failover self.geoLocation = geoLocation + self.geoProximityLocation = geoProximityLocation self.healthCheckId = healthCheckId self.multiValueAnswer = multiValueAnswer self.name = name @@ -13875,6 +13987,7 @@ extension Route53ClientTypes { case apSoutheast3 case apSoutheast4 case caCentral1 + case caWest1 case cnNorth1 case cnNorthwest1 case euCentral1 @@ -13909,6 +14022,7 @@ extension Route53ClientTypes { .apSoutheast3, .apSoutheast4, .caCentral1, + .caWest1, .cnNorth1, .cnNorthwest1, .euCentral1, @@ -13948,6 +14062,7 @@ extension Route53ClientTypes { case .apSoutheast3: return "ap-southeast-3" case .apSoutheast4: return "ap-southeast-4" case .caCentral1: return "ca-central-1" + case .caWest1: return "ca-west-1" case .cnNorth1: return "cn-north-1" case .cnNorthwest1: return "cn-northwest-1" case .euCentral1: return "eu-central-1" @@ -15432,7 +15547,7 @@ public struct UpdateHealthCheckInput: Swift.Equatable { /// * If you specify another value for Port and any value except TCP for Type, Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host header. /// /// - /// If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes the value of IPAddress in the Host header in each of the above cases. If you don't specify a value for IPAddress: If you don't specify a value for IPAddress, Route 53 sends a DNS request to the domain that you specify in FullyQualifiedDomainName at the interval you specify in RequestInterval. Using an IPv4 address that is returned by DNS, Route 53 then checks the health of the endpoint. If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send health checks to the endpoint. If there's no resource record set with a type of A for the name that you specify for FullyQualifiedDomainName, the health check fails with a "DNS resolution failed" error. If you want to check the health of weighted, latency, or failover resource record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, we recommend that you create a separate health check for each endpoint. For example, create a health check for each HTTP server that is serving content for www.example.com. For the value of FullyQualifiedDomainName, specify the domain name of the server (such as us-east-2-www.example.com), not the name of the resource record sets (www.example.com). In this configuration, if the value of FullyQualifiedDomainName matches the name of the resource record sets and you then associate the health check with those resource record sets, health check results will be unpredictable. In addition, if the value of Type is HTTP, HTTPS, HTTP_STR_MATCH, or HTTPS_STR_MATCH, Route 53 passes the value of FullyQualifiedDomainName in the Host header, as it does when you specify a value for IPAddress. If the value of Type is TCP, Route 53 doesn't pass a Host header. + /// If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes the value of IPAddress in the Host header in each of the above cases. If you don't specify a value for IPAddress: If you don't specify a value for IPAddress, Route 53 sends a DNS request to the domain that you specify in FullyQualifiedDomainName at the interval you specify in RequestInterval. Using an IPv4 address that is returned by DNS, Route 53 then checks the health of the endpoint. If you don't specify a value for IPAddress, you can’t update the health check to remove the FullyQualifiedDomainName; if you don’t specify a value for IPAddress on creation, a FullyQualifiedDomainName is required. If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send health checks to the endpoint. If there's no resource record set with a type of A for the name that you specify for FullyQualifiedDomainName, the health check fails with a "DNS resolution failed" error. If you want to check the health of weighted, latency, or failover resource record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, we recommend that you create a separate health check for each endpoint. For example, create a health check for each HTTP server that is serving content for www.example.com. For the value of FullyQualifiedDomainName, specify the domain name of the server (such as us-east-2-www.example.com), not the name of the resource record sets (www.example.com). In this configuration, if the value of FullyQualifiedDomainName matches the name of the resource record sets and you then associate the health check with those resource record sets, health check results will be unpredictable. In addition, if the value of Type is HTTP, HTTPS, HTTP_STR_MATCH, or HTTPS_STR_MATCH, Route 53 passes the value of FullyQualifiedDomainName in the Host header, as it does when you specify a value for IPAddress. If the value of Type is TCP, Route 53 doesn't pass a Host header. public var fullyQualifiedDomainName: Swift.String? /// The ID for the health check for which you want detailed information. When you created the health check, CreateHealthCheck returned the ID in the response, in the HealthCheckId element. /// This member is required. @@ -16244,6 +16359,7 @@ extension Route53ClientTypes { case apSoutheast3 case apSoutheast4 case caCentral1 + case caWest1 case cnNorth1 case euCentral1 case euCentral2 @@ -16282,6 +16398,7 @@ extension Route53ClientTypes { .apSoutheast3, .apSoutheast4, .caCentral1, + .caWest1, .cnNorth1, .euCentral1, .euCentral2, @@ -16325,6 +16442,7 @@ extension Route53ClientTypes { case .apSoutheast3: return "ap-southeast-3" case .apSoutheast4: return "ap-southeast-4" case .caCentral1: return "ca-central-1" + case .caWest1: return "ca-west-1" case .cnNorth1: return "cn-north-1" case .euCentral1: return "eu-central-1" case .euCentral2: return "eu-central-2" diff --git a/Sources/Services/AWSRoute53Resolver/models/Models.swift b/Sources/Services/AWSRoute53Resolver/models/Models.swift index 3995f946885..13e1a608ca4 100644 --- a/Sources/Services/AWSRoute53Resolver/models/Models.swift +++ b/Sources/Services/AWSRoute53Resolver/models/Models.swift @@ -1099,6 +1099,7 @@ extension CreateFirewallRuleInput: Swift.Encodable { case firewallRuleGroupId = "FirewallRuleGroupId" case name = "Name" case priority = "Priority" + case qtype = "Qtype" } public func encode(to encoder: Swift.Encoder) throws { @@ -1133,6 +1134,9 @@ extension CreateFirewallRuleInput: Swift.Encodable { if let priority = self.priority { try encodeContainer.encode(priority, forKey: .priority) } + if let qtype = self.qtype { + try encodeContainer.encode(qtype, forKey: .qtype) + } } } @@ -1184,6 +1188,34 @@ public struct CreateFirewallRuleInput: Swift.Equatable { /// The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting. You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the rules in a rule group at any time. /// This member is required. public var priority: Swift.Int? + /// The DNS query type you want the rule to evaluate. Allowed values are; + /// + /// * A: Returns an IPv4 address. + /// + /// * AAAA: Returns an Ipv6 address. + /// + /// * CAA: Restricts CAs that can create SSL/TLS certifications for the domain. + /// + /// * CNAME: Returns another domain name. + /// + /// * DS: Record that identifies the DNSSEC signing key of a delegated zone. + /// + /// * MX: Specifies mail servers. + /// + /// * NAPTR: Regular-expression-based rewriting of domain names. + /// + /// * NS: Authoritative name servers. + /// + /// * PTR: Maps an IP address to a domain name. + /// + /// * SOA: Start of authority record for the zone. + /// + /// * SPF: Lists the servers authorized to send emails from a domain. + /// + /// * SRV: Application specific values that identify servers. + /// + /// * TXT: Verifies email senders and application-specific values. + public var qtype: Swift.String? public init( action: Route53ResolverClientTypes.Action? = nil, @@ -1195,7 +1227,8 @@ public struct CreateFirewallRuleInput: Swift.Equatable { firewallDomainListId: Swift.String? = nil, firewallRuleGroupId: Swift.String? = nil, name: Swift.String? = nil, - priority: Swift.Int? = nil + priority: Swift.Int? = nil, + qtype: Swift.String? = nil ) { self.action = action @@ -1208,6 +1241,7 @@ public struct CreateFirewallRuleInput: Swift.Equatable { self.firewallRuleGroupId = firewallRuleGroupId self.name = name self.priority = priority + self.qtype = qtype } } @@ -1222,6 +1256,7 @@ struct CreateFirewallRuleInputBody: Swift.Equatable { let blockOverrideDnsType: Route53ResolverClientTypes.BlockOverrideDnsType? let blockOverrideTtl: Swift.Int? let name: Swift.String? + let qtype: Swift.String? } extension CreateFirewallRuleInputBody: Swift.Decodable { @@ -1236,6 +1271,7 @@ extension CreateFirewallRuleInputBody: Swift.Decodable { case firewallRuleGroupId = "FirewallRuleGroupId" case name = "Name" case priority = "Priority" + case qtype = "Qtype" } public init(from decoder: Swift.Decoder) throws { @@ -1260,6 +1296,8 @@ extension CreateFirewallRuleInputBody: Swift.Decodable { blockOverrideTtl = blockOverrideTtlDecoded let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) name = nameDecoded + let qtypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .qtype) + qtype = qtypeDecoded } } @@ -2367,6 +2405,7 @@ extension DeleteFirewallRuleInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case firewallDomainListId = "FirewallDomainListId" case firewallRuleGroupId = "FirewallRuleGroupId" + case qtype = "Qtype" } public func encode(to encoder: Swift.Encoder) throws { @@ -2377,6 +2416,9 @@ extension DeleteFirewallRuleInput: Swift.Encodable { if let firewallRuleGroupId = self.firewallRuleGroupId { try encodeContainer.encode(firewallRuleGroupId, forKey: .firewallRuleGroupId) } + if let qtype = self.qtype { + try encodeContainer.encode(qtype, forKey: .qtype) + } } } @@ -2393,26 +2435,58 @@ public struct DeleteFirewallRuleInput: Swift.Equatable { /// The unique identifier of the firewall rule group that you want to delete the rule from. /// This member is required. public var firewallRuleGroupId: Swift.String? + /// The DNS query type that the rule you are deleting evaluates. Allowed values are; + /// + /// * A: Returns an IPv4 address. + /// + /// * AAAA: Returns an Ipv6 address. + /// + /// * CAA: Restricts CAs that can create SSL/TLS certifications for the domain. + /// + /// * CNAME: Returns another domain name. + /// + /// * DS: Record that identifies the DNSSEC signing key of a delegated zone. + /// + /// * MX: Specifies mail servers. + /// + /// * NAPTR: Regular-expression-based rewriting of domain names. + /// + /// * NS: Authoritative name servers. + /// + /// * PTR: Maps an IP address to a domain name. + /// + /// * SOA: Start of authority record for the zone. + /// + /// * SPF: Lists the servers authorized to send emails from a domain. + /// + /// * SRV: Application specific values that identify servers. + /// + /// * TXT: Verifies email senders and application-specific values. + public var qtype: Swift.String? public init( firewallDomainListId: Swift.String? = nil, - firewallRuleGroupId: Swift.String? = nil + firewallRuleGroupId: Swift.String? = nil, + qtype: Swift.String? = nil ) { self.firewallDomainListId = firewallDomainListId self.firewallRuleGroupId = firewallRuleGroupId + self.qtype = qtype } } struct DeleteFirewallRuleInputBody: Swift.Equatable { let firewallRuleGroupId: Swift.String? let firewallDomainListId: Swift.String? + let qtype: Swift.String? } extension DeleteFirewallRuleInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case firewallDomainListId = "FirewallDomainListId" case firewallRuleGroupId = "FirewallRuleGroupId" + case qtype = "Qtype" } public init(from decoder: Swift.Decoder) throws { @@ -2421,6 +2495,8 @@ extension DeleteFirewallRuleInputBody: Swift.Decodable { firewallRuleGroupId = firewallRuleGroupIdDecoded let firewallDomainListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .firewallDomainListId) firewallDomainListId = firewallDomainListIdDecoded + let qtypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .qtype) + qtype = qtypeDecoded } } @@ -3917,6 +3993,7 @@ extension Route53ResolverClientTypes.FirewallRule: Swift.Codable { case modificationTime = "ModificationTime" case name = "Name" case priority = "Priority" + case qtype = "Qtype" } public func encode(to encoder: Swift.Encoder) throws { @@ -3957,6 +4034,9 @@ extension Route53ResolverClientTypes.FirewallRule: Swift.Codable { if let priority = self.priority { try encodeContainer.encode(priority, forKey: .priority) } + if let qtype = self.qtype { + try encodeContainer.encode(qtype, forKey: .qtype) + } } public init(from decoder: Swift.Decoder) throws { @@ -3985,6 +4065,8 @@ extension Route53ResolverClientTypes.FirewallRule: Swift.Codable { creationTime = creationTimeDecoded let modificationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .modificationTime) modificationTime = modificationTimeDecoded + let qtypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .qtype) + qtype = qtypeDecoded } } @@ -4027,6 +4109,34 @@ extension Route53ResolverClientTypes { public var name: Swift.String? /// The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting. public var priority: Swift.Int? + /// The DNS query type you want the rule to evaluate. Allowed values are; + /// + /// * A: Returns an IPv4 address. + /// + /// * AAAA: Returns an Ipv6 address. + /// + /// * CAA: Restricts CAs that can create SSL/TLS certifications for the domain. + /// + /// * CNAME: Returns another domain name. + /// + /// * DS: Record that identifies the DNSSEC signing key of a delegated zone. + /// + /// * MX: Specifies mail servers. + /// + /// * NAPTR: Regular-expression-based rewriting of domain names. + /// + /// * NS: Authoritative name servers. + /// + /// * PTR: Maps an IP address to a domain name. + /// + /// * SOA: Start of authority record for the zone. + /// + /// * SPF: Lists the servers authorized to send emails from a domain. + /// + /// * SRV: Application specific values that identify servers. + /// + /// * TXT: Verifies email senders and application-specific values. + public var qtype: Swift.String? public init( action: Route53ResolverClientTypes.Action? = nil, @@ -4040,7 +4150,8 @@ extension Route53ResolverClientTypes { firewallRuleGroupId: Swift.String? = nil, modificationTime: Swift.String? = nil, name: Swift.String? = nil, - priority: Swift.Int? = nil + priority: Swift.Int? = nil, + qtype: Swift.String? = nil ) { self.action = action @@ -4055,6 +4166,7 @@ extension Route53ResolverClientTypes { self.modificationTime = modificationTime self.name = name self.priority = priority + self.qtype = qtype } } @@ -12846,6 +12958,7 @@ extension UpdateFirewallRuleInput: Swift.Encodable { case firewallRuleGroupId = "FirewallRuleGroupId" case name = "Name" case priority = "Priority" + case qtype = "Qtype" } public func encode(to encoder: Swift.Encoder) throws { @@ -12877,6 +12990,9 @@ extension UpdateFirewallRuleInput: Swift.Encodable { if let priority = self.priority { try encodeContainer.encode(priority, forKey: .priority) } + if let qtype = self.qtype { + try encodeContainer.encode(qtype, forKey: .qtype) + } } } @@ -12919,6 +13035,34 @@ public struct UpdateFirewallRuleInput: Swift.Equatable { public var name: Swift.String? /// The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting. You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the rules in a rule group at any time. public var priority: Swift.Int? + /// The DNS query type you want the rule to evaluate. Allowed values are; + /// + /// * A: Returns an IPv4 address. + /// + /// * AAAA: Returns an Ipv6 address. + /// + /// * CAA: Restricts CAs that can create SSL/TLS certifications for the domain. + /// + /// * CNAME: Returns another domain name. + /// + /// * DS: Record that identifies the DNSSEC signing key of a delegated zone. + /// + /// * MX: Specifies mail servers. + /// + /// * NAPTR: Regular-expression-based rewriting of domain names. + /// + /// * NS: Authoritative name servers. + /// + /// * PTR: Maps an IP address to a domain name. + /// + /// * SOA: Start of authority record for the zone. + /// + /// * SPF: Lists the servers authorized to send emails from a domain. + /// + /// * SRV: Application specific values that identify servers. + /// + /// * TXT: Verifies email senders and application-specific values. + public var qtype: Swift.String? public init( action: Route53ResolverClientTypes.Action? = nil, @@ -12929,7 +13073,8 @@ public struct UpdateFirewallRuleInput: Swift.Equatable { firewallDomainListId: Swift.String? = nil, firewallRuleGroupId: Swift.String? = nil, name: Swift.String? = nil, - priority: Swift.Int? = nil + priority: Swift.Int? = nil, + qtype: Swift.String? = nil ) { self.action = action @@ -12941,6 +13086,7 @@ public struct UpdateFirewallRuleInput: Swift.Equatable { self.firewallRuleGroupId = firewallRuleGroupId self.name = name self.priority = priority + self.qtype = qtype } } @@ -12954,6 +13100,7 @@ struct UpdateFirewallRuleInputBody: Swift.Equatable { let blockOverrideDnsType: Route53ResolverClientTypes.BlockOverrideDnsType? let blockOverrideTtl: Swift.Int? let name: Swift.String? + let qtype: Swift.String? } extension UpdateFirewallRuleInputBody: Swift.Decodable { @@ -12967,6 +13114,7 @@ extension UpdateFirewallRuleInputBody: Swift.Decodable { case firewallRuleGroupId = "FirewallRuleGroupId" case name = "Name" case priority = "Priority" + case qtype = "Qtype" } public init(from decoder: Swift.Decoder) throws { @@ -12989,6 +13137,8 @@ extension UpdateFirewallRuleInputBody: Swift.Decodable { blockOverrideTtl = blockOverrideTtlDecoded let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) name = nameDecoded + let qtypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .qtype) + qtype = qtypeDecoded } } diff --git a/Sources/Services/AWSS3Control/EndpointResolver.swift b/Sources/Services/AWSS3Control/EndpointResolver.swift index ca75eb80ec9..5f7125c8dfd 100644 --- a/Sources/Services/AWSS3Control/EndpointResolver.swift +++ b/Sources/Services/AWSS3Control/EndpointResolver.swift @@ -58,7 +58,7 @@ public protocol EndpointResolver { public struct DefaultEndpointResolver: EndpointResolver { private let engine: AWSClientRuntime.AWSEndpointsRuleEngine - private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"},\"AccountId\":{\"required\":false,\"documentation\":\"The Account ID used to send the request. This is an optional parameter that will be set automatically for operations that require it.\",\"type\":\"String\"},\"RequiresAccountId\":{\"required\":false,\"documentation\":\"Internal parameter for operations that require account id host prefix.\",\"type\":\"Boolean\"},\"OutpostId\":{\"required\":false,\"documentation\":\"The Outpost ID. Some operations have an optional OutpostId which should be used in endpoint construction.\",\"type\":\"String\"},\"Bucket\":{\"required\":false,\"documentation\":\"The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.\",\"type\":\"String\"},\"AccessPointName\":{\"required\":false,\"documentation\":\"The S3 AccessPointName used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 AccessPoint.\",\"type\":\"String\"},\"UseArnRegion\":{\"builtIn\":\"AWS::S3Control::UseArnRegion\",\"required\":false,\"documentation\":\"When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.\",\"type\":\"Boolean\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"Region\"},\"snow\"]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"S3 Snow does not support DualStack\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"S3 Snow does not support FIPS\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"OutpostId\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]},\"aws-cn\"]}],\"error\":\"Partition does not support FIPS\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}]}],\"error\":\"AccountId is required but not set\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"AccountId\"},false]}]}],\"error\":\"AccountId must only contain a-z, A-Z, 0-9 and `-`.\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"not\",\"argv\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"OutpostId\"},false]}]}],\"error\":\"OutpostId must only contain a-z, A-Z, 0-9 and `-`.\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"Region\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid configuration: Outposts do not support dual-stack\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://s3-outposts.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region: region was not a valid DNS name.\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccessPointName\"}]},{\"fn\":\"aws.parseArn\",\"argv\":[{\"ref\":\"AccessPointName\"}],\"assign\":\"accessPointArn\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[0]\"],\"assign\":\"arnType\"},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"arnType\"},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"service\"]},\"s3-outposts\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid configuration: Outpost Access Points do not support dual-stack\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[1]\"],\"assign\":\"outpostId\"}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"outpostId\"},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"UseArnRegion\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseArnRegion\"},false]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"region\"]},\"{Region}\"]}]}],\"error\":\"Invalid configuration: region from ARN `{accessPointArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"region\"]}],\"assign\":\"arnPartition\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"arnPartition\"},\"name\"]},{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"region\"]},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"accountId\"]},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"accountId\"]},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"AccountId\"},\"{accessPointArn#accountId}\"]}]}],\"error\":\"Invalid ARN: the accountId specified in the ARN (`{accessPointArn#accountId}`) does not match the parameter (`{AccountId}`)\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[2]\"],\"assign\":\"outpostType\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[3]\"],\"assign\":\"accessPointName\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"outpostType\"},\"accesspoint\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{accessPointArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://s3-outposts.{accessPointArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Expected an outpost type `accesspoint`, found `{outpostType}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: expected an access point name\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: Expected a 4-component resource\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointArn#accountId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: missing account ID\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region in ARN: `{accessPointArn#region}` (invalid DNS name)\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Client was configured for partition `{partitionResult#name}` but ARN has `{arnPartition#name}`\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`., found: `{outpostId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The Outpost Id was not set\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: No ARN type specified\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Bucket\"}]},{\"fn\":\"aws.parseArn\",\"argv\":[{\"ref\":\"Bucket\"}],\"assign\":\"bucketArn\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[0]\"],\"assign\":\"arnType\"},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"arnType\"},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"service\"]},\"s3-outposts\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid configuration: Outpost buckets do not support dual-stack\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[1]\"],\"assign\":\"outpostId\"}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"outpostId\"},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"UseArnRegion\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseArnRegion\"},false]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"region\"]},\"{Region}\"]}]}],\"error\":\"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"region\"]}],\"assign\":\"arnPartition\"}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"arnPartition\"},\"name\"]},{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"region\"]},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"accountId\"]},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"accountId\"]},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"AccountId\"},\"{bucketArn#accountId}\"]}]}],\"error\":\"Invalid ARN: the accountId specified in the ARN (`{bucketArn#accountId}`) does not match the parameter (`{AccountId}`)\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[2]\"],\"assign\":\"outpostType\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[3]\"],\"assign\":\"bucketName\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"outpostType\"},\"bucket\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{bucketArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://s3-outposts.{bucketArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: Expected an outpost type `bucket`, found `{outpostType}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: expected a bucket name\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: Expected a 4-component resource\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: missing account ID\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Client was configured for partition `{partitionResult#name}` but ARN has `{arnPartition#name}`\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`., found: `{outpostId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The Outpost Id was not set\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: No ARN type specified\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"Region\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]},\"aws-cn\"]}],\"error\":\"Partition does not support FIPS\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}]}],\"error\":\"AccountId is required but not set\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"AccountId\"},false]}]}],\"error\":\"AccountId must only contain a-z, A-Z, 0-9 and `-`.\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: DualStack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"{url#scheme}://{AccountId}.{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control-fips.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]}],\"endpoint\":{\"url\":\"https://s3-control-fips.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-control.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]}],\"endpoint\":{\"url\":\"https://s3-control.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region: region was not a valid DNS name.\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Region must be set\",\"type\":\"error\"}]}" + private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"},\"AccountId\":{\"required\":false,\"documentation\":\"The Account ID used to send the request. This is an optional parameter that will be set automatically for operations that require it.\",\"type\":\"String\"},\"RequiresAccountId\":{\"required\":false,\"documentation\":\"Internal parameter for operations that require account id host prefix.\",\"type\":\"Boolean\"},\"OutpostId\":{\"required\":false,\"documentation\":\"The Outpost ID. Some operations have an optional OutpostId which should be used in endpoint construction.\",\"type\":\"String\"},\"Bucket\":{\"required\":false,\"documentation\":\"The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.\",\"type\":\"String\"},\"AccessPointName\":{\"required\":false,\"documentation\":\"The S3 AccessPointName used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 AccessPoint.\",\"type\":\"String\"},\"UseArnRegion\":{\"builtIn\":\"AWS::S3Control::UseArnRegion\",\"required\":false,\"documentation\":\"When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.\",\"type\":\"Boolean\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"Region\"},\"snow\"]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"S3 Snow does not support DualStack\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"S3 Snow does not support FIPS\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"OutpostId\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]},\"aws-cn\"]}],\"error\":\"Partition does not support FIPS\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}]}],\"error\":\"AccountId is required but not set\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"AccountId\"},false]}]}],\"error\":\"AccountId must only contain a-z, A-Z, 0-9 and `-`.\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"not\",\"argv\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"OutpostId\"},false]}]}],\"error\":\"OutpostId must only contain a-z, A-Z, 0-9 and `-`.\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: DualStack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"Region\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{Region}.{partitionResult#dualStackDnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts.{Region}.{partitionResult#dualStackDnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://s3-outposts.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region: region was not a valid DNS name.\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccessPointName\"}]},{\"fn\":\"aws.parseArn\",\"argv\":[{\"ref\":\"AccessPointName\"}],\"assign\":\"accessPointArn\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[0]\"],\"assign\":\"arnType\"},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"arnType\"},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"service\"]},\"s3-outposts\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[1]\"],\"assign\":\"outpostId\"}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"outpostId\"},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: DualStack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"UseArnRegion\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseArnRegion\"},false]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"region\"]},\"{Region}\"]}]}],\"error\":\"Invalid configuration: region from ARN `{accessPointArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"region\"]}],\"assign\":\"arnPartition\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"arnPartition\"},\"name\"]},{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"region\"]},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"accountId\"]},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"accountId\"]},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"AccountId\"},\"{accessPointArn#accountId}\"]}]}],\"error\":\"Invalid ARN: the accountId specified in the ARN (`{accessPointArn#accountId}`) does not match the parameter (`{AccountId}`)\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[2]\"],\"assign\":\"outpostType\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"accessPointArn\"},\"resourceId[3]\"],\"assign\":\"accessPointName\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"outpostType\"},\"accesspoint\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{accessPointArn#region}.{arnPartition#dualStackDnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{accessPointArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts.{accessPointArn#region}.{arnPartition#dualStackDnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://s3-outposts.{accessPointArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{accessPointArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{accessPointArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Expected an outpost type `accesspoint`, found `{outpostType}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: expected an access point name\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: Expected a 4-component resource\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointArn#accountId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: missing account ID\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region in ARN: `{accessPointArn#region}` (invalid DNS name)\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Client was configured for partition `{partitionResult#name}` but ARN has `{arnPartition#name}`\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`., found: `{outpostId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The Outpost Id was not set\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: No ARN type specified\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Bucket\"}]},{\"fn\":\"aws.parseArn\",\"argv\":[{\"ref\":\"Bucket\"}],\"assign\":\"bucketArn\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[0]\"],\"assign\":\"arnType\"},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"arnType\"},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"service\"]},\"s3-outposts\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[1]\"],\"assign\":\"outpostId\"}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"outpostId\"},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: DualStack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"UseArnRegion\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseArnRegion\"},false]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"region\"]},\"{Region}\"]}]}],\"error\":\"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"region\"]}],\"assign\":\"arnPartition\"}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"arnPartition\"},\"name\"]},{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"region\"]},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"accountId\"]},\"\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"accountId\"]},false]}],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"AccountId\"},\"{bucketArn#accountId}\"]}]}],\"error\":\"Invalid ARN: the accountId specified in the ARN (`{bucketArn#accountId}`) does not match the parameter (`{AccountId}`)\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[2]\"],\"assign\":\"outpostType\"}],\"rules\":[{\"conditions\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"bucketArn\"},\"resourceId[3]\"],\"assign\":\"bucketName\"}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[{\"ref\":\"outpostType\"},\"bucket\"]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{bucketArn#region}.{arnPartition#dualStackDnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts-fips.{bucketArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-outposts.{bucketArn#region}.{arnPartition#dualStackDnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://s3-outposts.{bucketArn#region}.{arnPartition#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3-outposts\",\"signingRegion\":\"{bucketArn#region}\"}]},\"headers\":{\"x-amz-account-id\":[\"{bucketArn#accountId}\"],\"x-amz-outpost-id\":[\"{outpostId}\"]}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: Expected an outpost type `bucket`, found `{outpostType}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: expected a bucket name\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: Expected a 4-component resource\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: missing account ID\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Client was configured for partition `{partitionResult#name}` but ARN has `{arnPartition#name}`\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`., found: `{outpostId}`\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: The Outpost Id was not set\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid ARN: No ARN type specified\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"partitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"Region\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"stringEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"partitionResult\"},\"name\"]},\"aws-cn\"]}],\"error\":\"Partition does not support FIPS\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}]}],\"error\":\"AccountId is required but not set\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]},{\"fn\":\"not\",\"argv\":[{\"fn\":\"isValidHostLabel\",\"argv\":[{\"ref\":\"AccountId\"},false]}]}],\"error\":\"AccountId must only contain a-z, A-Z, 0-9 and `-`.\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]},{\"fn\":\"parseURL\",\"argv\":[{\"ref\":\"Endpoint\"}],\"assign\":\"url\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: DualStack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"{url#scheme}://{AccountId}.{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"{url#scheme}://{url#authority}{url#path}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control-fips.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]}],\"endpoint\":{\"url\":\"https://s3-control-fips.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"endpoint\":{\"url\":\"https://s3-control.dualstack.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"RequiresAccountId\"}]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"RequiresAccountId\"},true]},{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"AccountId\"}]}],\"endpoint\":{\"url\":\"https://{AccountId}.s3-control.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},false]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},false]}],\"endpoint\":{\"url\":\"https://s3-control.{Region}.{partitionResult#dnsSuffix}\",\"properties\":{\"authSchemes\":[{\"disableDoubleEncoding\":true,\"name\":\"sigv4\",\"signingName\":\"s3\",\"signingRegion\":\"{Region}\"}]},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid region: region was not a valid DNS name.\",\"type\":\"error\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Region must be set\",\"type\":\"error\"}]}" public init() throws { engine = try AWSClientRuntime.AWSEndpointsRuleEngine(ruleSet: ruleSet) diff --git a/Sources/Services/AWSSageMaker/Paginators.swift b/Sources/Services/AWSSageMaker/Paginators.swift index 2355b15468b..8e9b2f4f204 100644 --- a/Sources/Services/AWSSageMaker/Paginators.swift +++ b/Sources/Services/AWSSageMaker/Paginators.swift @@ -2551,7 +2551,8 @@ extension SearchInput: ClientRuntime.PaginateToken { resource: self.resource, searchExpression: self.searchExpression, sortBy: self.sortBy, - sortOrder: self.sortOrder + sortOrder: self.sortOrder, + visibilityConditions: self.visibilityConditions )} } diff --git a/Sources/Services/AWSSageMaker/models/Models.swift b/Sources/Services/AWSSageMaker/models/Models.swift index 38a190afb06..f33786b5fff 100644 --- a/Sources/Services/AWSSageMaker/models/Models.swift +++ b/Sources/Services/AWSSageMaker/models/Models.swift @@ -689,11 +689,13 @@ extension SageMakerClientTypes { extension SageMakerClientTypes { public enum AdditionalS3DataSourceDataType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case s3object + case s3prefix case sdkUnknown(Swift.String) public static var allCases: [AdditionalS3DataSourceDataType] { return [ .s3object, + .s3prefix, .sdkUnknown("") ] } @@ -704,6 +706,7 @@ extension SageMakerClientTypes { public var rawValue: Swift.String { switch self { case .s3object: return "S3Object" + case .s3prefix: return "S3Prefix" case let .sdkUnknown(s): return s } } @@ -2676,38 +2679,26 @@ extension SageMakerClientTypes { public enum AppType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case canvas case codeeditor - case datasetmanager case detailedprofiler case jupyterlab case jupyterserver case kernelgateway - case local - case rsession case rsessiongateway case rstudioserverpro - case sagemakerlite - case savitur case tensorboard - case vscode case sdkUnknown(Swift.String) public static var allCases: [AppType] { return [ .canvas, .codeeditor, - .datasetmanager, .detailedprofiler, .jupyterlab, .jupyterserver, .kernelgateway, - .local, - .rsession, .rsessiongateway, .rstudioserverpro, - .sagemakerlite, - .savitur, .tensorboard, - .vscode, .sdkUnknown("") ] } @@ -2719,19 +2710,13 @@ extension SageMakerClientTypes { switch self { case .canvas: return "Canvas" case .codeeditor: return "CodeEditor" - case .datasetmanager: return "DatasetManager" case .detailedprofiler: return "DetailedProfiler" case .jupyterlab: return "JupyterLab" case .jupyterserver: return "JupyterServer" case .kernelgateway: return "KernelGateway" - case .local: return "Local" - case .rsession: return "RSession" case .rsessiongateway: return "RSessionGateway" case .rstudioserverpro: return "RStudioServerPro" - case .sagemakerlite: return "SageMakerLite" - case .savitur: return "Savitur" case .tensorboard: return "TensorBoard" - case .vscode: return "VSCode" case let .sdkUnknown(s): return s } } @@ -14749,6 +14734,7 @@ extension CreateFeatureGroupInput: Swift.Encodable { case recordIdentifierFeatureName = "RecordIdentifierFeatureName" case roleArn = "RoleArn" case tags = "Tags" + case throughputConfig = "ThroughputConfig" } public func encode(to encoder: Swift.Encoder) throws { @@ -14786,6 +14772,9 @@ extension CreateFeatureGroupInput: Swift.Encodable { try tagsContainer.encode(tag0) } } + if let throughputConfig = self.throughputConfig { + try encodeContainer.encode(throughputConfig, forKey: .throughputConfig) + } } } @@ -14841,6 +14830,8 @@ public struct CreateFeatureGroupInput: Swift.Equatable { public var roleArn: Swift.String? /// Tags used to identify Features in each FeatureGroup. public var tags: [SageMakerClientTypes.Tag]? + /// Used to set feature group throughput configuration. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the [Standard](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) tier online store. + public var throughputConfig: SageMakerClientTypes.ThroughputConfig? public init( description: Swift.String? = nil, @@ -14851,7 +14842,8 @@ public struct CreateFeatureGroupInput: Swift.Equatable { onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfig? = nil, recordIdentifierFeatureName: Swift.String? = nil, roleArn: Swift.String? = nil, - tags: [SageMakerClientTypes.Tag]? = nil + tags: [SageMakerClientTypes.Tag]? = nil, + throughputConfig: SageMakerClientTypes.ThroughputConfig? = nil ) { self.description = description @@ -14863,6 +14855,7 @@ public struct CreateFeatureGroupInput: Swift.Equatable { self.recordIdentifierFeatureName = recordIdentifierFeatureName self.roleArn = roleArn self.tags = tags + self.throughputConfig = throughputConfig } } @@ -14873,6 +14866,7 @@ struct CreateFeatureGroupInputBody: Swift.Equatable { let featureDefinitions: [SageMakerClientTypes.FeatureDefinition]? let onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfig? let offlineStoreConfig: SageMakerClientTypes.OfflineStoreConfig? + let throughputConfig: SageMakerClientTypes.ThroughputConfig? let roleArn: Swift.String? let description: Swift.String? let tags: [SageMakerClientTypes.Tag]? @@ -14889,6 +14883,7 @@ extension CreateFeatureGroupInputBody: Swift.Decodable { case recordIdentifierFeatureName = "RecordIdentifierFeatureName" case roleArn = "RoleArn" case tags = "Tags" + case throughputConfig = "ThroughputConfig" } public init(from decoder: Swift.Decoder) throws { @@ -14914,6 +14909,8 @@ extension CreateFeatureGroupInputBody: Swift.Decodable { onlineStoreConfig = onlineStoreConfigDecoded let offlineStoreConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.OfflineStoreConfig.self, forKey: .offlineStoreConfig) offlineStoreConfig = offlineStoreConfigDecoded + let throughputConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ThroughputConfig.self, forKey: .throughputConfig) + throughputConfig = throughputConfigDecoded let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) roleArn = roleArnDecoded let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) @@ -20611,6 +20608,7 @@ extension CreateTrainingJobInput: Swift.Encodable { case outputDataConfig = "OutputDataConfig" case profilerConfig = "ProfilerConfig" case profilerRuleConfigurations = "ProfilerRuleConfigurations" + case remoteDebugConfig = "RemoteDebugConfig" case resourceConfig = "ResourceConfig" case retryStrategy = "RetryStrategy" case roleArn = "RoleArn" @@ -20683,6 +20681,9 @@ extension CreateTrainingJobInput: Swift.Encodable { try profilerRuleConfigurationsContainer.encode(profilerruleconfiguration0) } } + if let remoteDebugConfig = self.remoteDebugConfig { + try encodeContainer.encode(remoteDebugConfig, forKey: .remoteDebugConfig) + } if let resourceConfig = self.resourceConfig { try encodeContainer.encode(resourceConfig, forKey: .resourceConfig) } @@ -20758,6 +20759,8 @@ public struct CreateTrainingJobInput: Swift.Equatable { public var profilerConfig: SageMakerClientTypes.ProfilerConfig? /// Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics. public var profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? + /// Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see [Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging](https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html). + public var remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfig? /// The resources, including the ML compute instances and ML storage volumes, to use for model training. ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1. /// This member is required. public var resourceConfig: SageMakerClientTypes.ResourceConfig? @@ -20795,6 +20798,7 @@ public struct CreateTrainingJobInput: Swift.Equatable { outputDataConfig: SageMakerClientTypes.OutputDataConfig? = nil, profilerConfig: SageMakerClientTypes.ProfilerConfig? = nil, profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? = nil, + remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfig? = nil, resourceConfig: SageMakerClientTypes.ResourceConfig? = nil, retryStrategy: SageMakerClientTypes.RetryStrategy? = nil, roleArn: Swift.String? = nil, @@ -20820,6 +20824,7 @@ public struct CreateTrainingJobInput: Swift.Equatable { self.outputDataConfig = outputDataConfig self.profilerConfig = profilerConfig self.profilerRuleConfigurations = profilerRuleConfigurations + self.remoteDebugConfig = remoteDebugConfig self.resourceConfig = resourceConfig self.retryStrategy = retryStrategy self.roleArn = roleArn @@ -20854,6 +20859,7 @@ struct CreateTrainingJobInputBody: Swift.Equatable { let profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? let environment: [Swift.String:Swift.String]? let retryStrategy: SageMakerClientTypes.RetryStrategy? + let remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfig? let infraCheckConfig: SageMakerClientTypes.InfraCheckConfig? } @@ -20874,6 +20880,7 @@ extension CreateTrainingJobInputBody: Swift.Decodable { case outputDataConfig = "OutputDataConfig" case profilerConfig = "ProfilerConfig" case profilerRuleConfigurations = "ProfilerRuleConfigurations" + case remoteDebugConfig = "RemoteDebugConfig" case resourceConfig = "ResourceConfig" case retryStrategy = "RetryStrategy" case roleArn = "RoleArn" @@ -20984,6 +20991,8 @@ extension CreateTrainingJobInputBody: Swift.Decodable { environment = environmentDecoded0 let retryStrategyDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.RetryStrategy.self, forKey: .retryStrategy) retryStrategy = retryStrategyDecoded + let remoteDebugConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.RemoteDebugConfig.self, forKey: .remoteDebugConfig) + remoteDebugConfig = remoteDebugConfigDecoded let infraCheckConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.InfraCheckConfig.self, forKey: .infraCheckConfig) infraCheckConfig = infraCheckConfigDecoded } @@ -32811,6 +32820,7 @@ extension DescribeFeatureGroupOutput: ClientRuntime.HttpResponseBinding { self.onlineStoreTotalSizeBytes = output.onlineStoreTotalSizeBytes self.recordIdentifierFeatureName = output.recordIdentifierFeatureName self.roleArn = output.roleArn + self.throughputConfig = output.throughputConfig } else { self.creationTime = nil self.description = nil @@ -32829,6 +32839,7 @@ extension DescribeFeatureGroupOutput: ClientRuntime.HttpResponseBinding { self.onlineStoreTotalSizeBytes = nil self.recordIdentifierFeatureName = nil self.roleArn = nil + self.throughputConfig = nil } } } @@ -32889,6 +32900,8 @@ public struct DescribeFeatureGroupOutput: Swift.Equatable { public var recordIdentifierFeatureName: Swift.String? /// The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided. public var roleArn: Swift.String? + /// Active throughput configuration of the feature group. Used to set feature group throughput configuration. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the [Standard](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) tier online store. + public var throughputConfig: SageMakerClientTypes.ThroughputConfigDescription? public init( creationTime: ClientRuntime.Date? = nil, @@ -32907,7 +32920,8 @@ public struct DescribeFeatureGroupOutput: Swift.Equatable { onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfig? = nil, onlineStoreTotalSizeBytes: Swift.Int? = nil, recordIdentifierFeatureName: Swift.String? = nil, - roleArn: Swift.String? = nil + roleArn: Swift.String? = nil, + throughputConfig: SageMakerClientTypes.ThroughputConfigDescription? = nil ) { self.creationTime = creationTime @@ -32927,6 +32941,7 @@ public struct DescribeFeatureGroupOutput: Swift.Equatable { self.onlineStoreTotalSizeBytes = onlineStoreTotalSizeBytes self.recordIdentifierFeatureName = recordIdentifierFeatureName self.roleArn = roleArn + self.throughputConfig = throughputConfig } } @@ -32940,6 +32955,7 @@ struct DescribeFeatureGroupOutputBody: Swift.Equatable { let lastModifiedTime: ClientRuntime.Date? let onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfig? let offlineStoreConfig: SageMakerClientTypes.OfflineStoreConfig? + let throughputConfig: SageMakerClientTypes.ThroughputConfigDescription? let roleArn: Swift.String? let featureGroupStatus: SageMakerClientTypes.FeatureGroupStatus? let offlineStoreStatus: SageMakerClientTypes.OfflineStoreStatus? @@ -32969,6 +32985,7 @@ extension DescribeFeatureGroupOutputBody: Swift.Decodable { case onlineStoreTotalSizeBytes = "OnlineStoreTotalSizeBytes" case recordIdentifierFeatureName = "RecordIdentifierFeatureName" case roleArn = "RoleArn" + case throughputConfig = "ThroughputConfig" } public init(from decoder: Swift.Decoder) throws { @@ -33000,6 +33017,8 @@ extension DescribeFeatureGroupOutputBody: Swift.Decodable { onlineStoreConfig = onlineStoreConfigDecoded let offlineStoreConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.OfflineStoreConfig.self, forKey: .offlineStoreConfig) offlineStoreConfig = offlineStoreConfigDecoded + let throughputConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ThroughputConfigDescription.self, forKey: .throughputConfig) + throughputConfig = throughputConfigDecoded let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) roleArn = roleArnDecoded let featureGroupStatusDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.FeatureGroupStatus.self, forKey: .featureGroupStatus) @@ -40216,6 +40235,7 @@ extension DescribeTrainingJobOutput: ClientRuntime.HttpResponseBinding { self.profilerRuleConfigurations = output.profilerRuleConfigurations self.profilerRuleEvaluationStatuses = output.profilerRuleEvaluationStatuses self.profilingStatus = output.profilingStatus + self.remoteDebugConfig = output.remoteDebugConfig self.resourceConfig = output.resourceConfig self.retryStrategy = output.retryStrategy self.roleArn = output.roleArn @@ -40259,6 +40279,7 @@ extension DescribeTrainingJobOutput: ClientRuntime.HttpResponseBinding { self.profilerRuleConfigurations = nil self.profilerRuleEvaluationStatuses = nil self.profilingStatus = nil + self.remoteDebugConfig = nil self.resourceConfig = nil self.retryStrategy = nil self.roleArn = nil @@ -40341,6 +40362,8 @@ public struct DescribeTrainingJobOutput: Swift.Equatable { public var profilerRuleEvaluationStatuses: [SageMakerClientTypes.ProfilerRuleEvaluationStatus]? /// Profiling status of a training job. public var profilingStatus: SageMakerClientTypes.ProfilingStatus? + /// Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see [Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging](https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html). + public var remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfig? /// Resources, including ML compute instances and ML storage volumes, that are configured for model training. /// This member is required. public var resourceConfig: SageMakerClientTypes.ResourceConfig? @@ -40463,6 +40486,7 @@ public struct DescribeTrainingJobOutput: Swift.Equatable { profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? = nil, profilerRuleEvaluationStatuses: [SageMakerClientTypes.ProfilerRuleEvaluationStatus]? = nil, profilingStatus: SageMakerClientTypes.ProfilingStatus? = nil, + remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfig? = nil, resourceConfig: SageMakerClientTypes.ResourceConfig? = nil, retryStrategy: SageMakerClientTypes.RetryStrategy? = nil, roleArn: Swift.String? = nil, @@ -40507,6 +40531,7 @@ public struct DescribeTrainingJobOutput: Swift.Equatable { self.profilerRuleConfigurations = profilerRuleConfigurations self.profilerRuleEvaluationStatuses = profilerRuleEvaluationStatuses self.profilingStatus = profilingStatus + self.remoteDebugConfig = remoteDebugConfig self.resourceConfig = resourceConfig self.retryStrategy = retryStrategy self.roleArn = roleArn @@ -40568,6 +40593,7 @@ struct DescribeTrainingJobOutputBody: Swift.Equatable { let profilingStatus: SageMakerClientTypes.ProfilingStatus? let environment: [Swift.String:Swift.String]? let retryStrategy: SageMakerClientTypes.RetryStrategy? + let remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfig? let infraCheckConfig: SageMakerClientTypes.InfraCheckConfig? } @@ -40599,6 +40625,7 @@ extension DescribeTrainingJobOutputBody: Swift.Decodable { case profilerRuleConfigurations = "ProfilerRuleConfigurations" case profilerRuleEvaluationStatuses = "ProfilerRuleEvaluationStatuses" case profilingStatus = "ProfilingStatus" + case remoteDebugConfig = "RemoteDebugConfig" case resourceConfig = "ResourceConfig" case retryStrategy = "RetryStrategy" case roleArn = "RoleArn" @@ -40782,6 +40809,8 @@ extension DescribeTrainingJobOutputBody: Swift.Decodable { environment = environmentDecoded0 let retryStrategyDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.RetryStrategy.self, forKey: .retryStrategy) retryStrategy = retryStrategyDecoded + let remoteDebugConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.RemoteDebugConfig.self, forKey: .remoteDebugConfig) + remoteDebugConfig = remoteDebugConfigDecoded let infraCheckConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.InfraCheckConfig.self, forKey: .infraCheckConfig) infraCheckConfig = infraCheckConfigDecoded } @@ -43049,6 +43078,63 @@ enum DisassociateTrialComponentOutputError: ClientRuntime.HttpResponseErrorBindi } } +extension SageMakerClientTypes.DockerSettings: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enableDockerAccess = "EnableDockerAccess" + case vpcOnlyTrustedAccounts = "VpcOnlyTrustedAccounts" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let enableDockerAccess = self.enableDockerAccess { + try encodeContainer.encode(enableDockerAccess.rawValue, forKey: .enableDockerAccess) + } + if let vpcOnlyTrustedAccounts = vpcOnlyTrustedAccounts { + var vpcOnlyTrustedAccountsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .vpcOnlyTrustedAccounts) + for accountid0 in vpcOnlyTrustedAccounts { + try vpcOnlyTrustedAccountsContainer.encode(accountid0) + } + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let enableDockerAccessDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.FeatureStatus.self, forKey: .enableDockerAccess) + enableDockerAccess = enableDockerAccessDecoded + let vpcOnlyTrustedAccountsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .vpcOnlyTrustedAccounts) + var vpcOnlyTrustedAccountsDecoded0:[Swift.String]? = nil + if let vpcOnlyTrustedAccountsContainer = vpcOnlyTrustedAccountsContainer { + vpcOnlyTrustedAccountsDecoded0 = [Swift.String]() + for string0 in vpcOnlyTrustedAccountsContainer { + if let string0 = string0 { + vpcOnlyTrustedAccountsDecoded0?.append(string0) + } + } + } + vpcOnlyTrustedAccounts = vpcOnlyTrustedAccountsDecoded0 + } +} + +extension SageMakerClientTypes { + /// A collection of settings that configure the domain's Docker interaction. + public struct DockerSettings: Swift.Equatable { + /// Indicates whether the domain can access Docker. + public var enableDockerAccess: SageMakerClientTypes.FeatureStatus? + /// The list of Amazon Web Services accounts that are trusted when the domain is created in VPC-only mode. + public var vpcOnlyTrustedAccounts: [Swift.String]? + + public init( + enableDockerAccess: SageMakerClientTypes.FeatureStatus? = nil, + vpcOnlyTrustedAccounts: [Swift.String]? = nil + ) + { + self.enableDockerAccess = enableDockerAccess + self.vpcOnlyTrustedAccounts = vpcOnlyTrustedAccounts + } + } + +} + extension SageMakerClientTypes.DomainDetails: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case creationTime = "CreationTime" @@ -43146,6 +43232,7 @@ extension SageMakerClientTypes { extension SageMakerClientTypes.DomainSettings: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case dockerSettings = "DockerSettings" case executionRoleIdentityConfig = "ExecutionRoleIdentityConfig" case rStudioServerProDomainSettings = "RStudioServerProDomainSettings" case securityGroupIds = "SecurityGroupIds" @@ -43153,6 +43240,9 @@ extension SageMakerClientTypes.DomainSettings: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let dockerSettings = self.dockerSettings { + try encodeContainer.encode(dockerSettings, forKey: .dockerSettings) + } if let executionRoleIdentityConfig = self.executionRoleIdentityConfig { try encodeContainer.encode(executionRoleIdentityConfig.rawValue, forKey: .executionRoleIdentityConfig) } @@ -43184,12 +43274,16 @@ extension SageMakerClientTypes.DomainSettings: Swift.Codable { rStudioServerProDomainSettings = rStudioServerProDomainSettingsDecoded let executionRoleIdentityConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ExecutionRoleIdentityConfig.self, forKey: .executionRoleIdentityConfig) executionRoleIdentityConfig = executionRoleIdentityConfigDecoded + let dockerSettingsDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.DockerSettings.self, forKey: .dockerSettings) + dockerSettings = dockerSettingsDecoded } } extension SageMakerClientTypes { /// A collection of settings that apply to the SageMaker Domain. These settings are specified through the CreateDomain API call. public struct DomainSettings: Swift.Equatable { + /// A collection of settings that configure the domain's Docker interaction. + public var dockerSettings: SageMakerClientTypes.DockerSettings? /// The configuration for attaching a SageMaker user profile name to the execution role as a [sts:SourceIdentity key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html). public var executionRoleIdentityConfig: SageMakerClientTypes.ExecutionRoleIdentityConfig? /// A collection of settings that configure the RStudioServerPro Domain-level app. @@ -43198,11 +43292,13 @@ extension SageMakerClientTypes { public var securityGroupIds: [Swift.String]? public init( + dockerSettings: SageMakerClientTypes.DockerSettings? = nil, executionRoleIdentityConfig: SageMakerClientTypes.ExecutionRoleIdentityConfig? = nil, rStudioServerProDomainSettings: SageMakerClientTypes.RStudioServerProDomainSettings? = nil, securityGroupIds: [Swift.String]? = nil ) { + self.dockerSettings = dockerSettings self.executionRoleIdentityConfig = executionRoleIdentityConfig self.rStudioServerProDomainSettings = rStudioServerProDomainSettings self.securityGroupIds = securityGroupIds @@ -43213,6 +43309,7 @@ extension SageMakerClientTypes { extension SageMakerClientTypes.DomainSettingsForUpdate: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { + case dockerSettings = "DockerSettings" case executionRoleIdentityConfig = "ExecutionRoleIdentityConfig" case rStudioServerProDomainSettingsForUpdate = "RStudioServerProDomainSettingsForUpdate" case securityGroupIds = "SecurityGroupIds" @@ -43220,6 +43317,9 @@ extension SageMakerClientTypes.DomainSettingsForUpdate: Swift.Codable { public func encode(to encoder: Swift.Encoder) throws { var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let dockerSettings = self.dockerSettings { + try encodeContainer.encode(dockerSettings, forKey: .dockerSettings) + } if let executionRoleIdentityConfig = self.executionRoleIdentityConfig { try encodeContainer.encode(executionRoleIdentityConfig.rawValue, forKey: .executionRoleIdentityConfig) } @@ -43251,12 +43351,16 @@ extension SageMakerClientTypes.DomainSettingsForUpdate: Swift.Codable { } } securityGroupIds = securityGroupIdsDecoded0 + let dockerSettingsDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.DockerSettings.self, forKey: .dockerSettings) + dockerSettings = dockerSettingsDecoded } } extension SageMakerClientTypes { /// A collection of Domain configuration settings to update. public struct DomainSettingsForUpdate: Swift.Equatable { + /// A collection of settings that configure the domain's Docker interaction. + public var dockerSettings: SageMakerClientTypes.DockerSettings? /// The configuration for attaching a SageMaker user profile name to the execution role as a [sts:SourceIdentity key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html). This configuration can only be modified if there are no apps in the InService or Pending state. public var executionRoleIdentityConfig: SageMakerClientTypes.ExecutionRoleIdentityConfig? /// A collection of RStudioServerPro Domain-level app settings to update. A single RStudioServerPro application is created for a domain. @@ -43265,11 +43369,13 @@ extension SageMakerClientTypes { public var securityGroupIds: [Swift.String]? public init( + dockerSettings: SageMakerClientTypes.DockerSettings? = nil, executionRoleIdentityConfig: SageMakerClientTypes.ExecutionRoleIdentityConfig? = nil, rStudioServerProDomainSettingsForUpdate: SageMakerClientTypes.RStudioServerProDomainSettingsForUpdate? = nil, securityGroupIds: [Swift.String]? = nil ) { + self.dockerSettings = dockerSettings self.executionRoleIdentityConfig = executionRoleIdentityConfig self.rStudioServerProDomainSettingsForUpdate = rStudioServerProDomainSettingsForUpdate self.securityGroupIds = securityGroupIds @@ -89338,6 +89444,76 @@ extension SageMakerClientTypes { } +extension SageMakerClientTypes.RemoteDebugConfig: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enableRemoteDebug = "EnableRemoteDebug" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let enableRemoteDebug = self.enableRemoteDebug { + try encodeContainer.encode(enableRemoteDebug, forKey: .enableRemoteDebug) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let enableRemoteDebugDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableRemoteDebug) + enableRemoteDebug = enableRemoteDebugDecoded + } +} + +extension SageMakerClientTypes { + /// Configuration for remote debugging for the [CreateTrainingJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html) API. To learn more about the remote debugging functionality of SageMaker, see [Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging](https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html). + public struct RemoteDebugConfig: Swift.Equatable { + /// If set to True, enables remote debugging. + public var enableRemoteDebug: Swift.Bool? + + public init( + enableRemoteDebug: Swift.Bool? = nil + ) + { + self.enableRemoteDebug = enableRemoteDebug + } + } + +} + +extension SageMakerClientTypes.RemoteDebugConfigForUpdate: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enableRemoteDebug = "EnableRemoteDebug" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let enableRemoteDebug = self.enableRemoteDebug { + try encodeContainer.encode(enableRemoteDebug, forKey: .enableRemoteDebug) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let enableRemoteDebugDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableRemoteDebug) + enableRemoteDebug = enableRemoteDebugDecoded + } +} + +extension SageMakerClientTypes { + /// Configuration for remote debugging for the [UpdateTrainingJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateTrainingJob.html) API. To learn more about the remote debugging functionality of SageMaker, see [Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging](https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html). + public struct RemoteDebugConfigForUpdate: Swift.Equatable { + /// If set to True, enables remote debugging. + public var enableRemoteDebug: Swift.Bool? + + public init( + enableRemoteDebug: Swift.Bool? = nil + ) + { + self.enableRemoteDebug = enableRemoteDebug + } + } + +} + extension RenderUiTemplateInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case humanTaskUiArn = "HumanTaskUiArn" @@ -91510,6 +91686,7 @@ extension SearchInput: Swift.Encodable { case searchExpression = "SearchExpression" case sortBy = "SortBy" case sortOrder = "SortOrder" + case visibilityConditions = "VisibilityConditions" } public func encode(to encoder: Swift.Encoder) throws { @@ -91535,6 +91712,12 @@ extension SearchInput: Swift.Encodable { if let sortOrder = self.sortOrder { try encodeContainer.encode(sortOrder.rawValue, forKey: .sortOrder) } + if let visibilityConditions = visibilityConditions { + var visibilityConditionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .visibilityConditions) + for visibilityconditions0 in visibilityConditions { + try visibilityConditionsContainer.encode(visibilityconditions0) + } + } } } @@ -91560,6 +91743,8 @@ public struct SearchInput: Swift.Equatable { public var sortBy: Swift.String? /// How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending. public var sortOrder: SageMakerClientTypes.SearchSortOrder? + /// Limits the results of your search request to the resources that you can access. + public var visibilityConditions: [SageMakerClientTypes.VisibilityConditions]? public init( crossAccountFilterOption: SageMakerClientTypes.CrossAccountFilterOption? = nil, @@ -91568,7 +91753,8 @@ public struct SearchInput: Swift.Equatable { resource: SageMakerClientTypes.ResourceType? = nil, searchExpression: SageMakerClientTypes.SearchExpression? = nil, sortBy: Swift.String? = nil, - sortOrder: SageMakerClientTypes.SearchSortOrder? = nil + sortOrder: SageMakerClientTypes.SearchSortOrder? = nil, + visibilityConditions: [SageMakerClientTypes.VisibilityConditions]? = nil ) { self.crossAccountFilterOption = crossAccountFilterOption @@ -91578,6 +91764,7 @@ public struct SearchInput: Swift.Equatable { self.searchExpression = searchExpression self.sortBy = sortBy self.sortOrder = sortOrder + self.visibilityConditions = visibilityConditions } } @@ -91589,6 +91776,7 @@ struct SearchInputBody: Swift.Equatable { let nextToken: Swift.String? let maxResults: Swift.Int? let crossAccountFilterOption: SageMakerClientTypes.CrossAccountFilterOption? + let visibilityConditions: [SageMakerClientTypes.VisibilityConditions]? } extension SearchInputBody: Swift.Decodable { @@ -91600,6 +91788,7 @@ extension SearchInputBody: Swift.Decodable { case searchExpression = "SearchExpression" case sortBy = "SortBy" case sortOrder = "SortOrder" + case visibilityConditions = "VisibilityConditions" } public init(from decoder: Swift.Decoder) throws { @@ -91618,6 +91807,17 @@ extension SearchInputBody: Swift.Decodable { maxResults = maxResultsDecoded let crossAccountFilterOptionDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.CrossAccountFilterOption.self, forKey: .crossAccountFilterOption) crossAccountFilterOption = crossAccountFilterOptionDecoded + let visibilityConditionsContainer = try containerValues.decodeIfPresent([SageMakerClientTypes.VisibilityConditions?].self, forKey: .visibilityConditions) + var visibilityConditionsDecoded0:[SageMakerClientTypes.VisibilityConditions]? = nil + if let visibilityConditionsContainer = visibilityConditionsContainer { + visibilityConditionsDecoded0 = [SageMakerClientTypes.VisibilityConditions]() + for structure0 in visibilityConditionsContainer { + if let structure0 = structure0 { + visibilityConditionsDecoded0?.append(structure0) + } + } + } + visibilityConditions = visibilityConditionsDecoded0 } } @@ -92076,8 +92276,6 @@ extension SageMakerClientTypes { /// /// Training /// - /// * Downloading the training image. - /// /// * Training image download completed. Training in progress. /// /// @@ -96024,8 +96222,6 @@ extension SageMakerClientTypes { case jupyterlab case jupyterserver case kernelgateway - case savitur - case vscode case sdkUnknown(Swift.String) public static var allCases: [StudioLifecycleConfigAppType] { @@ -96034,8 +96230,6 @@ extension SageMakerClientTypes { .jupyterlab, .jupyterserver, .kernelgateway, - .savitur, - .vscode, .sdkUnknown("") ] } @@ -96049,8 +96243,6 @@ extension SageMakerClientTypes { case .jupyterlab: return "JupyterLab" case .jupyterserver: return "JupyterServer" case .kernelgateway: return "KernelGateway" - case .savitur: return "Savitur" - case .vscode: return "VSCode" case let .sdkUnknown(s): return s } } @@ -97169,6 +97361,205 @@ extension SageMakerClientTypes { } +extension SageMakerClientTypes.ThroughputConfig: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case provisionedReadCapacityUnits = "ProvisionedReadCapacityUnits" + case provisionedWriteCapacityUnits = "ProvisionedWriteCapacityUnits" + case throughputMode = "ThroughputMode" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let provisionedReadCapacityUnits = self.provisionedReadCapacityUnits { + try encodeContainer.encode(provisionedReadCapacityUnits, forKey: .provisionedReadCapacityUnits) + } + if let provisionedWriteCapacityUnits = self.provisionedWriteCapacityUnits { + try encodeContainer.encode(provisionedWriteCapacityUnits, forKey: .provisionedWriteCapacityUnits) + } + if let throughputMode = self.throughputMode { + try encodeContainer.encode(throughputMode.rawValue, forKey: .throughputMode) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let throughputModeDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ThroughputMode.self, forKey: .throughputMode) + throughputMode = throughputModeDecoded + let provisionedReadCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .provisionedReadCapacityUnits) + provisionedReadCapacityUnits = provisionedReadCapacityUnitsDecoded + let provisionedWriteCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .provisionedWriteCapacityUnits) + provisionedWriteCapacityUnits = provisionedWriteCapacityUnitsDecoded + } +} + +extension SageMakerClientTypes { + /// Used to set feature group throughput configuration. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the [Standard](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) tier online store. + public struct ThroughputConfig: Swift.Equatable { + /// For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + public var provisionedReadCapacityUnits: Swift.Int? + /// For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + public var provisionedWriteCapacityUnits: Swift.Int? + /// The mode used for your feature group throughput: ON_DEMAND or PROVISIONED. + /// This member is required. + public var throughputMode: SageMakerClientTypes.ThroughputMode? + + public init( + provisionedReadCapacityUnits: Swift.Int? = nil, + provisionedWriteCapacityUnits: Swift.Int? = nil, + throughputMode: SageMakerClientTypes.ThroughputMode? = nil + ) + { + self.provisionedReadCapacityUnits = provisionedReadCapacityUnits + self.provisionedWriteCapacityUnits = provisionedWriteCapacityUnits + self.throughputMode = throughputMode + } + } + +} + +extension SageMakerClientTypes.ThroughputConfigDescription: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case provisionedReadCapacityUnits = "ProvisionedReadCapacityUnits" + case provisionedWriteCapacityUnits = "ProvisionedWriteCapacityUnits" + case throughputMode = "ThroughputMode" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let provisionedReadCapacityUnits = self.provisionedReadCapacityUnits { + try encodeContainer.encode(provisionedReadCapacityUnits, forKey: .provisionedReadCapacityUnits) + } + if let provisionedWriteCapacityUnits = self.provisionedWriteCapacityUnits { + try encodeContainer.encode(provisionedWriteCapacityUnits, forKey: .provisionedWriteCapacityUnits) + } + if let throughputMode = self.throughputMode { + try encodeContainer.encode(throughputMode.rawValue, forKey: .throughputMode) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let throughputModeDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ThroughputMode.self, forKey: .throughputMode) + throughputMode = throughputModeDecoded + let provisionedReadCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .provisionedReadCapacityUnits) + provisionedReadCapacityUnits = provisionedReadCapacityUnitsDecoded + let provisionedWriteCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .provisionedWriteCapacityUnits) + provisionedWriteCapacityUnits = provisionedWriteCapacityUnitsDecoded + } +} + +extension SageMakerClientTypes { + /// Active throughput configuration of the feature group. Used to set feature group throughput configuration. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the [Standard](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) tier online store. + public struct ThroughputConfigDescription: Swift.Equatable { + /// For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + public var provisionedReadCapacityUnits: Swift.Int? + /// For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + public var provisionedWriteCapacityUnits: Swift.Int? + /// The mode used for your feature group throughput: ON_DEMAND or PROVISIONED. + /// This member is required. + public var throughputMode: SageMakerClientTypes.ThroughputMode? + + public init( + provisionedReadCapacityUnits: Swift.Int? = nil, + provisionedWriteCapacityUnits: Swift.Int? = nil, + throughputMode: SageMakerClientTypes.ThroughputMode? = nil + ) + { + self.provisionedReadCapacityUnits = provisionedReadCapacityUnits + self.provisionedWriteCapacityUnits = provisionedWriteCapacityUnits + self.throughputMode = throughputMode + } + } + +} + +extension SageMakerClientTypes.ThroughputConfigUpdate: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case provisionedReadCapacityUnits = "ProvisionedReadCapacityUnits" + case provisionedWriteCapacityUnits = "ProvisionedWriteCapacityUnits" + case throughputMode = "ThroughputMode" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let provisionedReadCapacityUnits = self.provisionedReadCapacityUnits { + try encodeContainer.encode(provisionedReadCapacityUnits, forKey: .provisionedReadCapacityUnits) + } + if let provisionedWriteCapacityUnits = self.provisionedWriteCapacityUnits { + try encodeContainer.encode(provisionedWriteCapacityUnits, forKey: .provisionedWriteCapacityUnits) + } + if let throughputMode = self.throughputMode { + try encodeContainer.encode(throughputMode.rawValue, forKey: .throughputMode) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let throughputModeDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ThroughputMode.self, forKey: .throughputMode) + throughputMode = throughputModeDecoded + let provisionedReadCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .provisionedReadCapacityUnits) + provisionedReadCapacityUnits = provisionedReadCapacityUnitsDecoded + let provisionedWriteCapacityUnitsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .provisionedWriteCapacityUnits) + provisionedWriteCapacityUnits = provisionedWriteCapacityUnitsDecoded + } +} + +extension SageMakerClientTypes { + /// The new throughput configuration for the feature group. You can switch between on-demand and provisioned modes or update the read / write capacity of provisioned feature groups. You can switch a feature group to on-demand only once in a 24 hour period. + public struct ThroughputConfigUpdate: Swift.Equatable { + /// For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. + public var provisionedReadCapacityUnits: Swift.Int? + /// For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. + public var provisionedWriteCapacityUnits: Swift.Int? + /// Target throughput mode of the feature group. Throughput update is an asynchronous operation, and the outcome should be monitored by polling LastUpdateStatus field in DescribeFeatureGroup response. You cannot update a feature group's throughput while another update is in progress. + public var throughputMode: SageMakerClientTypes.ThroughputMode? + + public init( + provisionedReadCapacityUnits: Swift.Int? = nil, + provisionedWriteCapacityUnits: Swift.Int? = nil, + throughputMode: SageMakerClientTypes.ThroughputMode? = nil + ) + { + self.provisionedReadCapacityUnits = provisionedReadCapacityUnits + self.provisionedWriteCapacityUnits = provisionedWriteCapacityUnits + self.throughputMode = throughputMode + } + } + +} + +extension SageMakerClientTypes { + public enum ThroughputMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case onDemand + case provisioned + case sdkUnknown(Swift.String) + + public static var allCases: [ThroughputMode] { + return [ + .onDemand, + .provisioned, + .sdkUnknown("") + ] + } + 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 .onDemand: return "OnDemand" + case .provisioned: return "Provisioned" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ThroughputMode(rawValue: rawValue) ?? ThroughputMode.sdkUnknown(rawValue) + } + } +} + extension SageMakerClientTypes.TimeSeriesConfig: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case groupingAttributeNames = "GroupingAttributeNames" @@ -103574,6 +103965,7 @@ extension UpdateFeatureGroupInput: Swift.Encodable { case featureAdditions = "FeatureAdditions" case featureGroupName = "FeatureGroupName" case onlineStoreConfig = "OnlineStoreConfig" + case throughputConfig = "ThroughputConfig" } public func encode(to encoder: Swift.Encoder) throws { @@ -103590,6 +103982,9 @@ extension UpdateFeatureGroupInput: Swift.Encodable { if let onlineStoreConfig = self.onlineStoreConfig { try encodeContainer.encode(onlineStoreConfig, forKey: .onlineStoreConfig) } + if let throughputConfig = self.throughputConfig { + try encodeContainer.encode(throughputConfig, forKey: .throughputConfig) + } } } @@ -103607,16 +104002,20 @@ public struct UpdateFeatureGroupInput: Swift.Equatable { public var featureGroupName: Swift.String? /// Updates the feature group online store configuration. public var onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfigUpdate? + /// The new throughput configuration for the feature group. You can switch between on-demand and provisioned modes or update the read / write capacity of provisioned feature groups. You can switch a feature group to on-demand only once in a 24 hour period. + public var throughputConfig: SageMakerClientTypes.ThroughputConfigUpdate? public init( featureAdditions: [SageMakerClientTypes.FeatureDefinition]? = nil, featureGroupName: Swift.String? = nil, - onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfigUpdate? = nil + onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfigUpdate? = nil, + throughputConfig: SageMakerClientTypes.ThroughputConfigUpdate? = nil ) { self.featureAdditions = featureAdditions self.featureGroupName = featureGroupName self.onlineStoreConfig = onlineStoreConfig + self.throughputConfig = throughputConfig } } @@ -103624,6 +104023,7 @@ struct UpdateFeatureGroupInputBody: Swift.Equatable { let featureGroupName: Swift.String? let featureAdditions: [SageMakerClientTypes.FeatureDefinition]? let onlineStoreConfig: SageMakerClientTypes.OnlineStoreConfigUpdate? + let throughputConfig: SageMakerClientTypes.ThroughputConfigUpdate? } extension UpdateFeatureGroupInputBody: Swift.Decodable { @@ -103631,6 +104031,7 @@ extension UpdateFeatureGroupInputBody: Swift.Decodable { case featureAdditions = "FeatureAdditions" case featureGroupName = "FeatureGroupName" case onlineStoreConfig = "OnlineStoreConfig" + case throughputConfig = "ThroughputConfig" } public init(from decoder: Swift.Decoder) throws { @@ -103650,6 +104051,8 @@ extension UpdateFeatureGroupInputBody: Swift.Decodable { featureAdditions = featureAdditionsDecoded0 let onlineStoreConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.OnlineStoreConfigUpdate.self, forKey: .onlineStoreConfig) onlineStoreConfig = onlineStoreConfigDecoded + let throughputConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ThroughputConfigUpdate.self, forKey: .throughputConfig) + throughputConfig = throughputConfigDecoded } } @@ -106403,6 +106806,7 @@ extension UpdateTrainingJobInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case profilerConfig = "ProfilerConfig" case profilerRuleConfigurations = "ProfilerRuleConfigurations" + case remoteDebugConfig = "RemoteDebugConfig" case resourceConfig = "ResourceConfig" case trainingJobName = "TrainingJobName" } @@ -106418,6 +106822,9 @@ extension UpdateTrainingJobInput: Swift.Encodable { try profilerRuleConfigurationsContainer.encode(profilerruleconfiguration0) } } + if let remoteDebugConfig = self.remoteDebugConfig { + try encodeContainer.encode(remoteDebugConfig, forKey: .remoteDebugConfig) + } if let resourceConfig = self.resourceConfig { try encodeContainer.encode(resourceConfig, forKey: .resourceConfig) } @@ -106438,6 +106845,8 @@ public struct UpdateTrainingJobInput: Swift.Equatable { public var profilerConfig: SageMakerClientTypes.ProfilerConfigForUpdate? /// Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics. public var profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? + /// Configuration for remote debugging while the training job is running. You can update the remote debugging configuration when the SecondaryStatus of the job is Downloading or Training.To learn more about the remote debugging functionality of SageMaker, see [Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging](https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html). + public var remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfigForUpdate? /// The training job ResourceConfig to update warm pool retention length. public var resourceConfig: SageMakerClientTypes.ResourceConfigForUpdate? /// The name of a training job to update the Debugger profiling configuration. @@ -106447,12 +106856,14 @@ public struct UpdateTrainingJobInput: Swift.Equatable { public init( profilerConfig: SageMakerClientTypes.ProfilerConfigForUpdate? = nil, profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? = nil, + remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfigForUpdate? = nil, resourceConfig: SageMakerClientTypes.ResourceConfigForUpdate? = nil, trainingJobName: Swift.String? = nil ) { self.profilerConfig = profilerConfig self.profilerRuleConfigurations = profilerRuleConfigurations + self.remoteDebugConfig = remoteDebugConfig self.resourceConfig = resourceConfig self.trainingJobName = trainingJobName } @@ -106463,12 +106874,14 @@ struct UpdateTrainingJobInputBody: Swift.Equatable { let profilerConfig: SageMakerClientTypes.ProfilerConfigForUpdate? let profilerRuleConfigurations: [SageMakerClientTypes.ProfilerRuleConfiguration]? let resourceConfig: SageMakerClientTypes.ResourceConfigForUpdate? + let remoteDebugConfig: SageMakerClientTypes.RemoteDebugConfigForUpdate? } extension UpdateTrainingJobInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case profilerConfig = "ProfilerConfig" case profilerRuleConfigurations = "ProfilerRuleConfigurations" + case remoteDebugConfig = "RemoteDebugConfig" case resourceConfig = "ResourceConfig" case trainingJobName = "TrainingJobName" } @@ -106492,6 +106905,8 @@ extension UpdateTrainingJobInputBody: Swift.Decodable { profilerRuleConfigurations = profilerRuleConfigurationsDecoded0 let resourceConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.ResourceConfigForUpdate.self, forKey: .resourceConfig) resourceConfig = resourceConfigDecoded + let remoteDebugConfigDecoded = try containerValues.decodeIfPresent(SageMakerClientTypes.RemoteDebugConfigForUpdate.self, forKey: .remoteDebugConfig) + remoteDebugConfig = remoteDebugConfigDecoded } } @@ -108041,6 +108456,51 @@ extension SageMakerClientTypes { } +extension SageMakerClientTypes.VisibilityConditions: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case key = "Key" + case value = "Value" + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let key = self.key { + try encodeContainer.encode(key, forKey: .key) + } + if let value = self.value { + try encodeContainer.encode(value, forKey: .value) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) + key = keyDecoded + let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) + value = valueDecoded + } +} + +extension SageMakerClientTypes { + /// The list of key-value pairs that you specify for your resources. + public struct VisibilityConditions: Swift.Equatable { + /// The key for that specifies the tag that you're using to filter the search results. The key must start with Tags.. + public var key: Swift.String? + /// The value for the tag that you're using to filter the search results. + public var value: Swift.String? + + public init( + key: Swift.String? = nil, + value: Swift.String? = nil + ) + { + self.key = key + self.value = value + } + } + +} + extension SageMakerClientTypes.VpcConfig: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case securityGroupIds = "SecurityGroupIds" diff --git a/Sources/Services/AWSSecretsManager/EndpointResolver.swift b/Sources/Services/AWSSecretsManager/EndpointResolver.swift index a0e71e8ee11..42afa4a0d31 100644 --- a/Sources/Services/AWSSecretsManager/EndpointResolver.swift +++ b/Sources/Services/AWSSecretsManager/EndpointResolver.swift @@ -34,7 +34,7 @@ public protocol EndpointResolver { public struct DefaultEndpointResolver: EndpointResolver { private let engine: AWSClientRuntime.AWSEndpointsRuleEngine - private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}]}" + private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://secretsmanager-fips.{Region}.amazonaws.com\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws-us-gov\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://secretsmanager-fips.{Region}.amazonaws.com\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.amazonaws.com\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws-cn\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.amazonaws.com.cn\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[{\"fn\":\"stringEquals\",\"argv\":[\"aws-us-gov\",{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"name\"]}]}],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.amazonaws.com\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}]}" public init() throws { engine = try AWSClientRuntime.AWSEndpointsRuleEngine(ruleSet: ruleSet) diff --git a/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift b/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift index 50f9d94c1ed..c4116baa124 100644 --- a/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift +++ b/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift @@ -407,7 +407,7 @@ extension SecretsManagerClient: SecretsManagerClientProtocol { /// Performs the `GetRandomPassword` operation on the `secretsmanager` service. /// - /// Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support. Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:GetRandomPassword. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). + /// Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support. By default, Secrets Manager uses uppercase and lowercase letters, numbers, and the following characters in passwords: !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:GetRandomPassword. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). /// /// - Parameter GetRandomPasswordInput : [no documentation found] /// @@ -856,7 +856,7 @@ extension SecretsManagerClient: SecretsManagerClientProtocol { /// Performs the `ReplicateSecretToRegions` operation on the `secretsmanager` service. /// - /// Replicates the secret to a new Regions. See [Multi-Region secrets](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html). Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:ReplicateSecretToRegions. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). + /// Replicates the secret to a new Regions. See [Multi-Region secrets](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html). Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:ReplicateSecretToRegions. If the primary secret is encrypted with a KMS key other than aws/secretsmanager, you also need kms:Decrypt permission to the key. To encrypt the replicated secret with a KMS key other than aws/secretsmanager, you need kms:GenerateDataKey and kms:Encrypt to the key. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). /// /// - Parameter ReplicateSecretToRegionsInput : [no documentation found] /// diff --git a/Sources/Services/AWSSecretsManager/SecretsManagerClientProtocol.swift b/Sources/Services/AWSSecretsManager/SecretsManagerClientProtocol.swift index a84155bc16d..1164db26bef 100644 --- a/Sources/Services/AWSSecretsManager/SecretsManagerClientProtocol.swift +++ b/Sources/Services/AWSSecretsManager/SecretsManagerClientProtocol.swift @@ -139,7 +139,7 @@ public protocol SecretsManagerClientProtocol { func describeSecret(input: DescribeSecretInput) async throws -> DescribeSecretOutput /// Performs the `GetRandomPassword` operation on the `secretsmanager` service. /// - /// Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support. Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:GetRandomPassword. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). + /// Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support. By default, Secrets Manager uses uppercase and lowercase letters, numbers, and the following characters in passwords: !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:GetRandomPassword. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). /// /// - Parameter GetRandomPasswordInput : [no documentation found] /// @@ -315,7 +315,7 @@ public protocol SecretsManagerClientProtocol { func removeRegionsFromReplication(input: RemoveRegionsFromReplicationInput) async throws -> RemoveRegionsFromReplicationOutput /// Performs the `ReplicateSecretToRegions` operation on the `secretsmanager` service. /// - /// Replicates the secret to a new Regions. See [Multi-Region secrets](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html). Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:ReplicateSecretToRegions. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). + /// Replicates the secret to a new Regions. See [Multi-Region secrets](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html). Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). Required permissions: secretsmanager:ReplicateSecretToRegions. If the primary secret is encrypted with a KMS key other than aws/secretsmanager, you also need kms:Decrypt permission to the key. To encrypt the replicated secret with a KMS key other than aws/secretsmanager, you need kms:GenerateDataKey and kms:Encrypt to the key. For more information, see [ IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). /// /// - Parameter ReplicateSecretToRegionsInput : [no documentation found] /// diff --git a/Sources/Services/AWSSecretsManager/models/Models.swift b/Sources/Services/AWSSecretsManager/models/Models.swift index b836b5680ec..638153eddb7 100644 --- a/Sources/Services/AWSSecretsManager/models/Models.swift +++ b/Sources/Services/AWSSecretsManager/models/Models.swift @@ -1089,11 +1089,11 @@ public struct DescribeSecretOutput: Swift.Equatable { public var lastAccessedDate: ClientRuntime.Date? /// The last date and time that this secret was modified in any way. public var lastChangedDate: ClientRuntime.Date? - /// The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation, Secrets Manager returns null. + /// The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. public var lastRotatedDate: ClientRuntime.Date? /// The name of the secret. public var name: Swift.String? - /// The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation, Secrets Manager returns null. + /// The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. public var nextRotationDate: ClientRuntime.Date? /// The ID of the service that created this secret. For more information, see [Secrets managed by other Amazon Web Services services](https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html). public var owningService: Swift.String? @@ -1892,7 +1892,7 @@ public struct GetSecretValueOutput: Swift.Equatable { public var createdDate: ClientRuntime.Date? /// The friendly name of the secret. public var name: Swift.String? - /// The decrypted secret value, if the secret value was originally provided as binary data in the form of a byte array. The response parameter represents the binary data as a [base64-encoded](https://tools.ietf.org/html/rfc4648#section-4) string. If the secret was created by using the Secrets Manager console, or if the secret value was originally provided as a string, then this field is omitted. The secret value appears in SecretString instead. + /// The decrypted secret value, if the secret value was originally provided as binary data in the form of a byte array. When you retrieve a SecretBinary using the HTTP API, the Python SDK, or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not encoded. If the secret was created by using the Secrets Manager console, or if the secret value was originally provided as a string, then this field is omitted. The secret value appears in SecretString instead. public var secretBinary: ClientRuntime.Data? /// The decrypted secret value, if the secret value was originally provided as a string or through the Secrets Manager console. If this secret was created by using the console, then Secrets Manager stores the information as a JSON structure of key/value pairs. public var secretString: Swift.String? @@ -4187,7 +4187,7 @@ extension SecretsManagerClientTypes { public var lastRotatedDate: ClientRuntime.Date? /// The friendly name of the secret. public var name: Swift.String? - /// The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation, Secrets Manager returns null. + /// The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. public var nextRotationDate: ClientRuntime.Date? /// Returns the name of the service that created the secret. public var owningService: Swift.String? diff --git a/Sources/Services/AWSSecurityHub/SecurityHubClientProtocol.swift b/Sources/Services/AWSSecurityHub/SecurityHubClientProtocol.swift index c06c15a3dec..aa7afe81a1e 100644 --- a/Sources/Services/AWSSecurityHub/SecurityHubClientProtocol.swift +++ b/Sources/Services/AWSSecurityHub/SecurityHubClientProtocol.swift @@ -2,7 +2,7 @@ import ClientRuntime -/// Security Hub provides you with a comprehensive view of the security state of your Amazon Web Services environment and resources. It also provides you with the readiness status of your environment based on controls from supported security standards. Security Hub collects security data from Amazon Web Services accounts, services, and integrated third-party products and helps you analyze security trends in your environment to identify the highest priority security issues. For more information about Security Hub, see the [ Security Hub User Guide ](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html). When you use operations in the Security Hub API, the requests are executed only in the Amazon Web Services Region that is currently active or in the specific Amazon Web Services Region that you specify in your request. Any configuration or settings change that results from the operation is applied only to that Region. To make the same change in other Regions, run the same command for each Region in which you want to apply the change. For example, if your Region is set to us-west-2, when you use CreateMembers to add a member account to Security Hub, the association of the member account with the administrator account is created only in the us-west-2 Region. Security Hub must be enabled for the member account in the same Region that the invitation was sent from. The following throttling limits apply to using Security Hub API operations. +/// Security Hub provides you with a comprehensive view of your security state in Amazon Web Services and helps you assess your Amazon Web Services environment against security industry standards and best practices. Security Hub collects security data across Amazon Web Services accounts, Amazon Web Services, and supported third-party products and helps you analyze your security trends and identify the highest priority security issues. To help you manage the security state of your organization, Security Hub supports multiple security standards. These include the Amazon Web Services Foundational Security Best Practices (FSBP) standard developed by Amazon Web Services, and external compliance frameworks such as the Center for Internet Security (CIS), the Payment Card Industry Data Security Standard (PCI DSS), and the National Institute of Standards and Technology (NIST). Each standard includes several security controls, each of which represents a security best practice. Security Hub runs checks against security controls and generates control findings to help you assess your compliance against security best practices. In addition to generating control findings, Security Hub also receives findings from other Amazon Web Services, such as Amazon GuardDuty and Amazon Inspector, and supported third-party products. This gives you a single pane of glass into a variety of security-related issues. You can also send Security Hub findings to other Amazon Web Services and supported third-party products. Security Hub offers automation features that help you triage and remediate security issues. For example, you can use automation rules to automatically update critical findings when a security check fails. You can also leverage the integration with Amazon EventBridge to trigger automatic responses to specific findings. This guide, the Security Hub API Reference, provides information about the Security Hub API. This includes supported resources, HTTP methods, parameters, and schemas. If you're new to Security Hub, you might find it helpful to also review the [ Security Hub User Guide ](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html). The user guide explains key concepts and provides procedures that demonstrate how to use Security Hub features. It also provides information about topics such as integrating Security Hub with other Amazon Web Services. In addition to interacting with Security Hub by making calls to the Security Hub API, you can use a current version of an Amazon Web Services command line tool or SDK. Amazon Web Services provides tools and SDKs that consist of libraries and sample code for various languages and platforms, such as PowerShell, Java, Go, Python, C++, and .NET. These tools and SDKs provide convenient, programmatic access to Security Hub and other Amazon Web Services . They also handle tasks such as signing requests, managing errors, and retrying requests automatically. For information about installing and using the Amazon Web Services tools and SDKs, see [Tools to Build on Amazon Web Services](http://aws.amazon.com/developer/tools/). With the exception of operations that are related to central configuration, Security Hub API requests are executed only in the Amazon Web Services Region that is currently active or in the specific Amazon Web Services Region that you specify in your request. Any configuration or settings change that results from the operation is applied only to that Region. To make the same change in other Regions, call the same API operation in each Region in which you want to apply the change. When you use central configuration, API requests for enabling Security Hub, standards, and controls are executed in the home Region and all linked Regions. For a list of central configuration operations, see the [Central configuration terms and concepts](https://docs.aws.amazon.com/securityhub/latest/userguide/central-configuration-intro.html#central-configuration-concepts) section of the Security Hub User Guide. The following throttling limits apply to Security Hub API operations. /// /// * BatchEnableStandards - RateLimit of 1 request per second. BurstLimit of 1 request per second. /// diff --git a/Sources/Services/AWSSecurityHub/models/Models.swift b/Sources/Services/AWSSecurityHub/models/Models.swift index 23fb8ff3d4c..6a22acc88f7 100644 --- a/Sources/Services/AWSSecurityHub/models/Models.swift +++ b/Sources/Services/AWSSecurityHub/models/Models.swift @@ -29187,7 +29187,7 @@ extension SecurityHubClientTypes.AwsLambdaLayerVersionDetails: Swift.Codable { extension SecurityHubClientTypes { /// Details about a Lambda layer version. public struct AwsLambdaLayerVersionDetails: Swift.Equatable { - /// The layer's compatible runtimes. Maximum number of five items. Valid values: nodejs10.x | nodejs12.x | java8 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | dotnetcore1.0 | dotnetcore2.1 | go1.x | ruby2.5 | provided + /// The layer's compatible [function runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). The following list includes deprecated runtimes. For more information, see [Runtime deprecation policy](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy) in the Lambda Developer Guide. Array Members: Maximum number of 5 items. Valid Values: nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | nodejs10.x | nodejs12.x | nodejs14.x | nodejs16.x | java8 | java8.al2 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | python3.9 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | dotnet6 | nodejs4.3-edge | go1.x | ruby2.5 | ruby2.7 | provided | provided.al2 | nodejs18.x | python3.10 | java17 | ruby3.2 | python3.11 | nodejs20.x | provided.al2023 | python3.12 | java21 public var compatibleRuntimes: [Swift.String]? /// Indicates when the version was created. Uses the date-time format specified in [RFC 3339 section 5.6, Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6). The value cannot contain spaces, and date and time should be separated by T. For example, 2020-03-22T13:22:13.933Z. public var createdDate: Swift.String? diff --git a/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift b/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift index 80c19e68704..26721effe55 100644 --- a/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift +++ b/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift @@ -296,6 +296,7 @@ extension ServiceCatalogClient: ServiceCatalogClientProtocol { .withSigningRegion(value: config.signingRegion) .build() var operation = ClientRuntime.OperationStack(id: "associateServiceActionWithProvisioningArtifact") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.idempotencyToken)) operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) @@ -1234,6 +1235,7 @@ extension ServiceCatalogClient: ServiceCatalogClientProtocol { .withSigningRegion(value: config.signingRegion) .build() var operation = ClientRuntime.OperationStack(id: "deleteServiceAction") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.idempotencyToken)) operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) @@ -2287,6 +2289,7 @@ extension ServiceCatalogClient: ServiceCatalogClientProtocol { .withSigningRegion(value: config.signingRegion) .build() var operation = ClientRuntime.OperationStack(id: "disassociateServiceActionFromProvisioningArtifact") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.idempotencyToken)) operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) diff --git a/Sources/Services/AWSServiceCatalog/models/Models.swift b/Sources/Services/AWSServiceCatalog/models/Models.swift index 76ed32fce5d..761142089dd 100644 --- a/Sources/Services/AWSServiceCatalog/models/Models.swift +++ b/Sources/Services/AWSServiceCatalog/models/Models.swift @@ -563,6 +563,7 @@ enum AssociateProductWithPortfolioOutputError: ClientRuntime.HttpResponseErrorBi extension AssociateServiceActionWithProvisioningArtifactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceptLanguage = "AcceptLanguage" + case idempotencyToken = "IdempotencyToken" case productId = "ProductId" case provisioningArtifactId = "ProvisioningArtifactId" case serviceActionId = "ServiceActionId" @@ -573,6 +574,9 @@ extension AssociateServiceActionWithProvisioningArtifactInput: Swift.Encodable { if let acceptLanguage = self.acceptLanguage { try encodeContainer.encode(acceptLanguage, forKey: .acceptLanguage) } + if let idempotencyToken = self.idempotencyToken { + try encodeContainer.encode(idempotencyToken, forKey: .idempotencyToken) + } if let productId = self.productId { try encodeContainer.encode(productId, forKey: .productId) } @@ -598,6 +602,8 @@ public struct AssociateServiceActionWithProvisioningArtifactInput: Swift.Equatab /// /// * zh - Chinese public var acceptLanguage: Swift.String? + /// A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. + public var idempotencyToken: Swift.String? /// The product identifier. For example, prod-abcdzk7xy33qa. /// This member is required. public var productId: Swift.String? @@ -610,12 +616,14 @@ public struct AssociateServiceActionWithProvisioningArtifactInput: Swift.Equatab public init( acceptLanguage: Swift.String? = nil, + idempotencyToken: Swift.String? = nil, productId: Swift.String? = nil, provisioningArtifactId: Swift.String? = nil, serviceActionId: Swift.String? = nil ) { self.acceptLanguage = acceptLanguage + self.idempotencyToken = idempotencyToken self.productId = productId self.provisioningArtifactId = provisioningArtifactId self.serviceActionId = serviceActionId @@ -627,11 +635,13 @@ struct AssociateServiceActionWithProvisioningArtifactInputBody: Swift.Equatable let provisioningArtifactId: Swift.String? let serviceActionId: Swift.String? let acceptLanguage: Swift.String? + let idempotencyToken: Swift.String? } extension AssociateServiceActionWithProvisioningArtifactInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceptLanguage = "AcceptLanguage" + case idempotencyToken = "IdempotencyToken" case productId = "ProductId" case provisioningArtifactId = "ProvisioningArtifactId" case serviceActionId = "ServiceActionId" @@ -647,6 +657,8 @@ extension AssociateServiceActionWithProvisioningArtifactInputBody: Swift.Decodab serviceActionId = serviceActionIdDecoded let acceptLanguageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .acceptLanguage) acceptLanguage = acceptLanguageDecoded + let idempotencyTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idempotencyToken) + idempotencyToken = idempotencyTokenDecoded } } @@ -2093,7 +2105,7 @@ public struct CreatePortfolioShareInput: Swift.Equatable { /// The portfolio identifier. /// This member is required. public var portfolioId: Swift.String? - /// Enables or disables Principal sharing when creating the portfolio share. If this flag is not provided, principal sharing is disabled. When you enable Principal Name Sharing for a portfolio share, the share recipient account end users with a principal that matches any of the associated IAM patterns can provision products from the portfolio. Once shared, the share recipient can view associations of PrincipalType: IAM_PATTERN on their portfolio. You can create the principals in the recipient account before or after creating the share. + /// This parameter is only supported for portfolios with an OrganizationalNode Type of ORGANIZATION or ORGANIZATIONAL_UNIT. Enables or disables Principal sharing when creating the portfolio share. If you do not provide this flag, principal sharing is disabled. When you enable Principal Name Sharing for a portfolio share, the share recipient account end users with a principal that matches any of the associated IAM patterns can provision products from the portfolio. Once shared, the share recipient can view associations of PrincipalType: IAM_PATTERN on their portfolio. You can create the principals in the recipient account before or after creating the share. public var sharePrincipals: Swift.Bool? /// Enables or disables TagOptions sharing when creating the portfolio share. If this flag is not provided, TagOptions sharing is disabled. public var shareTagOptions: Swift.Bool? @@ -3881,6 +3893,7 @@ extension DeleteServiceActionInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceptLanguage = "AcceptLanguage" case id = "Id" + case idempotencyToken = "IdempotencyToken" } public func encode(to encoder: Swift.Encoder) throws { @@ -3891,6 +3904,9 @@ extension DeleteServiceActionInput: Swift.Encodable { if let id = self.id { try encodeContainer.encode(id, forKey: .id) } + if let idempotencyToken = self.idempotencyToken { + try encodeContainer.encode(idempotencyToken, forKey: .idempotencyToken) + } } } @@ -3910,26 +3926,32 @@ public struct DeleteServiceActionInput: Swift.Equatable { /// The self-service action identifier. For example, act-fs7abcd89wxyz. /// This member is required. public var id: Swift.String? + /// A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. + public var idempotencyToken: Swift.String? public init( acceptLanguage: Swift.String? = nil, - id: Swift.String? = nil + id: Swift.String? = nil, + idempotencyToken: Swift.String? = nil ) { self.acceptLanguage = acceptLanguage self.id = id + self.idempotencyToken = idempotencyToken } } struct DeleteServiceActionInputBody: Swift.Equatable { let id: Swift.String? let acceptLanguage: Swift.String? + let idempotencyToken: Swift.String? } extension DeleteServiceActionInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceptLanguage = "AcceptLanguage" case id = "Id" + case idempotencyToken = "IdempotencyToken" } public init(from decoder: Swift.Decoder) throws { @@ -3938,6 +3960,8 @@ extension DeleteServiceActionInputBody: Swift.Decodable { id = idDecoded let acceptLanguageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .acceptLanguage) acceptLanguage = acceptLanguageDecoded + let idempotencyTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idempotencyToken) + idempotencyToken = idempotencyTokenDecoded } } @@ -7018,6 +7042,7 @@ enum DisassociateProductFromPortfolioOutputError: ClientRuntime.HttpResponseErro extension DisassociateServiceActionFromProvisioningArtifactInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceptLanguage = "AcceptLanguage" + case idempotencyToken = "IdempotencyToken" case productId = "ProductId" case provisioningArtifactId = "ProvisioningArtifactId" case serviceActionId = "ServiceActionId" @@ -7028,6 +7053,9 @@ extension DisassociateServiceActionFromProvisioningArtifactInput: Swift.Encodabl if let acceptLanguage = self.acceptLanguage { try encodeContainer.encode(acceptLanguage, forKey: .acceptLanguage) } + if let idempotencyToken = self.idempotencyToken { + try encodeContainer.encode(idempotencyToken, forKey: .idempotencyToken) + } if let productId = self.productId { try encodeContainer.encode(productId, forKey: .productId) } @@ -7053,6 +7081,8 @@ public struct DisassociateServiceActionFromProvisioningArtifactInput: Swift.Equa /// /// * zh - Chinese public var acceptLanguage: Swift.String? + /// A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. + public var idempotencyToken: Swift.String? /// The product identifier. For example, prod-abcdzk7xy33qa. /// This member is required. public var productId: Swift.String? @@ -7065,12 +7095,14 @@ public struct DisassociateServiceActionFromProvisioningArtifactInput: Swift.Equa public init( acceptLanguage: Swift.String? = nil, + idempotencyToken: Swift.String? = nil, productId: Swift.String? = nil, provisioningArtifactId: Swift.String? = nil, serviceActionId: Swift.String? = nil ) { self.acceptLanguage = acceptLanguage + self.idempotencyToken = idempotencyToken self.productId = productId self.provisioningArtifactId = provisioningArtifactId self.serviceActionId = serviceActionId @@ -7082,11 +7114,13 @@ struct DisassociateServiceActionFromProvisioningArtifactInputBody: Swift.Equatab let provisioningArtifactId: Swift.String? let serviceActionId: Swift.String? let acceptLanguage: Swift.String? + let idempotencyToken: Swift.String? } extension DisassociateServiceActionFromProvisioningArtifactInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceptLanguage = "AcceptLanguage" + case idempotencyToken = "IdempotencyToken" case productId = "ProductId" case provisioningArtifactId = "ProvisioningArtifactId" case serviceActionId = "ServiceActionId" @@ -7102,6 +7136,8 @@ extension DisassociateServiceActionFromProvisioningArtifactInputBody: Swift.Deco serviceActionId = serviceActionIdDecoded let acceptLanguageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .acceptLanguage) acceptLanguage = acceptLanguageDecoded + let idempotencyTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idempotencyToken) + idempotencyToken = idempotencyTokenDecoded } } diff --git a/Sources/Services/AWSSupplyChain/EndpointResolver.swift b/Sources/Services/AWSSupplyChain/EndpointResolver.swift new file mode 100644 index 00000000000..8bcce5b019a --- /dev/null +++ b/Sources/Services/AWSSupplyChain/EndpointResolver.swift @@ -0,0 +1,153 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import AWSClientRuntime +import ClientRuntime + +public struct EndpointParams { + /// Override the endpoint used to send this request + public let endpoint: Swift.String? + /// The AWS region used to dispatch the request. + public let region: Swift.String? + /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + public let useDualStack: Swift.Bool + /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + public let useFIPS: Swift.Bool + + public init( + endpoint: Swift.String? = nil, + region: Swift.String? = nil, + useDualStack: Swift.Bool = false, + useFIPS: Swift.Bool = false + ) + { + self.endpoint = endpoint + self.region = region + self.useDualStack = useDualStack + self.useFIPS = useFIPS + } +} + +public protocol EndpointResolver { + func resolve(params: EndpointParams) throws -> ClientRuntime.Endpoint +} + +public struct DefaultEndpointResolver: EndpointResolver { + + private let engine: AWSClientRuntime.AWSEndpointsRuleEngine + private let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://scn-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://scn-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://scn.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://scn.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}],\"type\":\"tree\"}]}" + + public init() throws { + engine = try AWSClientRuntime.AWSEndpointsRuleEngine(ruleSet: ruleSet) + } + + public func resolve(params: EndpointParams) throws -> ClientRuntime.Endpoint { + let context = try AWSClientRuntime.AWSEndpointsRequestContext() + try context.add(name: "Endpoint", value: params.endpoint) + try context.add(name: "Region", value: params.region) + try context.add(name: "UseDualStack", value: params.useDualStack) + try context.add(name: "UseFIPS", value: params.useFIPS) + + guard let crtResolvedEndpoint = try engine.resolve(context: context) else { + throw EndpointError.unresolved("Failed to resolved endpoint") + } + + if crtResolvedEndpoint.getType() == .error { + let error = crtResolvedEndpoint.getError() + throw EndpointError.unresolved(error) + } + + guard let url = crtResolvedEndpoint.getURL() else { + assertionFailure("This must be a bug in either CRT or the rule engine, if the endpoint is not an error, it must have a url") + throw EndpointError.unresolved("Failed to resolved endpoint") + } + + let headers = crtResolvedEndpoint.getHeaders() ?? [:] + let properties = crtResolvedEndpoint.getProperties() ?? [:] + return try Endpoint(urlString: url, headers: Headers(headers), properties: properties) + } +} + +public struct EndpointResolverMiddleware: ClientRuntime.Middleware { + public let id: Swift.String = "EndpointResolverMiddleware" + + let endpointResolver: EndpointResolver + + let endpointParams: EndpointParams + + let authSchemeResolver: AWSClientRuntime.AuthSchemeResolver + + public init(endpointResolver: EndpointResolver, endpointParams: EndpointParams, authSchemeResolver: AWSClientRuntime.AuthSchemeResolver = AWSClientRuntime.DefaultAuthSchemeResolver()) { + self.endpointResolver = endpointResolver + self.endpointParams = endpointParams + self.authSchemeResolver = authSchemeResolver + } + + public func handle(context: Context, + input: ClientRuntime.SdkHttpRequestBuilder, + next: H) async throws -> ClientRuntime.OperationOutput + where H: Handler, + Self.MInput == H.Input, + Self.MOutput == H.Output, + Self.Context == H.Context + { + let endpoint = try endpointResolver.resolve(params: endpointParams) + + var signingName: String? = nil + var signingRegion: String? = nil + var signingAlgorithm: String? = nil + if let authSchemes = endpoint.authSchemes() { + let schemes = try authSchemes.map { try AuthScheme(from: $0) } + let authScheme = try authSchemeResolver.resolve(authSchemes: schemes) + signingAlgorithm = authScheme.name + switch authScheme { + case .sigV4(let param): + signingName = param.signingName + signingRegion = param.signingRegion + case .sigV4A(let param): + signingName = param.signingName + signingRegion = param.signingRegionSet?.first + case .none: + break + } + } + + let awsEndpoint = AWSEndpoint(endpoint: endpoint, signingName: signingName, signingRegion: signingRegion) + + var host = "" + if let hostOverride = context.getHost() { + host = hostOverride + } else { + host = "\(context.getHostPrefix() ?? "")\(awsEndpoint.endpoint.host)" + } + + if let protocolType = awsEndpoint.endpoint.protocolType { + input.withProtocol(protocolType) + } + + if let signingRegion = signingRegion { + context.attributes.set(key: HttpContext.signingRegion, value: signingRegion) + } + if let signingName = signingName { + context.attributes.set(key: HttpContext.signingName, value: signingName) + } + if let signingAlgorithm = signingAlgorithm { + context.attributes.set(key: HttpContext.signingAlgorithm, value: signingAlgorithm) + } + + if let headers = endpoint.headers { + input.withHeaders(headers) + } + + input.withMethod(context.getMethod()) + .withHost(host) + .withPort(awsEndpoint.endpoint.port) + .withPath(awsEndpoint.endpoint.path.appendingPathComponent(context.getPath())) + .withHeader(name: "Host", value: host) + + return try await next.handle(context: context, input: input) + } + + public typealias MInput = ClientRuntime.SdkHttpRequestBuilder + public typealias MOutput = ClientRuntime.OperationOutput + public typealias Context = ClientRuntime.HttpContext +} diff --git a/Sources/Services/AWSSupplyChain/SupplyChainClient.swift b/Sources/Services/AWSSupplyChain/SupplyChainClient.swift new file mode 100644 index 00000000000..15c3f1b4112 --- /dev/null +++ b/Sources/Services/AWSSupplyChain/SupplyChainClient.swift @@ -0,0 +1,172 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime +import Foundation +import Logging + +public class SupplyChainClient { + public static let clientName = "SupplyChainClient" + let client: ClientRuntime.SdkHttpClient + let config: SupplyChainClient.SupplyChainClientConfiguration + let serviceName = "SupplyChain" + let encoder: ClientRuntime.RequestEncoder + let decoder: ClientRuntime.ResponseDecoder + + public init(config: SupplyChainClient.SupplyChainClientConfiguration) { + client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) + let encoder = ClientRuntime.JSONEncoder() + encoder.dateEncodingStrategy = .secondsSince1970 + encoder.nonConformingFloatEncodingStrategy = .convertToString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") + self.encoder = config.encoder ?? encoder + let decoder = ClientRuntime.JSONDecoder() + decoder.dateDecodingStrategy = .secondsSince1970 + decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") + self.decoder = config.decoder ?? decoder + self.config = config + } + + public convenience init(region: Swift.String) throws { + let config = try SupplyChainClient.SupplyChainClientConfiguration(region: region) + self.init(config: config) + } + + public convenience init() async throws { + let config = try await SupplyChainClient.SupplyChainClientConfiguration() + self.init(config: config) + } +} + +extension SupplyChainClient { + public typealias SupplyChainClientConfiguration = AWSClientConfiguration + + public struct ServiceSpecificConfiguration: AWSServiceSpecificConfiguration { + public typealias AWSServiceEndpointResolver = EndpointResolver + + public var serviceName: String { "SupplyChain" } + public var clientName: String { "SupplyChainClient" } + public var endpointResolver: EndpointResolver + + public init(endpointResolver: EndpointResolver? = nil) throws { + self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() + } + } +} + +public struct SupplyChainClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { + public var label = "SupplyChainClient" + let logLevel: ClientRuntime.SDKLogLevel + public func construct(label: String) -> LogHandler { + var handler = StreamLogHandler.standardOutput(label: label) + handler.logLevel = logLevel.toLoggerType() + return handler + } + public init(logLevel: ClientRuntime.SDKLogLevel) { + self.logLevel = logLevel + } +} + +extension SupplyChainClient: SupplyChainClientProtocol { + /// Performs the `CreateBillOfMaterialsImportJob` operation on the `GalaxyPublicAPIGateway` service. + /// + /// CreateBillOfMaterialsImportJob creates an import job for the Product Bill Of Materials (BOM) entity. For information on the product_bom entity, see the AWS Supply Chain User Guide. The CSV file must be located in an Amazon S3 location accessible to AWS Supply Chain. It is recommended to use the same Amazon S3 bucket created during your AWS Supply Chain instance creation. + /// + /// - Parameter CreateBillOfMaterialsImportJobInput : The request parameters for CreateBillOfMaterialsImportJob. + /// + /// - Returns: `CreateBillOfMaterialsImportJobOutput` : The response parameters of CreateBillOfMaterialsImportJob. + /// + /// - 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 createBillOfMaterialsImportJob(input: CreateBillOfMaterialsImportJobInput) async throws -> CreateBillOfMaterialsImportJobOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "createBillOfMaterialsImportJob") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "createBillOfMaterialsImportJob") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.clientToken)) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/json")) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: ClientRuntime.JSONReadWrite.documentWritingClosure(encoder: encoder), inputWritingClosure: JSONReadWrite.writingClosure())) + operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateBillOfMaterialsImportJobOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + + /// Performs the `GetBillOfMaterialsImportJob` operation on the `GalaxyPublicAPIGateway` service. + /// + /// Get status and details of a BillOfMaterialsImportJob. + /// + /// - Parameter GetBillOfMaterialsImportJobInput : The request parameters for GetBillOfMaterialsImportJob. + /// + /// - Returns: `GetBillOfMaterialsImportJobOutput` : The response parameters for GetBillOfMaterialsImportJob. + /// + /// - 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 getBillOfMaterialsImportJob(input: GetBillOfMaterialsImportJobInput) async throws -> GetBillOfMaterialsImportJobOutput + { + let context = ClientRuntime.HttpContextBuilder() + .withEncoder(value: encoder) + .withDecoder(value: decoder) + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getBillOfMaterialsImportJob") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "getBillOfMaterialsImportJob") + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware()) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) + operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBillOfMaterialsImportJobOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) + return result + } + +} diff --git a/Sources/Services/AWSSupplyChain/SupplyChainClientProtocol.swift b/Sources/Services/AWSSupplyChain/SupplyChainClientProtocol.swift new file mode 100644 index 00000000000..b143cb290a2 --- /dev/null +++ b/Sources/Services/AWSSupplyChain/SupplyChainClientProtocol.swift @@ -0,0 +1,47 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import ClientRuntime + +/// AWS Supply Chain is a cloud-based application that works with your enterprise resource planning (ERP) and supply chain management systems. Using AWS Supply Chain, you can connect and extract your inventory, supply, and demand related data from existing ERP or supply chain systems into a single data model. The AWS Supply Chain API supports configuration data import for Supply Planning. All AWS Supply chain API operations are Amazon-authenticated and certificate-signed. They not only require the use of the AWS SDK, but also allow for the exclusive use of AWS Identity and Access Management users and roles to help facilitate access, trust, and permission policies. +public protocol SupplyChainClientProtocol { + /// Performs the `CreateBillOfMaterialsImportJob` operation on the `GalaxyPublicAPIGateway` service. + /// + /// CreateBillOfMaterialsImportJob creates an import job for the Product Bill Of Materials (BOM) entity. For information on the product_bom entity, see the AWS Supply Chain User Guide. The CSV file must be located in an Amazon S3 location accessible to AWS Supply Chain. It is recommended to use the same Amazon S3 bucket created during your AWS Supply Chain instance creation. + /// + /// - Parameter CreateBillOfMaterialsImportJobInput : The request parameters for CreateBillOfMaterialsImportJob. + /// + /// - Returns: `CreateBillOfMaterialsImportJobOutput` : The response parameters of CreateBillOfMaterialsImportJob. + /// + /// - 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. + func createBillOfMaterialsImportJob(input: CreateBillOfMaterialsImportJobInput) async throws -> CreateBillOfMaterialsImportJobOutput + /// Performs the `GetBillOfMaterialsImportJob` operation on the `GalaxyPublicAPIGateway` service. + /// + /// Get status and details of a BillOfMaterialsImportJob. + /// + /// - Parameter GetBillOfMaterialsImportJobInput : The request parameters for GetBillOfMaterialsImportJob. + /// + /// - Returns: `GetBillOfMaterialsImportJobOutput` : The response parameters for GetBillOfMaterialsImportJob. + /// + /// - 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. + func getBillOfMaterialsImportJob(input: GetBillOfMaterialsImportJobInput) async throws -> GetBillOfMaterialsImportJobOutput +} + +public enum SupplyChainClientTypes {} diff --git a/Sources/Services/AWSSupplyChain/models/Models.swift b/Sources/Services/AWSSupplyChain/models/Models.swift new file mode 100644 index 00000000000..be19326f669 --- /dev/null +++ b/Sources/Services/AWSSupplyChain/models/Models.swift @@ -0,0 +1,752 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! +import AWSClientRuntime +import ClientRuntime + +extension AccessDeniedException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: AccessDeniedExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// You do not have the required privileges to perform this action. +public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "AccessDeniedException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct AccessDeniedExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension AccessDeniedExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension SupplyChainClientTypes.BillOfMaterialsImportJob: Swift.Codable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceId + case jobId + case message + case s3uri + case status + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let instanceId = self.instanceId { + try encodeContainer.encode(instanceId, forKey: .instanceId) + } + if let jobId = self.jobId { + try encodeContainer.encode(jobId, forKey: .jobId) + } + if let message = self.message { + try encodeContainer.encode(message, forKey: .message) + } + if let s3uri = self.s3uri { + try encodeContainer.encode(s3uri, forKey: .s3uri) + } + if let status = self.status { + try encodeContainer.encode(status.rawValue, forKey: .status) + } + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) + instanceId = instanceIdDecoded + let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) + jobId = jobIdDecoded + let statusDecoded = try containerValues.decodeIfPresent(SupplyChainClientTypes.ConfigurationJobStatus.self, forKey: .status) + status = statusDecoded + let s3uriDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3uri) + s3uri = s3uriDecoded + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension SupplyChainClientTypes { + /// The BillOfMaterialsImportJob details. + public struct BillOfMaterialsImportJob: Swift.Equatable { + /// The BillOfMaterialsImportJob instanceId. + /// This member is required. + public var instanceId: Swift.String? + /// The BillOfMaterialsImportJob jobId. + /// This member is required. + public var jobId: Swift.String? + /// When the BillOfMaterialsImportJob has reached a terminal state, there will be a message. + public var message: Swift.String? + /// The S3 URI from which the CSV is read. + /// This member is required. + public var s3uri: Swift.String? + /// The BillOfMaterialsImportJob ConfigurationJobStatus. + /// This member is required. + public var status: SupplyChainClientTypes.ConfigurationJobStatus? + + public init( + instanceId: Swift.String? = nil, + jobId: Swift.String? = nil, + message: Swift.String? = nil, + s3uri: Swift.String? = nil, + status: SupplyChainClientTypes.ConfigurationJobStatus? = nil + ) + { + self.instanceId = instanceId + self.jobId = jobId + self.message = message + self.s3uri = s3uri + self.status = status + } + } + +} + +extension SupplyChainClientTypes { + /// The status of the job. + public enum ConfigurationJobStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { + case failed + case inProgress + case new + case queued + case success + case sdkUnknown(Swift.String) + + public static var allCases: [ConfigurationJobStatus] { + return [ + .failed, + .inProgress, + .new, + .queued, + .success, + .sdkUnknown("") + ] + } + 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 .failed: return "FAILED" + case .inProgress: return "IN_PROGRESS" + case .new: return "NEW" + case .queued: return "QUEUED" + case .success: return "SUCCESS" + case let .sdkUnknown(s): return s + } + } + public init(from decoder: Swift.Decoder) throws { + let container = try decoder.singleValueContainer() + let rawValue = try container.decode(RawValue.self) + self = ConfigurationJobStatus(rawValue: rawValue) ?? ConfigurationJobStatus.sdkUnknown(rawValue) + } + } +} + +extension ConflictException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ConflictExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// Updating or deleting a resource can cause an inconsistent state. +public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ConflictException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ConflictExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ConflictExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension CreateBillOfMaterialsImportJobInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientToken + case s3uri + } + + public func encode(to encoder: Swift.Encoder) throws { + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let clientToken = self.clientToken { + try encodeContainer.encode(clientToken, forKey: .clientToken) + } + if let s3uri = self.s3uri { + try encodeContainer.encode(s3uri, forKey: .s3uri) + } + } +} + +extension CreateBillOfMaterialsImportJobInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + return "/api/configuration/instances/\(instanceId.urlPercentEncoding())/bill-of-materials-import-jobs" + } +} + +/// The request parameters for CreateBillOfMaterialsImportJob. +public struct CreateBillOfMaterialsImportJobInput: Swift.Equatable { + /// An idempotency token. + public var clientToken: Swift.String? + /// The AWS Supply Chain instance identifier. + /// This member is required. + public var instanceId: Swift.String? + /// The S3 URI of the CSV file to be imported. The bucket must grant permissions for AWS Supply Chain to read the file. + /// This member is required. + public var s3uri: Swift.String? + + public init( + clientToken: Swift.String? = nil, + instanceId: Swift.String? = nil, + s3uri: Swift.String? = nil + ) + { + self.clientToken = clientToken + self.instanceId = instanceId + self.s3uri = s3uri + } +} + +struct CreateBillOfMaterialsImportJobInputBody: Swift.Equatable { + let s3uri: Swift.String? + let clientToken: Swift.String? +} + +extension CreateBillOfMaterialsImportJobInputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientToken + case s3uri + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let s3uriDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3uri) + s3uri = s3uriDecoded + let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) + clientToken = clientTokenDecoded + } +} + +extension CreateBillOfMaterialsImportJobOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: CreateBillOfMaterialsImportJobOutputBody = try responseDecoder.decode(responseBody: data) + self.jobId = output.jobId + } else { + self.jobId = nil + } + } +} + +/// The response parameters of CreateBillOfMaterialsImportJob. +public struct CreateBillOfMaterialsImportJobOutput: Swift.Equatable { + /// The new BillOfMaterialsImportJob identifier. + /// This member is required. + public var jobId: Swift.String? + + public init( + jobId: Swift.String? = nil + ) + { + self.jobId = jobId + } +} + +struct CreateBillOfMaterialsImportJobOutputBody: Swift.Equatable { + let jobId: Swift.String? +} + +extension CreateBillOfMaterialsImportJobOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case jobId + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) + jobId = jobIdDecoded + } +} + +enum CreateBillOfMaterialsImportJobOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + let serviceError = try await SupplyChainClientTypes.makeServiceError(httpResponse, decoder, restJSONError, requestID) + if let error = serviceError { return error } + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension SupplyChainClientTypes { + static func makeServiceError(_ httpResponse: ClientRuntime.HttpResponse, _ decoder: ClientRuntime.ResponseDecoder? = nil, _ error: AWSClientRuntime.RestJSONError, _ id: String?) async throws -> Swift.Error? { + switch error.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + case "ConflictException": return try await ConflictException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + case "ServiceQuotaExceededException": return try await ServiceQuotaExceededException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: error.errorMessage, requestID: id) + default: return nil + } + } +} + +extension GetBillOfMaterialsImportJobInput: ClientRuntime.URLPathProvider { + public var urlPath: Swift.String? { + guard let instanceId = instanceId else { + return nil + } + guard let jobId = jobId else { + return nil + } + return "/api/configuration/instances/\(instanceId.urlPercentEncoding())/bill-of-materials-import-jobs/\(jobId.urlPercentEncoding())" + } +} + +/// The request parameters for GetBillOfMaterialsImportJob. +public struct GetBillOfMaterialsImportJobInput: Swift.Equatable { + /// The AWS Supply Chain instance identifier. + /// This member is required. + public var instanceId: Swift.String? + /// The BillOfMaterialsImportJob identifier. + /// This member is required. + public var jobId: Swift.String? + + public init( + instanceId: Swift.String? = nil, + jobId: Swift.String? = nil + ) + { + self.instanceId = instanceId + self.jobId = jobId + } +} + +struct GetBillOfMaterialsImportJobInputBody: Swift.Equatable { +} + +extension GetBillOfMaterialsImportJobInputBody: Swift.Decodable { + + public init(from decoder: Swift.Decoder) throws { + } +} + +extension GetBillOfMaterialsImportJobOutput: ClientRuntime.HttpResponseBinding { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: GetBillOfMaterialsImportJobOutputBody = try responseDecoder.decode(responseBody: data) + self.job = output.job + } else { + self.job = nil + } + } +} + +/// The response parameters for GetBillOfMaterialsImportJob. +public struct GetBillOfMaterialsImportJobOutput: Swift.Equatable { + /// The BillOfMaterialsImportJob. + /// This member is required. + public var job: SupplyChainClientTypes.BillOfMaterialsImportJob? + + public init( + job: SupplyChainClientTypes.BillOfMaterialsImportJob? = nil + ) + { + self.job = job + } +} + +struct GetBillOfMaterialsImportJobOutputBody: Swift.Equatable { + let job: SupplyChainClientTypes.BillOfMaterialsImportJob? +} + +extension GetBillOfMaterialsImportJobOutputBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case job + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let jobDecoded = try containerValues.decodeIfPresent(SupplyChainClientTypes.BillOfMaterialsImportJob.self, forKey: .job) + job = jobDecoded + } +} + +enum GetBillOfMaterialsImportJobOutputError: ClientRuntime.HttpResponseErrorBinding { + static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + let serviceError = try await SupplyChainClientTypes.makeServiceError(httpResponse, decoder, restJSONError, requestID) + if let error = serviceError { return error } + switch restJSONError.errorType { + case "AccessDeniedException": return try await AccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InternalServerException": return try await InternalServerException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension InternalServerException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InternalServerExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// Unexpected error during processing of request. +public struct InternalServerException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InternalServerException" } + public static var fault: ErrorFault { .server } + public static var isRetryable: Swift.Bool { true } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InternalServerExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension InternalServerExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension ResourceNotFoundException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ResourceNotFoundExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// Request references a resource which does not exist. +public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ResourceNotFoundException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ResourceNotFoundExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ResourceNotFoundExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension ServiceQuotaExceededException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ServiceQuotaExceededExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// Request would cause a service quota to be exceeded. +public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ServiceQuotaExceededException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ServiceQuotaExceededExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ServiceQuotaExceededExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension ThrottlingException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ThrottlingExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// Request was denied due to request throttling. +public struct ThrottlingException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ThrottlingException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { true } + public static var isThrottling: Swift.Bool { true } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ThrottlingExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ThrottlingExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension ValidationException { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ValidationExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The input does not satisfy the constraints specified by an AWS service. +public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ValidationException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ValidationExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ValidationExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} diff --git a/Sources/Services/AWSSupport/models/Models.swift b/Sources/Services/AWSSupport/models/Models.swift index 8b11a22153c..7e851b53367 100644 --- a/Sources/Services/AWSSupport/models/Models.swift +++ b/Sources/Services/AWSSupport/models/Models.swift @@ -2185,8 +2185,8 @@ extension DescribeServicesInput: Swift.Encodable { } if let serviceCodeList = serviceCodeList { var serviceCodeListContainer = encodeContainer.nestedUnkeyedContainer(forKey: .serviceCodeList) - for servicecode0 in serviceCodeList { - try serviceCodeListContainer.encode(servicecode0) + for servicecode20 in serviceCodeList { + try serviceCodeListContainer.encode(servicecode20) } } } diff --git a/Sources/Services/AWSTransfer/models/Models.swift b/Sources/Services/AWSTransfer/models/Models.swift index 149a539eb32..f517c2e2048 100644 --- a/Sources/Services/AWSTransfer/models/Models.swift +++ b/Sources/Services/AWSTransfer/models/Models.swift @@ -4805,6 +4805,7 @@ extension TransferClientTypes.DescribedConnector: Swift.Codable { case as2Config = "As2Config" case connectorId = "ConnectorId" case loggingRole = "LoggingRole" + case serviceManagedEgressIpAddresses = "ServiceManagedEgressIpAddresses" case sftpConfig = "SftpConfig" case tags = "Tags" case url = "Url" @@ -4827,6 +4828,12 @@ extension TransferClientTypes.DescribedConnector: Swift.Codable { if let loggingRole = self.loggingRole { try encodeContainer.encode(loggingRole, forKey: .loggingRole) } + if let serviceManagedEgressIpAddresses = serviceManagedEgressIpAddresses { + var serviceManagedEgressIpAddressesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .serviceManagedEgressIpAddresses) + for servicemanagedegressipaddress0 in serviceManagedEgressIpAddresses { + try serviceManagedEgressIpAddressesContainer.encode(servicemanagedegressipaddress0) + } + } if let sftpConfig = self.sftpConfig { try encodeContainer.encode(sftpConfig, forKey: .sftpConfig) } @@ -4868,6 +4875,17 @@ extension TransferClientTypes.DescribedConnector: Swift.Codable { tags = tagsDecoded0 let sftpConfigDecoded = try containerValues.decodeIfPresent(TransferClientTypes.SftpConnectorConfig.self, forKey: .sftpConfig) sftpConfig = sftpConfigDecoded + let serviceManagedEgressIpAddressesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .serviceManagedEgressIpAddresses) + var serviceManagedEgressIpAddressesDecoded0:[Swift.String]? = nil + if let serviceManagedEgressIpAddressesContainer = serviceManagedEgressIpAddressesContainer { + serviceManagedEgressIpAddressesDecoded0 = [Swift.String]() + for string0 in serviceManagedEgressIpAddressesContainer { + if let string0 = string0 { + serviceManagedEgressIpAddressesDecoded0?.append(string0) + } + } + } + serviceManagedEgressIpAddresses = serviceManagedEgressIpAddressesDecoded0 } } @@ -4885,6 +4903,8 @@ extension TransferClientTypes { public var connectorId: Swift.String? /// The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs. public var loggingRole: Swift.String? + /// The list of egress IP addresses of this connector. These IP addresses are assigned automatically when you create the connector. + public var serviceManagedEgressIpAddresses: [Swift.String]? /// A structure that contains the parameters for an SFTP connector object. public var sftpConfig: TransferClientTypes.SftpConnectorConfig? /// Key-value pairs that can be used to group and search for connectors. @@ -4898,6 +4918,7 @@ extension TransferClientTypes { as2Config: TransferClientTypes.As2ConnectorConfig? = nil, connectorId: Swift.String? = nil, loggingRole: Swift.String? = nil, + serviceManagedEgressIpAddresses: [Swift.String]? = nil, sftpConfig: TransferClientTypes.SftpConnectorConfig? = nil, tags: [TransferClientTypes.Tag]? = nil, url: Swift.String? = nil @@ -4908,6 +4929,7 @@ extension TransferClientTypes { self.as2Config = as2Config self.connectorId = connectorId self.loggingRole = loggingRole + self.serviceManagedEgressIpAddresses = serviceManagedEgressIpAddresses self.sftpConfig = sftpConfig self.tags = tags self.url = url @@ -5386,6 +5408,7 @@ extension TransferClientTypes { extension TransferClientTypes.DescribedServer: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" + case as2ServiceManagedEgressIpAddresses = "As2ServiceManagedEgressIpAddresses" case certificate = "Certificate" case domain = "Domain" case endpointDetails = "EndpointDetails" @@ -5413,6 +5436,12 @@ extension TransferClientTypes.DescribedServer: Swift.Codable { if let arn = self.arn { try encodeContainer.encode(arn, forKey: .arn) } + if let as2ServiceManagedEgressIpAddresses = as2ServiceManagedEgressIpAddresses { + var as2ServiceManagedEgressIpAddressesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .as2ServiceManagedEgressIpAddresses) + for servicemanagedegressipaddress0 in as2ServiceManagedEgressIpAddresses { + try as2ServiceManagedEgressIpAddressesContainer.encode(servicemanagedegressipaddress0) + } + } if let certificate = self.certificate { try encodeContainer.encode(certificate, forKey: .certificate) } @@ -5555,6 +5584,17 @@ extension TransferClientTypes.DescribedServer: Swift.Codable { structuredLogDestinations = structuredLogDestinationsDecoded0 let s3StorageOptionsDecoded = try containerValues.decodeIfPresent(TransferClientTypes.S3StorageOptions.self, forKey: .s3StorageOptions) s3StorageOptions = s3StorageOptionsDecoded + let as2ServiceManagedEgressIpAddressesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .as2ServiceManagedEgressIpAddresses) + var as2ServiceManagedEgressIpAddressesDecoded0:[Swift.String]? = nil + if let as2ServiceManagedEgressIpAddressesContainer = as2ServiceManagedEgressIpAddressesContainer { + as2ServiceManagedEgressIpAddressesDecoded0 = [Swift.String]() + for string0 in as2ServiceManagedEgressIpAddressesContainer { + if let string0 = string0 { + as2ServiceManagedEgressIpAddressesDecoded0?.append(string0) + } + } + } + as2ServiceManagedEgressIpAddresses = as2ServiceManagedEgressIpAddressesDecoded0 } } @@ -5564,6 +5604,8 @@ extension TransferClientTypes { /// Specifies the unique Amazon Resource Name (ARN) of the server. /// This member is required. public var arn: Swift.String? + /// The list of egress IP addresses of this server. These IP addresses are only relevant for servers that use the AS2 protocol. They are used for sending asynchronous MDNs. These IP addresses are assigned automatically when you create an AS2 server. Additionally, if you update an existing server and add the AS2 protocol, static IP addresses are assigned as well. + public var as2ServiceManagedEgressIpAddresses: [Swift.String]? /// Specifies the ARN of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when Protocols is set to FTPS. public var certificate: Swift.String? /// Specifies the domain of the storage system that is used for file transfers. @@ -5636,6 +5678,7 @@ extension TransferClientTypes { public init( arn: Swift.String? = nil, + as2ServiceManagedEgressIpAddresses: [Swift.String]? = nil, certificate: Swift.String? = nil, domain: TransferClientTypes.Domain? = nil, endpointDetails: TransferClientTypes.EndpointDetails? = nil, @@ -5659,6 +5702,7 @@ extension TransferClientTypes { ) { self.arn = arn + self.as2ServiceManagedEgressIpAddresses = as2ServiceManagedEgressIpAddresses self.certificate = certificate self.domain = domain self.endpointDetails = endpointDetails @@ -6756,7 +6800,7 @@ extension TransferClientTypes.IdentityProviderDetails: Swift.Codable { extension TransferClientTypes { /// Returns information related to the type of user authentication that is in use for a file transfer protocol-enabled server's users. A server can have only one method of authentication. public struct IdentityProviderDetails: Swift.Equatable { - /// The identifier of the Directory Service directory that you want to stop sharing. + /// The identifier of the Directory Service directory that you want to use as your identity provider. public var directoryId: Swift.String? /// The ARN for a Lambda function to use for the Identity provider. public var function: Swift.String? diff --git a/Sources/Services/AWSWisdom/WisdomClient.swift b/Sources/Services/AWSWisdom/WisdomClient.swift index f022ee8362f..7821ce71f77 100644 --- a/Sources/Services/AWSWisdom/WisdomClient.swift +++ b/Sources/Services/AWSWisdom/WisdomClient.swift @@ -967,6 +967,7 @@ extension WisdomClient: WisdomClientProtocol { /// Performs the `GetRecommendations` operation on the `WisdomService` service. /// /// Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use [NotifyRecommendationsReceived](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_NotifyRecommendationsReceived.html). This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use [QueryAssistant](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html). + @available(*, deprecated, message: "GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter GetRecommendationsInput : [no documentation found] /// @@ -1422,6 +1423,7 @@ extension WisdomClient: WisdomClientProtocol { /// Performs the `QueryAssistant` operation on the `WisdomService` service. /// /// Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use [GetRecommendations](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html). + @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter QueryAssistantInput : [no documentation found] /// diff --git a/Sources/Services/AWSWisdom/WisdomClientProtocol.swift b/Sources/Services/AWSWisdom/WisdomClientProtocol.swift index 6e78fb450c0..2c120d0d139 100644 --- a/Sources/Services/AWSWisdom/WisdomClientProtocol.swift +++ b/Sources/Services/AWSWisdom/WisdomClientProtocol.swift @@ -310,6 +310,7 @@ public protocol WisdomClientProtocol { /// Performs the `GetRecommendations` operation on the `WisdomService` service. /// /// Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use [NotifyRecommendationsReceived](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_NotifyRecommendationsReceived.html). This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use [QueryAssistant](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html). + @available(*, deprecated, message: "GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter GetRecommendationsInput : [no documentation found] /// @@ -455,6 +456,7 @@ public protocol WisdomClientProtocol { /// Performs the `QueryAssistant` operation on the `WisdomService` service. /// /// Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use [GetRecommendations](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html). + @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.") /// /// - Parameter QueryAssistantInput : [no documentation found] /// diff --git a/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift b/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift index 746dda038e0..cb48266c459 100644 --- a/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift +++ b/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift @@ -757,8 +757,6 @@ extension WorkSpacesClient: WorkSpacesClientProtocol { /// /// * You don't need to specify the PCOIP protocol for Linux bundles because WSP is the default protocol for those bundles. /// - /// * Ensure you review your running mode to ensure you are using a running mode that is optimal for your needs and budget. For more information on switching running modes, see [ Can I switch between hourly and monthly billing?](https://aws.amazon.com/workspaces/faqs/#:~:text=Q%3A%20Can%20I%20switch%20between%20hourly%20and%20monthly%20billing%3F) - /// /// - Parameter CreateWorkspacesInput : [no documentation found] /// /// - Returns: `CreateWorkspacesOutput` : [no documentation found] @@ -3089,7 +3087,7 @@ extension WorkSpacesClient: WorkSpacesClientProtocol { /// Performs the `RebootWorkspaces` operation on the `WorkspacesService` service. /// - /// Reboots the specified WorkSpaces. You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY. This operation is asynchronous and returns before the WorkSpaces have rebooted. + /// Reboots the specified WorkSpaces. You cannot reboot a WorkSpace unless its state is AVAILABLE, UNHEALTHY, or REBOOTING. Reboot a WorkSpace in the REBOOTING state only if your WorkSpace has been stuck in the REBOOTING state for over 20 minutes. This operation is asynchronous and returns before the WorkSpaces have rebooted. /// /// - Parameter RebootWorkspacesInput : [no documentation found] /// diff --git a/Sources/Services/AWSWorkSpaces/WorkSpacesClientProtocol.swift b/Sources/Services/AWSWorkSpaces/WorkSpacesClientProtocol.swift index ceaf0e1ace8..1a0e3ffd3f3 100644 --- a/Sources/Services/AWSWorkSpaces/WorkSpacesClientProtocol.swift +++ b/Sources/Services/AWSWorkSpaces/WorkSpacesClientProtocol.swift @@ -252,8 +252,6 @@ public protocol WorkSpacesClientProtocol { /// /// * You don't need to specify the PCOIP protocol for Linux bundles because WSP is the default protocol for those bundles. /// - /// * Ensure you review your running mode to ensure you are using a running mode that is optimal for your needs and budget. For more information on switching running modes, see [ Can I switch between hourly and monthly billing?](https://aws.amazon.com/workspaces/faqs/#:~:text=Q%3A%20Can%20I%20switch%20between%20hourly%20and%20monthly%20billing%3F) - /// /// - Parameter CreateWorkspacesInput : [no documentation found] /// /// - Returns: `CreateWorkspacesOutput` : [no documentation found] @@ -986,7 +984,7 @@ public protocol WorkSpacesClientProtocol { func modifyWorkspaceState(input: ModifyWorkspaceStateInput) async throws -> ModifyWorkspaceStateOutput /// Performs the `RebootWorkspaces` operation on the `WorkspacesService` service. /// - /// Reboots the specified WorkSpaces. You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY. This operation is asynchronous and returns before the WorkSpaces have rebooted. + /// Reboots the specified WorkSpaces. You cannot reboot a WorkSpace unless its state is AVAILABLE, UNHEALTHY, or REBOOTING. Reboot a WorkSpace in the REBOOTING state only if your WorkSpace has been stuck in the REBOOTING state for over 20 minutes. This operation is asynchronous and returns before the WorkSpaces have rebooted. /// /// - Parameter RebootWorkspacesInput : [no documentation found] /// diff --git a/Sources/Services/AWSWorkSpaces/models/Models.swift b/Sources/Services/AWSWorkSpaces/models/Models.swift index 7e578ad8c8a..4a78931672a 100644 --- a/Sources/Services/AWSWorkSpaces/models/Models.swift +++ b/Sources/Services/AWSWorkSpaces/models/Models.swift @@ -15395,11 +15395,7 @@ extension WorkSpacesClientTypes { public var protocols: [WorkSpacesClientTypes.ModelProtocol]? /// The size of the root volume. For important information about how to modify the size of the root and user volumes, see [Modify a WorkSpace](https://docs.aws.amazon.com/workspaces/latest/adminguide/modify-workspaces.html). public var rootVolumeSizeGib: Swift.Int? - /// The running mode. For more information, see [Manage the WorkSpace Running Mode](https://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html). - /// - /// * The MANUAL value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see [Amazon WorkSpaces Core](http://aws.amazon.com/workspaces/core/). - /// - /// * Ensure you review your running mode to ensure you are using a running mode that is optimal for your needs and budget. For more information on switching running modes, see [ Can I switch between hourly and monthly billing?](https://aws.amazon.com/workspaces/faqs/#:~:text=Q%3A%20Can%20I%20switch%20between%20hourly%20and%20monthly%20billing%3F) + /// The running mode. For more information, see [Manage the WorkSpace Running Mode](https://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html). The MANUAL value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see [Amazon WorkSpaces Core](http://aws.amazon.com/workspaces/core/). public var runningMode: WorkSpacesClientTypes.RunningMode? /// The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals. public var runningModeAutoStopTimeoutInMinutes: Swift.Int? diff --git a/Tests/Services/AWSCodeBuildTests/EndpointResolverTest.swift b/Tests/Services/AWSCodeBuildTests/EndpointResolverTest.swift index dd788c1a36c..972c860aeb5 100644 --- a/Tests/Services/AWSCodeBuildTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSCodeBuildTests/EndpointResolverTest.swift @@ -1046,23 +1046,4 @@ class EndpointResolverTest: XCTestCase { } } - /// Partition doesn't support DualStack - func testResolve53() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - } diff --git a/Tests/Services/AWSElasticsearchServiceTests/EndpointResolverTest.swift b/Tests/Services/AWSElasticsearchServiceTests/EndpointResolverTest.swift index 545732f4961..4454d83a303 100644 --- a/Tests/Services/AWSElasticsearchServiceTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSElasticsearchServiceTests/EndpointResolverTest.swift @@ -568,7 +568,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://es.us-east-1.api.aws", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://aos.us-east-1.api.aws", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } @@ -668,7 +668,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://es.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://aos.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } @@ -788,7 +788,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://es.us-gov-east-1.api.aws", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://aos.us-gov-east-1.api.aws", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } diff --git a/Tests/Services/AWSIAMTests/EndpointResolverTest.swift b/Tests/Services/AWSIAMTests/EndpointResolverTest.swift index 192050ce88f..8337788976a 100644 --- a/Tests/Services/AWSIAMTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSIAMTests/EndpointResolverTest.swift @@ -661,8 +661,64 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// For custom endpoint with region set and fips disabled and dualstack disabled + /// For region eu-isoe-west-1 with FIPS disabled and DualStack disabled func testResolve28() throws { + let endpointParams = EndpointParams( + region: "eu-isoe-west-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "iam", + "signingRegion": "eu-isoe-west-1" + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://iam.eu-isoe-west-1.cloud.adc-e.uk", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-isof-south-1 with FIPS disabled and DualStack disabled + func testResolve29() throws { + let endpointParams = EndpointParams( + region: "us-isof-south-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-isof-south-1" + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://iam.us-isof-south-1.csp.hci.ic.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with region set and fips disabled and dualstack disabled + func testResolve30() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -683,7 +739,7 @@ class EndpointResolverTest: XCTestCase { } /// For custom endpoint with region not set and fips disabled and dualstack disabled - func testResolve29() throws { + func testResolve31() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", useDualStack: false, @@ -703,7 +759,7 @@ class EndpointResolverTest: XCTestCase { } /// For custom endpoint with fips enabled and dualstack disabled - func testResolve30() throws { + func testResolve32() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -723,7 +779,7 @@ class EndpointResolverTest: XCTestCase { } /// For custom endpoint with fips disabled and dualstack enabled - func testResolve31() throws { + func testResolve33() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -743,7 +799,7 @@ class EndpointResolverTest: XCTestCase { } /// Missing region - func testResolve32() throws { + func testResolve34() throws { let endpointParams = EndpointParams( ) let resolver = try DefaultEndpointResolver() @@ -758,23 +814,4 @@ class EndpointResolverTest: XCTestCase { } } - /// Partition doesn't support DualStack - func testResolve33() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - } diff --git a/Tests/Services/AWSLaunchWizardTests/EndpointResolverTest.swift b/Tests/Services/AWSLaunchWizardTests/EndpointResolverTest.swift index 620ac27b335..8fe7d258338 100644 --- a/Tests/Services/AWSLaunchWizardTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSLaunchWizardTests/EndpointResolverTest.swift @@ -506,23 +506,4 @@ class EndpointResolverTest: XCTestCase { } } - /// Partition doesn't support DualStack - func testResolve26() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - } diff --git a/Tests/Services/AWSNeptuneTests/EndpointResolverTest.swift b/Tests/Services/AWSNeptuneTests/EndpointResolverTest.swift index b1956f54f6e..2b60e2ad9e7 100644 --- a/Tests/Services/AWSNeptuneTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSNeptuneTests/EndpointResolverTest.swift @@ -1086,23 +1086,4 @@ class EndpointResolverTest: XCTestCase { } } - /// Partition doesn't support DualStack - func testResolve55() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - } diff --git a/Tests/Services/AWSNetworkMonitorTests/EndpointResolverTest.swift b/Tests/Services/AWSNetworkMonitorTests/EndpointResolverTest.swift new file mode 100644 index 00000000000..40d7600229b --- /dev/null +++ b/Tests/Services/AWSNetworkMonitorTests/EndpointResolverTest.swift @@ -0,0 +1,509 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import AWSClientRuntime +@testable import AWSNetworkMonitor +import AwsCommonRuntimeKit +import ClientRuntime +import SmithyTestUtil +import XCTest + +class EndpointResolverTest: XCTestCase { + + override class func setUp() { + AwsCommonRuntimeKit.CommonRuntimeKit.initialize() + } + + /// For region us-east-1 with FIPS enabled and DualStack enabled + func testResolve1() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.us-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-east-1 with FIPS enabled and DualStack disabled + func testResolve2() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.us-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-east-1 with FIPS disabled and DualStack enabled + func testResolve3() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.us-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-east-1 with FIPS disabled and DualStack disabled + func testResolve4() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.us-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS enabled and DualStack enabled + func testResolve5() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS enabled and DualStack disabled + func testResolve6() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS disabled and DualStack enabled + func testResolve7() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS disabled and DualStack disabled + func testResolve8() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS enabled and DualStack enabled + func testResolve9() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.us-gov-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS enabled and DualStack disabled + func testResolve10() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS disabled and DualStack enabled + func testResolve11() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.us-gov-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS disabled and DualStack disabled + func testResolve12() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-iso-east-1 with FIPS enabled and DualStack enabled + func testResolve13() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) + default: + XCTFail() + } + } + } + + /// For region us-iso-east-1 with FIPS enabled and DualStack disabled + func testResolve14() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-iso-east-1 with FIPS disabled and DualStack enabled + func testResolve15() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) + default: + XCTFail() + } + } + } + + /// For region us-iso-east-1 with FIPS disabled and DualStack disabled + func testResolve16() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-isob-east-1 with FIPS enabled and DualStack enabled + func testResolve17() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) + default: + XCTFail() + } + } + } + + /// For region us-isob-east-1 with FIPS enabled and DualStack disabled + func testResolve18() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor-fips.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-isob-east-1 with FIPS disabled and DualStack enabled + func testResolve19() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) + default: + XCTFail() + } + } + } + + /// For region us-isob-east-1 with FIPS disabled and DualStack disabled + func testResolve20() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://networkmonitor.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with region set and fips disabled and dualstack disabled + func testResolve21() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + region: "us-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with region not set and fips disabled and dualstack disabled + func testResolve22() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with fips enabled and dualstack disabled + func testResolve23() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + region: "us-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("Invalid Configuration: FIPS and custom endpoint are not supported", message) + default: + XCTFail() + } + } + } + + /// For custom endpoint with fips disabled and dualstack enabled + func testResolve24() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + region: "us-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("Invalid Configuration: Dualstack and custom endpoint are not supported", message) + default: + XCTFail() + } + } + } + + /// Missing region + func testResolve25() throws { + let endpointParams = EndpointParams( + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("Invalid Configuration: Missing Region", message) + default: + XCTFail() + } + } + } + +} diff --git a/Tests/Services/AWSOpenSearchServerlessTests/EndpointResolverTest.swift b/Tests/Services/AWSOpenSearchServerlessTests/EndpointResolverTest.swift index 2f1e1d3324d..6f04bfab95f 100644 --- a/Tests/Services/AWSOpenSearchServerlessTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSOpenSearchServerlessTests/EndpointResolverTest.swift @@ -506,23 +506,4 @@ class EndpointResolverTest: XCTestCase { } } - /// Partition doesn't support DualStack - func testResolve26() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - } diff --git a/Tests/Services/AWSRoute53Tests/EndpointResolverTest.swift b/Tests/Services/AWSRoute53Tests/EndpointResolverTest.swift index dce5e4068ae..73a6a60582e 100644 --- a/Tests/Services/AWSRoute53Tests/EndpointResolverTest.swift +++ b/Tests/Services/AWSRoute53Tests/EndpointResolverTest.swift @@ -661,8 +661,64 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// For custom endpoint with region set and fips disabled and dualstack disabled + /// For region eu-isoe-west-1 with FIPS disabled and DualStack disabled func testResolve28() throws { + let endpointParams = EndpointParams( + region: "eu-isoe-west-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "route53", + "signingRegion": "eu-isoe-west-1" + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://route53.cloud.adc-e.uk", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-isof-south-1 with FIPS disabled and DualStack disabled + func testResolve29() throws { + let endpointParams = EndpointParams( + region: "us-isof-south-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-isof-south-1" + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://route53.csp.hci.ic.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with region set and fips disabled and dualstack disabled + func testResolve30() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -683,7 +739,7 @@ class EndpointResolverTest: XCTestCase { } /// For custom endpoint with region not set and fips disabled and dualstack disabled - func testResolve29() throws { + func testResolve31() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", useDualStack: false, @@ -703,7 +759,7 @@ class EndpointResolverTest: XCTestCase { } /// For custom endpoint with fips enabled and dualstack disabled - func testResolve30() throws { + func testResolve32() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -723,7 +779,7 @@ class EndpointResolverTest: XCTestCase { } /// For custom endpoint with fips disabled and dualstack enabled - func testResolve31() throws { + func testResolve33() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -743,7 +799,7 @@ class EndpointResolverTest: XCTestCase { } /// Missing region - func testResolve32() throws { + func testResolve34() throws { let endpointParams = EndpointParams( ) let resolver = try DefaultEndpointResolver() @@ -758,23 +814,4 @@ class EndpointResolverTest: XCTestCase { } } - /// Partition doesn't support DualStack - func testResolve33() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - } diff --git a/Tests/Services/AWSS3ControlTests/EndpointResolverTest.swift b/Tests/Services/AWSS3ControlTests/EndpointResolverTest.swift index 1f66f66a5c9..db78d15c9f2 100644 --- a/Tests/Services/AWSS3ControlTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSS3ControlTests/EndpointResolverTest.swift @@ -645,7 +645,7 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// outpost access points do not support dualstack@us-west-2 + /// outpost access points support dualstack@us-west-2 func testResolve20() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", @@ -657,58 +657,94 @@ class EndpointResolverTest: XCTestCase { ) let resolver = try DefaultEndpointResolver() - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost Access Points do not support dual-stack", message) - default: - XCTFail() - } - } + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + var headers = Headers() + headers.add(name: "x-amz-account-id", values: ["123456789012"]) + headers.add(name: "x-amz-outpost-id", values: ["op-01234567890123456"]) + let expected = try ClientRuntime.Endpoint(urlString: "https://s3-outposts.us-west-2.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) } - /// outpost access points do not support dualstack@cn-north-1 + /// outpost access points support dualstack@af-south-1 func testResolve21() throws { let endpointParams = EndpointParams( - accessPointName: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + accessPointName: "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", accountId: "123456789012", - region: "cn-north-1", + region: "af-south-1", requiresAccountId: true, useDualStack: true, useFIPS: false ) let resolver = try DefaultEndpointResolver() - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost Access Points do not support dual-stack", message) - default: - XCTFail() - } - } + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + var headers = Headers() + headers.add(name: "x-amz-account-id", values: ["123456789012"]) + headers.add(name: "x-amz-outpost-id", values: ["op-01234567890123456"]) + let expected = try ClientRuntime.Endpoint(urlString: "https://s3-outposts.af-south-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) } - /// outpost access points do not support dualstack@af-south-1 + /// outpost access points support fips + dualstack@af-south-1 func testResolve22() throws { let endpointParams = EndpointParams( - accessPointName: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + accessPointName: "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", accountId: "123456789012", region: "af-south-1", requiresAccountId: true, useDualStack: true, - useFIPS: false + useFIPS: true ) let resolver = try DefaultEndpointResolver() - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost Access Points do not support dual-stack", message) - default: - XCTFail() - } - } + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + var headers = Headers() + headers.add(name: "x-amz-account-id", values: ["123456789012"]) + headers.add(name: "x-amz-outpost-id", values: ["op-01234567890123456"]) + let expected = try ClientRuntime.Endpoint(urlString: "https://s3-outposts-fips.af-south-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) } /// invalid ARN: must be include outpost ID@us-west-2 @@ -1110,15 +1146,14 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// CreateBucket + OutpostId endpoint url@us-east-2 + /// ListRegionalBucket + OutpostId + fips + dualstack@us-east-2 func testResolve37() throws { let endpointParams = EndpointParams( - bucket: "blah", - endpoint: "https://beta.example.com", - outpostId: "123", + accountId: "123456789012", + outpostId: "op-123", region: "us-east-2", - requiresAccountId: false, - useDualStack: false, + requiresAccountId: true, + useDualStack: true, useFIPS: true ) let resolver = try DefaultEndpointResolver() @@ -1138,41 +1173,51 @@ class EndpointResolverTest: XCTestCase { ] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://beta.example.com", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://s3-outposts-fips.us-east-2.api.aws", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } - /// dualstack cannot be used with outposts when an endpoint URL is set@us-west-2. + /// CreateBucket + OutpostId endpoint url@us-east-2 func testResolve38() throws { let endpointParams = EndpointParams( - accessPointName: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + bucket: "blah", endpoint: "https://beta.example.com", - region: "us-west-2", - requiresAccountId: true, - useDualStack: true, - useFIPS: false + outpostId: "123", + region: "us-east-2", + requiresAccountId: false, + useDualStack: false, + useFIPS: true ) let resolver = try DefaultEndpointResolver() - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost Access Points do not support dual-stack", message) - default: - XCTFail() - } - } + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://beta.example.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) } - /// Dual-stack cannot be used with outposts@us-west-2 + /// dualstack cannot be used with outposts when an endpoint URL is set@us-west-2. func testResolve39() throws { let endpointParams = EndpointParams( - bucket: "bucketname", - endpoint: "https://beta.example.com", - outpostId: "op-123", + accessPointName: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + endpoint: "https://s3-outposts.us-west-2.api.aws", region: "us-west-2", - requiresAccountId: false, + requiresAccountId: true, useDualStack: true, useFIPS: false ) @@ -1181,7 +1226,7 @@ class EndpointResolverTest: XCTestCase { XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in switch error { case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outposts do not support dual-stack", message) + XCTAssertEqual("Invalid Configuration: DualStack and custom endpoint are not supported", message) default: XCTFail() } @@ -1353,25 +1398,37 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// Outposts do not support dualstack@us-west-2 + /// bucket ARN in aws partition with fips + dualstack@us-east-2 func testResolve45() throws { let endpointParams = EndpointParams( - bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", - region: "us-west-2", + bucket: "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + region: "us-east-2", requiresAccountId: true, useDualStack: true, - useFIPS: false + useFIPS: true ) let resolver = try DefaultEndpointResolver() - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost buckets do not support dual-stack", message) - default: - XCTFail() - } - } + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + var headers = Headers() + headers.add(name: "x-amz-account-id", values: ["123456789012"]) + headers.add(name: "x-amz-outpost-id", values: ["op-01234567890123456"]) + let expected = try ClientRuntime.Endpoint(urlString: "https://s3-outposts-fips.us-east-2.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) } /// vanilla bucket arn requires account id@cn-north-1 @@ -1539,7 +1596,7 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// Outposts do not support dualstack@us-west-2 + /// Outposts support dualstack @us-west-2 func testResolve51() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", @@ -1550,14 +1607,26 @@ class EndpointResolverTest: XCTestCase { ) let resolver = try DefaultEndpointResolver() - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost buckets do not support dual-stack", message) - default: - XCTFail() - } - } + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [ + "authSchemes": [ + [ + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + ] as [String: AnyHashable] + ] as [AnyHashable] + ] + + var headers = Headers() + headers.add(name: "x-amz-account-id", values: ["123456789012"]) + headers.add(name: "x-amz-outpost-id", values: ["op-01234567890123456"]) + let expected = try ClientRuntime.Endpoint(urlString: "https://s3-outposts.us-west-2.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) } /// vanilla bucket arn requires account id@af-south-1 @@ -1725,29 +1794,8 @@ class EndpointResolverTest: XCTestCase { XCTAssertEqual(expected, actual) } - /// Outposts do not support dualstack@us-west-2 - func testResolve57() throws { - let endpointParams = EndpointParams( - bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", - region: "us-west-2", - requiresAccountId: true, - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost buckets do not support dual-stack", message) - default: - XCTFail() - } - } - } - /// Invalid ARN: missing outpost id and bucket@us-west-2 - func testResolve58() throws { + func testResolve57() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost", region: "us-west-2", @@ -1768,7 +1816,7 @@ class EndpointResolverTest: XCTestCase { } /// Invalid ARN: missing bucket@us-west-2 - func testResolve59() throws { + func testResolve58() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456", region: "us-west-2", @@ -1789,7 +1837,7 @@ class EndpointResolverTest: XCTestCase { } /// Invalid ARN: missing outpost and bucket ids@us-west-2 - func testResolve60() throws { + func testResolve59() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:bucket", region: "us-west-2", @@ -1810,7 +1858,7 @@ class EndpointResolverTest: XCTestCase { } /// Invalid ARN: missing bucket id@us-west-2 - func testResolve61() throws { + func testResolve60() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket", region: "us-west-2", @@ -1831,7 +1879,7 @@ class EndpointResolverTest: XCTestCase { } /// account id inserted into hostname@us-west-2 - func testResolve62() throws { + func testResolve61() throws { let endpointParams = EndpointParams( accountId: "1234567890", region: "us-west-2", @@ -1862,7 +1910,7 @@ class EndpointResolverTest: XCTestCase { } /// account id prefix with dualstack@us-east-1 - func testResolve63() throws { + func testResolve62() throws { let endpointParams = EndpointParams( accountId: "1234567890", region: "us-east-1", @@ -1893,7 +1941,7 @@ class EndpointResolverTest: XCTestCase { } /// account id prefix with fips@us-east-1 - func testResolve64() throws { + func testResolve63() throws { let endpointParams = EndpointParams( accountId: "1234567890", region: "us-east-1", @@ -1924,7 +1972,7 @@ class EndpointResolverTest: XCTestCase { } /// custom account id prefix with fips@us-east-1 - func testResolve65() throws { + func testResolve64() throws { let endpointParams = EndpointParams( accountId: "123456789012", region: "us-east-1", @@ -1955,7 +2003,7 @@ class EndpointResolverTest: XCTestCase { } /// standard url @ us-east-1 - func testResolve66() throws { + func testResolve65() throws { let endpointParams = EndpointParams( region: "us-east-1" ) @@ -1982,7 +2030,7 @@ class EndpointResolverTest: XCTestCase { } /// fips url @ us-east-1 - func testResolve67() throws { + func testResolve66() throws { let endpointParams = EndpointParams( region: "us-east-1", useFIPS: true @@ -2010,7 +2058,7 @@ class EndpointResolverTest: XCTestCase { } /// dualstack url @ us-east-1 - func testResolve68() throws { + func testResolve67() throws { let endpointParams = EndpointParams( region: "us-east-1", useDualStack: true @@ -2038,7 +2086,7 @@ class EndpointResolverTest: XCTestCase { } /// fips,dualstack url @ us-east-1 - func testResolve69() throws { + func testResolve68() throws { let endpointParams = EndpointParams( region: "us-east-1", useDualStack: true, @@ -2067,7 +2115,7 @@ class EndpointResolverTest: XCTestCase { } /// standard url @ cn-north-1 - func testResolve70() throws { + func testResolve69() throws { let endpointParams = EndpointParams( region: "cn-north-1" ) @@ -2094,7 +2142,7 @@ class EndpointResolverTest: XCTestCase { } /// fips @ cn-north-1 - func testResolve71() throws { + func testResolve70() throws { let endpointParams = EndpointParams( region: "cn-north-1", useDualStack: true, @@ -2113,7 +2161,7 @@ class EndpointResolverTest: XCTestCase { } /// custom account id prefix @us-east-1 - func testResolve72() throws { + func testResolve71() throws { let endpointParams = EndpointParams( accountId: "123456789012", region: "us-east-1", @@ -2144,7 +2192,7 @@ class EndpointResolverTest: XCTestCase { } /// invalid account id prefix @us-east-1 - func testResolve73() throws { + func testResolve72() throws { let endpointParams = EndpointParams( accountId: "/?invalid¬-host*label", region: "us-east-1", @@ -2165,7 +2213,7 @@ class EndpointResolverTest: XCTestCase { } /// custom account id prefix with fips@us-east-1 - func testResolve74() throws { + func testResolve73() throws { let endpointParams = EndpointParams( accountId: "123456789012", region: "us-east-1", @@ -2196,7 +2244,7 @@ class EndpointResolverTest: XCTestCase { } /// custom account id prefix with dualstack,fips@us-east-1 - func testResolve75() throws { + func testResolve74() throws { let endpointParams = EndpointParams( accountId: "123456789012", region: "us-east-1", @@ -2227,7 +2275,7 @@ class EndpointResolverTest: XCTestCase { } /// custom account id with custom endpoint - func testResolve76() throws { + func testResolve75() throws { let endpointParams = EndpointParams( accountId: "123456789012", endpoint: "https://example.com", @@ -2257,7 +2305,7 @@ class EndpointResolverTest: XCTestCase { } /// RequiresAccountId with AccountId unset - func testResolve77() throws { + func testResolve76() throws { let endpointParams = EndpointParams( region: "us-east-1", requiresAccountId: true @@ -2275,7 +2323,7 @@ class EndpointResolverTest: XCTestCase { } /// RequiresAccountId with AccountId unset and custom endpoint - func testResolve78() throws { + func testResolve77() throws { let endpointParams = EndpointParams( endpoint: "https://beta.example.com", region: "us-east-1", @@ -2294,7 +2342,7 @@ class EndpointResolverTest: XCTestCase { } /// RequiresAccountId with invalid AccountId and custom endpoint - func testResolve79() throws { + func testResolve78() throws { let endpointParams = EndpointParams( accountId: "/?invalid¬-host*label", endpoint: "https://beta.example.com", @@ -2314,7 +2362,7 @@ class EndpointResolverTest: XCTestCase { } /// account id with custom endpoint, fips - func testResolve80() throws { + func testResolve79() throws { let endpointParams = EndpointParams( accountId: "123456789012", endpoint: "https://example.com", @@ -2345,7 +2393,7 @@ class EndpointResolverTest: XCTestCase { } /// custom endpoint, fips - func testResolve81() throws { + func testResolve80() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -2374,7 +2422,7 @@ class EndpointResolverTest: XCTestCase { } /// custom endpoint, fips - func testResolve82() throws { + func testResolve81() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -2403,7 +2451,7 @@ class EndpointResolverTest: XCTestCase { } /// custom endpoint, DualStack - func testResolve83() throws { + func testResolve82() throws { let endpointParams = EndpointParams( endpoint: "https://example.com", region: "us-east-1", @@ -2423,7 +2471,7 @@ class EndpointResolverTest: XCTestCase { } /// region not set - func testResolve84() throws { + func testResolve83() throws { let endpointParams = EndpointParams( ) let resolver = try DefaultEndpointResolver() @@ -2439,7 +2487,7 @@ class EndpointResolverTest: XCTestCase { } /// invalid partition - func testResolve85() throws { + func testResolve84() throws { let endpointParams = EndpointParams( region: "invalid-region 42" ) @@ -2456,7 +2504,7 @@ class EndpointResolverTest: XCTestCase { } /// ListRegionalBuckets + OutpostId without accountId set. - func testResolve86() throws { + func testResolve85() throws { let endpointParams = EndpointParams( outpostId: "op-123", region: "us-east-2", @@ -2477,7 +2525,7 @@ class EndpointResolverTest: XCTestCase { } /// ListRegionalBuckets + OutpostId with invalid accountId set. - func testResolve87() throws { + func testResolve86() throws { let endpointParams = EndpointParams( accountId: "/?invalid¬-host*label", outpostId: "op-123", @@ -2499,7 +2547,7 @@ class EndpointResolverTest: XCTestCase { } /// accesspoint set but missing accountId - func testResolve88() throws { + func testResolve87() throws { let endpointParams = EndpointParams( accessPointName: "myaccesspoint", region: "us-west-2", @@ -2520,7 +2568,7 @@ class EndpointResolverTest: XCTestCase { } /// outpost accesspoint ARN with missing accountId - func testResolve89() throws { + func testResolve88() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:us-west-2::outpost:op-01234567890123456:outpost:op1", region: "us-west-2", @@ -2541,7 +2589,7 @@ class EndpointResolverTest: XCTestCase { } /// bucket ARN with missing accountId - func testResolve90() throws { + func testResolve89() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:us-west-2::outpost:op-01234567890123456:bucket:mybucket", region: "us-west-2", @@ -2562,7 +2610,7 @@ class EndpointResolverTest: XCTestCase { } /// endpoint url with accesspoint (non-arn) - func testResolve91() throws { + func testResolve90() throws { let endpointParams = EndpointParams( accessPointName: "apname", accountId: "123456789012", @@ -2595,7 +2643,7 @@ class EndpointResolverTest: XCTestCase { } /// access point name with an accesspoint arn@us-west-2 - func testResolve92() throws { + func testResolve91() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", endpoint: "https://beta.example.com", @@ -2629,7 +2677,7 @@ class EndpointResolverTest: XCTestCase { } /// DualStack + Custom endpoint is not supported(non-arn) - func testResolve93() throws { + func testResolve92() throws { let endpointParams = EndpointParams( accessPointName: "apname", accountId: "123456789012", @@ -2651,11 +2699,11 @@ class EndpointResolverTest: XCTestCase { } } - /// get bucket with endpoint_url and dualstack is not supported@us-west-2 - func testResolve94() throws { + /// get bucket with custom endpoint and dualstack is not supported@us-west-2 + func testResolve93() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", - endpoint: "https://beta.example.com", + endpoint: "https://s3-outposts.us-west-2.api.aws", region: "us-west-2", requiresAccountId: true, useDualStack: true, @@ -2666,7 +2714,7 @@ class EndpointResolverTest: XCTestCase { XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in switch error { case EndpointError.unresolved(let message): - XCTAssertEqual("Invalid configuration: Outpost buckets do not support dual-stack", message) + XCTAssertEqual("Invalid Configuration: DualStack and custom endpoint are not supported", message) default: XCTFail() } @@ -2674,7 +2722,7 @@ class EndpointResolverTest: XCTestCase { } /// ListRegionalBuckets + OutpostId with fips in CN. - func testResolve95() throws { + func testResolve94() throws { let endpointParams = EndpointParams( accountId: "0123456789012", outpostId: "op-123", @@ -2696,7 +2744,7 @@ class EndpointResolverTest: XCTestCase { } /// ListRegionalBuckets + invalid OutpostId. - func testResolve96() throws { + func testResolve95() throws { let endpointParams = EndpointParams( accountId: "0123456789012", outpostId: "?outpost/invalid+", @@ -2718,7 +2766,7 @@ class EndpointResolverTest: XCTestCase { } /// bucket ARN with mismatched accountId - func testResolve97() throws { + func testResolve96() throws { let endpointParams = EndpointParams( accountId: "0123456789012", bucket: "arn:aws:s3-outposts:us-west-2:999999:outpost:op-01234567890123456:bucket:mybucket", @@ -2740,7 +2788,7 @@ class EndpointResolverTest: XCTestCase { } /// OutpostId with invalid region - func testResolve98() throws { + func testResolve97() throws { let endpointParams = EndpointParams( accountId: "0123456", outpostId: "op-123", @@ -2762,7 +2810,7 @@ class EndpointResolverTest: XCTestCase { } /// OutpostId with RequireAccountId unset - func testResolve99() throws { + func testResolve98() throws { let endpointParams = EndpointParams( outpostId: "op-123", region: "us-west-2", @@ -2792,7 +2840,7 @@ class EndpointResolverTest: XCTestCase { } /// Outpost Accesspoint ARN with arn region and client region mismatch with UseArnRegion=false - func testResolve100() throws { + func testResolve99() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", accountId: "123456789012", @@ -2815,7 +2863,7 @@ class EndpointResolverTest: XCTestCase { } /// Outpost Bucket ARN with arn region and client region mismatch with UseArnRegion=false - func testResolve101() throws { + func testResolve100() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", endpoint: "https://beta.example.com", @@ -2838,7 +2886,7 @@ class EndpointResolverTest: XCTestCase { } /// Accesspoint ARN with region mismatch and UseArnRegion unset - func testResolve102() throws { + func testResolve101() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", accountId: "123456789012", @@ -2872,7 +2920,7 @@ class EndpointResolverTest: XCTestCase { } /// Bucket ARN with region mismatch and UseArnRegion unset - func testResolve103() throws { + func testResolve102() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", region: "us-west-2", @@ -2905,7 +2953,7 @@ class EndpointResolverTest: XCTestCase { } /// Outpost Bucket ARN with partition mismatch with UseArnRegion=true - func testResolve104() throws { + func testResolve103() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", region: "us-west-2", @@ -2927,7 +2975,7 @@ class EndpointResolverTest: XCTestCase { } /// Accesspoint ARN with partition mismatch and UseArnRegion=true - func testResolve105() throws { + func testResolve104() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", accountId: "123456789012", @@ -2950,7 +2998,7 @@ class EndpointResolverTest: XCTestCase { } /// Accesspoint ARN with region mismatch, UseArnRegion=false and custom endpoint - func testResolve106() throws { + func testResolve105() throws { let endpointParams = EndpointParams( accessPointName: "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", endpoint: "https://example.com", @@ -2973,7 +3021,7 @@ class EndpointResolverTest: XCTestCase { } /// outpost bucket arn@us-west-2 - func testResolve107() throws { + func testResolve106() throws { let endpointParams = EndpointParams( bucket: "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", region: "us-west-2", @@ -3006,7 +3054,7 @@ class EndpointResolverTest: XCTestCase { } /// S3 Snow Control with bucket - func testResolve108() throws { + func testResolve107() throws { let endpointParams = EndpointParams( bucket: "bucketName", endpoint: "https://10.0.1.12:433", @@ -3037,7 +3085,7 @@ class EndpointResolverTest: XCTestCase { } /// S3 Snow Control without bucket - func testResolve109() throws { + func testResolve108() throws { let endpointParams = EndpointParams( endpoint: "https://10.0.1.12:433", region: "snow", @@ -3067,7 +3115,7 @@ class EndpointResolverTest: XCTestCase { } /// S3 Snow Control with bucket and without port - func testResolve110() throws { + func testResolve109() throws { let endpointParams = EndpointParams( bucket: "bucketName", endpoint: "https://10.0.1.12", @@ -3098,7 +3146,7 @@ class EndpointResolverTest: XCTestCase { } /// S3 Snow Control with bucket and with DNS - func testResolve111() throws { + func testResolve110() throws { let endpointParams = EndpointParams( bucket: "bucketName", endpoint: "http://s3snow.com", @@ -3129,7 +3177,7 @@ class EndpointResolverTest: XCTestCase { } /// S3 Snow Control with FIPS enabled - func testResolve112() throws { + func testResolve111() throws { let endpointParams = EndpointParams( bucket: "bucketName", endpoint: "https://10.0.1.12:433", @@ -3150,7 +3198,7 @@ class EndpointResolverTest: XCTestCase { } /// S3 Snow Control with Dualstack enabled - func testResolve113() throws { + func testResolve112() throws { let endpointParams = EndpointParams( bucket: "bucketName", endpoint: "https://10.0.1.12:433", diff --git a/Tests/Services/AWSSecretsManagerTests/EndpointResolverTest.swift b/Tests/Services/AWSSecretsManagerTests/EndpointResolverTest.swift index 8d4fde9c01d..45a5026466a 100644 --- a/Tests/Services/AWSSecretsManagerTests/EndpointResolverTest.swift +++ b/Tests/Services/AWSSecretsManagerTests/EndpointResolverTest.swift @@ -568,7 +568,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager-fips.us-east-1.api.aws", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager-fips.us-east-1.amazonaws.com", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } @@ -588,7 +588,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager.us-east-1.api.aws", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager.us-east-1.amazonaws.com", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } @@ -688,7 +688,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } @@ -788,7 +788,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager-fips.us-gov-east-1.api.aws", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager-fips.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } @@ -808,7 +808,7 @@ class EndpointResolverTest: XCTestCase { [:] let headers = Headers() - let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager.us-gov-east-1.api.aws", headers: headers, properties: properties) + let expected = try ClientRuntime.Endpoint(urlString: "https://secretsmanager.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) XCTAssertEqual(expected, actual) } diff --git a/Tests/Services/AWSSupplyChainTests/EndpointResolverTest.swift b/Tests/Services/AWSSupplyChainTests/EndpointResolverTest.swift new file mode 100644 index 00000000000..5af4bd1b941 --- /dev/null +++ b/Tests/Services/AWSSupplyChainTests/EndpointResolverTest.swift @@ -0,0 +1,509 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import AWSClientRuntime +@testable import AWSSupplyChain +import AwsCommonRuntimeKit +import ClientRuntime +import SmithyTestUtil +import XCTest + +class EndpointResolverTest: XCTestCase { + + override class func setUp() { + AwsCommonRuntimeKit.CommonRuntimeKit.initialize() + } + + /// For region us-east-1 with FIPS enabled and DualStack enabled + func testResolve1() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.us-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-east-1 with FIPS enabled and DualStack disabled + func testResolve2() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.us-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-east-1 with FIPS disabled and DualStack enabled + func testResolve3() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.us-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-east-1 with FIPS disabled and DualStack disabled + func testResolve4() throws { + let endpointParams = EndpointParams( + region: "us-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.us-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS enabled and DualStack enabled + func testResolve5() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS enabled and DualStack disabled + func testResolve6() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS disabled and DualStack enabled + func testResolve7() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region cn-north-1 with FIPS disabled and DualStack disabled + func testResolve8() throws { + let endpointParams = EndpointParams( + region: "cn-north-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS enabled and DualStack enabled + func testResolve9() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.us-gov-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS enabled and DualStack disabled + func testResolve10() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS disabled and DualStack enabled + func testResolve11() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.us-gov-east-1.api.aws", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-gov-east-1 with FIPS disabled and DualStack disabled + func testResolve12() throws { + let endpointParams = EndpointParams( + region: "us-gov-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-iso-east-1 with FIPS enabled and DualStack enabled + func testResolve13() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) + default: + XCTFail() + } + } + } + + /// For region us-iso-east-1 with FIPS enabled and DualStack disabled + func testResolve14() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-iso-east-1 with FIPS disabled and DualStack enabled + func testResolve15() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) + default: + XCTFail() + } + } + } + + /// For region us-iso-east-1 with FIPS disabled and DualStack disabled + func testResolve16() throws { + let endpointParams = EndpointParams( + region: "us-iso-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-isob-east-1 with FIPS enabled and DualStack enabled + func testResolve17() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: true, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) + default: + XCTFail() + } + } + } + + /// For region us-isob-east-1 with FIPS enabled and DualStack disabled + func testResolve18() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn-fips.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For region us-isob-east-1 with FIPS disabled and DualStack enabled + func testResolve19() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) + default: + XCTFail() + } + } + } + + /// For region us-isob-east-1 with FIPS disabled and DualStack disabled + func testResolve20() throws { + let endpointParams = EndpointParams( + region: "us-isob-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://scn.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with region set and fips disabled and dualstack disabled + func testResolve21() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + region: "us-east-1", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with region not set and fips disabled and dualstack disabled + func testResolve22() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + useDualStack: false, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + let actual = try resolver.resolve(params: endpointParams) + + let properties: [String: AnyHashable] = + [:] + + let headers = Headers() + let expected = try ClientRuntime.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) + + XCTAssertEqual(expected, actual) + } + + /// For custom endpoint with fips enabled and dualstack disabled + func testResolve23() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + region: "us-east-1", + useDualStack: false, + useFIPS: true + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("Invalid Configuration: FIPS and custom endpoint are not supported", message) + default: + XCTFail() + } + } + } + + /// For custom endpoint with fips disabled and dualstack enabled + func testResolve24() throws { + let endpointParams = EndpointParams( + endpoint: "https://example.com", + region: "us-east-1", + useDualStack: true, + useFIPS: false + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("Invalid Configuration: Dualstack and custom endpoint are not supported", message) + default: + XCTFail() + } + } + } + + /// Missing region + func testResolve25() throws { + let endpointParams = EndpointParams( + ) + let resolver = try DefaultEndpointResolver() + + XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in + switch error { + case EndpointError.unresolved(let message): + XCTAssertEqual("Invalid Configuration: Missing Region", message) + default: + XCTFail() + } + } + } + +} diff --git a/packageDependencies.plist b/packageDependencies.plist index b67f81567a9..5dddfa9c485 100644 --- a/packageDependencies.plist +++ b/packageDependencies.plist @@ -9,6 +9,6 @@ clientRuntimeBranch main clientRuntimeVersion - 0.38.0 + 0.39.0