diff --git a/Package.swift b/Package.swift index aea739ed885..f8ecd6d34d0 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ import PackageDescription // MARK: - Dynamic Content -let clientRuntimeVersion: Version = "0.82.0" +let clientRuntimeVersion: Version = "0.83.0" let crtVersion: Version = "0.36.0" let excludeRuntimeUnitTests = false diff --git a/Package.version b/Package.version index 321816a02d1..855f7029535 100644 --- a/Package.version +++ b/Package.version @@ -1 +1 @@ -1.0.24 \ No newline at end of file +1.0.25 \ No newline at end of file diff --git a/Package.version.next b/Package.version.next index 855f7029535..7717884db13 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.0.25 \ No newline at end of file +1.0.26 \ No newline at end of file diff --git a/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/Models.swift b/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/Models.swift index 0488f1f276e..2103e989777 100644 --- a/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/Models.swift +++ b/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/Models.swift @@ -3504,6 +3504,9 @@ extension BatchDeleteUniqueIdInput { items.add(SmithyHTTPAPI.Header(name: "inputSource", value: Swift.String(inputSource))) } if let uniqueIds = value.uniqueIds { + if uniqueIds.isEmpty { + items.add(name: "uniqueIds", value: "") + } uniqueIds.forEach { headerValue in items.add(SmithyHTTPAPI.Header(name: "uniqueIds", value: ClientRuntime.quoteHeaderValue(Swift.String(headerValue)))) } diff --git a/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift b/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift index c29a28bf915..93a4372bab0 100644 --- a/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift +++ b/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift @@ -3036,7 +3036,7 @@ extension ImagebuilderClient { /// Performs the `ListComponentBuildVersions` operation on the `imagebuilder` service. /// - /// Returns the list of component build versions for the specified semantic version. The semantic version has four nodes: ../. You can assign values for the first three, and can filter on all of them. Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. + /// Returns the list of component build versions for the specified component version Amazon Resource Name (ARN). /// /// - Parameter ListComponentBuildVersionsInput : [no documentation found] /// diff --git a/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/Models.swift b/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/Models.swift index 213275c2774..8511c98d034 100644 --- a/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/Models.swift +++ b/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/Models.swift @@ -616,12 +616,14 @@ extension ImagebuilderClientTypes { public enum Platform: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { case linux + case macos case windows case sdkUnknown(Swift.String) public static var allCases: [Platform] { return [ .linux, + .macos, .windows ] } @@ -634,6 +636,7 @@ extension ImagebuilderClientTypes { public var rawValue: Swift.String { switch self { case .linux: return "Linux" + case .macos: return "macOS" case .windows: return "Windows" case let .sdkUnknown(s): return s } @@ -1568,7 +1571,7 @@ public struct CreateContainerRecipeInput: Swift.Sendable { public var imageOsVersionOverride: Swift.String? /// A group of options that can be used to configure an instance for building and testing container images. public var instanceConfiguration: ImagebuilderClientTypes.InstanceConfiguration? - /// Identifies which KMS key is used to encrypt the container image. + /// Identifies which KMS key is used to encrypt the Dockerfile template. public var kmsKeyId: Swift.String? /// The name of the container recipe. /// This member is required. @@ -1910,7 +1913,7 @@ extension ImagebuilderClientTypes { /// Settings that Image Builder uses to configure the ECR repository and the output container images that Amazon Inspector scans. public struct EcrConfiguration: Swift.Sendable { - /// Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images. + /// Tags for Image Builder to apply to the output container image that Amazon Inspector scans. Tags can help you identify and manage your scanned images. public var containerTags: [Swift.String]? /// The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images. public var repositoryName: Swift.String? @@ -2429,6 +2432,66 @@ extension ImagebuilderClientTypes { } } +extension ImagebuilderClientTypes { + + public enum TenancyType: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case dedicated + case `default` + case host + case sdkUnknown(Swift.String) + + public static var allCases: [TenancyType] { + return [ + .dedicated, + .default, + .host + ] + } + + 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 .dedicated: return "dedicated" + case .default: return "default" + case .host: return "host" + case let .sdkUnknown(s): return s + } + } + } +} + +extension ImagebuilderClientTypes { + + /// By default, EC2 instances run on shared tenancy hardware. This means that multiple Amazon Web Services accounts might share the same physical hardware. When you use dedicated hardware, the physical server that hosts your instances is dedicated to your Amazon Web Services account. Instance placement settings contain the details for the physical hardware where instances that Image Builder launches during image creation will run. + public struct Placement: Swift.Sendable { + /// The Availability Zone where your build and test instances will launch. + public var availabilityZone: Swift.String? + /// The ID of the Dedicated Host on which build and test instances run. This only applies if tenancy is host. If you specify the host ID, you must not specify the resource group ARN. If you specify both, Image Builder returns an error. + public var hostId: Swift.String? + /// The Amazon Resource Name (ARN) of the host resource group in which to launch build and test instances. This only applies if tenancy is host. If you specify the resource group ARN, you must not specify the host ID. If you specify both, Image Builder returns an error. + public var hostResourceGroupArn: Swift.String? + /// The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware. An instance with a tenancy of host runs on a Dedicated Host. If tenancy is set to host, then you can optionally specify one target for placement – either host ID or host resource group ARN. If automatic placement is enabled for your host, and you don't specify any placement target, Amazon EC2 will try to find an available host for your build and test instances. + public var tenancy: ImagebuilderClientTypes.TenancyType? + + public init( + availabilityZone: Swift.String? = nil, + hostId: Swift.String? = nil, + hostResourceGroupArn: Swift.String? = nil, + tenancy: ImagebuilderClientTypes.TenancyType? = nil + ) + { + self.availabilityZone = availabilityZone + self.hostId = hostId + self.hostResourceGroupArn = hostResourceGroupArn + self.tenancy = tenancy + } + } +} + public struct CreateInfrastructureConfigurationInput: Swift.Sendable { /// Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) in the Amazon EC2 API Reference. /// This member is required. @@ -2449,7 +2512,9 @@ public struct CreateInfrastructureConfigurationInput: Swift.Sendable { /// The name of the infrastructure configuration. /// This member is required. public var name: Swift.String? - /// The tags attached to the resource created by Image Builder. + /// The instance placement settings that define where the instances that are launched from your image will run. + public var placement: ImagebuilderClientTypes.Placement? + /// The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs. public var resourceTags: [Swift.String: Swift.String]? /// The security group IDs to associate with the instance used to customize your Amazon EC2 AMI. public var securityGroupIds: [Swift.String]? @@ -2457,7 +2522,7 @@ public struct CreateInfrastructureConfigurationInput: Swift.Sendable { public var snsTopicArn: Swift.String? /// The subnet ID in which to place the instance used to customize your Amazon EC2 AMI. public var subnetId: Swift.String? - /// The tags of the infrastructure configuration. + /// The metadata tags to assign to the infrastructure configuration resource that Image Builder creates as output. Tags are formatted as key value pairs. public var tags: [Swift.String: Swift.String]? /// The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails. public var terminateInstanceOnFailure: Swift.Bool? @@ -2471,6 +2536,7 @@ public struct CreateInfrastructureConfigurationInput: Swift.Sendable { keyPair: Swift.String? = nil, logging: ImagebuilderClientTypes.Logging? = nil, name: Swift.String? = nil, + placement: ImagebuilderClientTypes.Placement? = nil, resourceTags: [Swift.String: Swift.String]? = nil, securityGroupIds: [Swift.String]? = nil, snsTopicArn: Swift.String? = nil, @@ -2487,6 +2553,7 @@ public struct CreateInfrastructureConfigurationInput: Swift.Sendable { self.keyPair = keyPair self.logging = logging self.name = name + self.placement = placement self.resourceTags = resourceTags self.securityGroupIds = securityGroupIds self.snsTopicArn = snsTopicArn @@ -3857,6 +3924,8 @@ extension ImagebuilderClientTypes { public var logging: ImagebuilderClientTypes.Logging? /// The name of the infrastructure configuration. public var name: Swift.String? + /// The instance placement settings that define where the instances that are launched from your image will run. + public var placement: ImagebuilderClientTypes.Placement? /// The tags attached to the resource created by Image Builder. public var resourceTags: [Swift.String: Swift.String]? /// The security group IDs of the infrastructure configuration. @@ -3881,6 +3950,7 @@ extension ImagebuilderClientTypes { keyPair: Swift.String? = nil, logging: ImagebuilderClientTypes.Logging? = nil, name: Swift.String? = nil, + placement: ImagebuilderClientTypes.Placement? = nil, resourceTags: [Swift.String: Swift.String]? = nil, securityGroupIds: [Swift.String]? = nil, snsTopicArn: Swift.String? = nil, @@ -3899,6 +3969,7 @@ extension ImagebuilderClientTypes { self.keyPair = keyPair self.logging = logging self.name = name + self.placement = placement self.resourceTags = resourceTags self.securityGroupIds = securityGroupIds self.snsTopicArn = snsTopicArn @@ -6436,6 +6507,8 @@ extension ImagebuilderClientTypes { public var instanceTypes: [Swift.String]? /// The name of the infrastructure configuration. public var name: Swift.String? + /// The instance placement settings that define where the instances that are launched from your image will run. + public var placement: ImagebuilderClientTypes.Placement? /// The tags attached to the image created by Image Builder. public var resourceTags: [Swift.String: Swift.String]? /// The tags of the infrastructure configuration. @@ -6449,6 +6522,7 @@ extension ImagebuilderClientTypes { instanceProfileName: Swift.String? = nil, instanceTypes: [Swift.String]? = nil, name: Swift.String? = nil, + placement: ImagebuilderClientTypes.Placement? = nil, resourceTags: [Swift.String: Swift.String]? = nil, tags: [Swift.String: Swift.String]? = nil ) @@ -6460,6 +6534,7 @@ extension ImagebuilderClientTypes { self.instanceProfileName = instanceProfileName self.instanceTypes = instanceTypes self.name = name + self.placement = placement self.resourceTags = resourceTags self.tags = tags } @@ -7989,6 +8064,8 @@ public struct UpdateInfrastructureConfigurationInput: Swift.Sendable { public var keyPair: Swift.String? /// The logging configuration of the infrastructure configuration. public var logging: ImagebuilderClientTypes.Logging? + /// The instance placement settings that define where the instances that are launched from your image will run. + public var placement: ImagebuilderClientTypes.Placement? /// The tags attached to the resource created by Image Builder. public var resourceTags: [Swift.String: Swift.String]? /// The security group IDs to associate with the instance used to customize your Amazon EC2 AMI. @@ -8009,6 +8086,7 @@ public struct UpdateInfrastructureConfigurationInput: Swift.Sendable { instanceTypes: [Swift.String]? = nil, keyPair: Swift.String? = nil, logging: ImagebuilderClientTypes.Logging? = nil, + placement: ImagebuilderClientTypes.Placement? = nil, resourceTags: [Swift.String: Swift.String]? = nil, securityGroupIds: [Swift.String]? = nil, snsTopicArn: Swift.String? = nil, @@ -8024,6 +8102,7 @@ public struct UpdateInfrastructureConfigurationInput: Swift.Sendable { self.instanceTypes = instanceTypes self.keyPair = keyPair self.logging = logging + self.placement = placement self.resourceTags = resourceTags self.securityGroupIds = securityGroupIds self.snsTopicArn = snsTopicArn @@ -9136,6 +9215,7 @@ extension CreateInfrastructureConfigurationInput { try writer["keyPair"].write(value.keyPair) try writer["logging"].write(value.logging, with: ImagebuilderClientTypes.Logging.write(value:to:)) try writer["name"].write(value.name) + try writer["placement"].write(value.placement, with: ImagebuilderClientTypes.Placement.write(value:to:)) try writer["resourceTags"].writeMap(value.resourceTags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) try writer["securityGroupIds"].writeList(value.securityGroupIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["snsTopicArn"].write(value.snsTopicArn) @@ -9555,6 +9635,7 @@ extension UpdateInfrastructureConfigurationInput { try writer["instanceTypes"].writeList(value.instanceTypes, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["keyPair"].write(value.keyPair) try writer["logging"].write(value.logging, with: ImagebuilderClientTypes.Logging.write(value:to:)) + try writer["placement"].write(value.placement, with: ImagebuilderClientTypes.Placement.write(value:to:)) try writer["resourceTags"].writeMap(value.resourceTags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) try writer["securityGroupIds"].writeList(value.securityGroupIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["snsTopicArn"].write(value.snsTopicArn) @@ -12882,6 +12963,28 @@ extension ImagebuilderClientTypes.InfrastructureConfiguration { value.resourceTags = try reader["resourceTags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) value.instanceMetadataOptions = try reader["instanceMetadataOptions"].readIfPresent(with: ImagebuilderClientTypes.InstanceMetadataOptions.read(from:)) value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.placement = try reader["placement"].readIfPresent(with: ImagebuilderClientTypes.Placement.read(from:)) + return value + } +} + +extension ImagebuilderClientTypes.Placement { + + static func write(value: ImagebuilderClientTypes.Placement?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["availabilityZone"].write(value.availabilityZone) + try writer["hostId"].write(value.hostId) + try writer["hostResourceGroupArn"].write(value.hostResourceGroupArn) + try writer["tenancy"].write(value.tenancy) + } + + static func read(from reader: SmithyJSON.Reader) throws -> ImagebuilderClientTypes.Placement { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = ImagebuilderClientTypes.Placement() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + value.hostId = try reader["hostId"].readIfPresent() + value.hostResourceGroupArn = try reader["hostResourceGroupArn"].readIfPresent() return value } } @@ -13667,6 +13770,7 @@ extension ImagebuilderClientTypes.InfrastructureConfigurationSummary { value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) value.instanceTypes = try reader["instanceTypes"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) value.instanceProfileName = try reader["instanceProfileName"].readIfPresent() + value.placement = try reader["placement"].readIfPresent(with: ImagebuilderClientTypes.Placement.read(from:)) return value } } diff --git a/Sources/Services/AWSM2/Package.swift.txt b/Sources/Services/AWSM2/Package.swift.txt index d1039bab609..81b147219fe 100644 --- a/Sources/Services/AWSM2/Package.swift.txt +++ b/Sources/Services/AWSM2/Package.swift.txt @@ -61,15 +61,15 @@ let package = Package( package: "aws-sdk-swift.AWSSDKHTTPAuth" ), .product( - name: "SmithyRetries", + name: "SmithyJSON", package: "aws-sdk-swift.smithy-swift" ), .product( - name: "SmithyJSON", + name: "SmithyReadWrite", package: "aws-sdk-swift.smithy-swift" ), .product( - name: "SmithyReadWrite", + name: "SmithyRetries", package: "aws-sdk-swift.smithy-swift" ), .product( diff --git a/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift b/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift index b1a2cd6245b..4bdfd9d3e20 100644 --- a/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift +++ b/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift @@ -240,6 +240,9 @@ extension M2Client { } builder.interceptors.add(ClientRuntime.URLPathMiddleware(CancelBatchJobExecutionInput.urlPathProvider(_:))) builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: CancelBatchJobExecutionInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) builder.deserialize(ClientRuntime.DeserializeMiddleware(CancelBatchJobExecutionOutput.httpOutput(from:), CancelBatchJobExecutionOutputError.httpError(from:))) builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) @@ -1625,7 +1628,7 @@ extension M2Client { /// Performs the `ListBatchJobRestartPoints` operation on the `AwsSupernovaControlPlaneService` service. /// - /// Lists all the job steps for JCL files to restart a batch job. This is only applicable for Micro Focus engine with versions 8.0.6 and above. + /// Lists all the job steps for a JCL file to restart a batch job. This is only applicable for Micro Focus engine with versions 8.0.6 and above. /// /// - Parameter ListBatchJobRestartPointsInput : [no documentation found] /// @@ -1668,6 +1671,7 @@ extension M2Client { } builder.interceptors.add(ClientRuntime.URLPathMiddleware(ListBatchJobRestartPointsInput.urlPathProvider(_:))) builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.serialize(ClientRuntime.QueryItemMiddleware(ListBatchJobRestartPointsInput.queryItemProvider(_:))) builder.deserialize(ClientRuntime.DeserializeMiddleware(ListBatchJobRestartPointsOutput.httpOutput(from:), ListBatchJobRestartPointsOutputError.httpError(from:))) builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) diff --git a/Sources/Services/AWSM2/Sources/AWSM2/Models.swift b/Sources/Services/AWSM2/Sources/AWSM2/Models.swift index 37adcf55425..bd9abcf031d 100644 --- a/Sources/Services/AWSM2/Sources/AWSM2/Models.swift +++ b/Sources/Services/AWSM2/Sources/AWSM2/Models.swift @@ -321,16 +321,20 @@ public struct CancelBatchJobExecutionInput: Swift.Sendable { /// The unique identifier of the application. /// This member is required. public var applicationId: Swift.String? + /// The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation. + public var authSecretsManagerArn: Swift.String? /// The unique identifier of the batch job execution. /// This member is required. public var executionId: Swift.String? public init( applicationId: Swift.String? = nil, + authSecretsManagerArn: Swift.String? = nil, executionId: Swift.String? = nil ) { self.applicationId = applicationId + self.authSecretsManagerArn = authSecretsManagerArn self.executionId = executionId } } @@ -423,7 +427,7 @@ extension M2ClientTypes { } public struct CreateApplicationInput: Swift.Sendable { - /// Unique, case-sensitive identifier the service generates to ensure the idempotency of the request to create an application. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires. + /// A client token is a unique, case-sensitive string of up to 128 ASCII characters with ASCII values of 33-126 inclusive. It's generated by the client to ensure idempotent operations, allowing for safe retries without unintended side effects. public var clientToken: Swift.String? /// The application definition for this application. You can specify either inline JSON or an S3 bucket location. /// This member is required. @@ -1257,16 +1261,16 @@ extension M2ClientTypes { extension M2ClientTypes { - /// Provides restart step information for the most recent restart operation. + /// Provides step/procedure step information for a restart batch job operation. public struct JobStepRestartMarker: Swift.Sendable { - /// The procedure step name that a job was restarted from. + /// The procedure step name that a batch job was restarted from. public var fromProcStep: Swift.String? - /// The step name that a batch job restart was from. + /// The step name that a batch job was restarted from. /// This member is required. public var fromStep: Swift.String? /// The procedure step name that a batch job was restarted to. public var toProcStep: Swift.String? - /// The step name that a job was restarted to. + /// The step name that a batch job was restarted to. public var toStep: Swift.String? public init( @@ -1291,7 +1295,7 @@ extension M2ClientTypes { /// The executionId from the StartBatchJob response when the job ran for the first time. /// This member is required. public var executionId: Swift.String? - /// The restart step information for the most recent restart operation. + /// The step/procedure step information for a restart batch job operation. /// This member is required. public var jobStepRestartMarker: M2ClientTypes.JobStepRestartMarker? @@ -1371,7 +1375,7 @@ extension M2ClientTypes { case scriptbatchjobidentifier(M2ClientTypes.ScriptBatchJobIdentifier) /// Specifies an Amazon S3 location that identifies the batch jobs that you want to run. Use this identifier to run ad hoc batch jobs. case s3batchjobidentifier(M2ClientTypes.S3BatchJobIdentifier) - /// Specifies the required information for restart, including execution ID and jobsteprestartmarker. + /// Specifies the required information for restart, including executionId and JobStepRestartMarker. case restartbatchjobidentifier(M2ClientTypes.RestartBatchJobIdentifier) case sdkUnknown(Swift.String) } @@ -1477,7 +1481,7 @@ public struct GetBatchJobExecutionOutput: Swift.Sendable { public var jobId: Swift.String? /// The name of this batch job. public var jobName: Swift.String? - /// The restart steps information for the most recent restart operation. + /// The step/procedure step information for the restart batch job operation. public var jobStepRestartMarker: M2ClientTypes.JobStepRestartMarker? /// The type of job. public var jobType: M2ClientTypes.BatchJobType? @@ -2316,16 +2320,20 @@ public struct ListBatchJobRestartPointsInput: Swift.Sendable { /// The unique identifier of the application. /// This member is required. public var applicationId: Swift.String? - /// The unique identifier of each batch job execution. + /// The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for List Batch Job Restart Points operation. + public var authSecretsManagerArn: Swift.String? + /// The unique identifier of the batch job execution. /// This member is required. public var executionId: Swift.String? public init( applicationId: Swift.String? = nil, + authSecretsManagerArn: Swift.String? = nil, executionId: Swift.String? = nil ) { self.applicationId = applicationId + self.authSecretsManagerArn = authSecretsManagerArn self.executionId = executionId } } @@ -2636,6 +2644,8 @@ public struct StartBatchJobInput: Swift.Sendable { /// The unique identifier of the application associated with this batch job. /// This member is required. public var applicationId: Swift.String? + /// The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation. + public var authSecretsManagerArn: Swift.String? /// The unique identifier of the batch job. /// This member is required. public var batchJobIdentifier: M2ClientTypes.BatchJobIdentifier? @@ -2644,11 +2654,13 @@ public struct StartBatchJobInput: Swift.Sendable { public init( applicationId: Swift.String? = nil, + authSecretsManagerArn: Swift.String? = nil, batchJobIdentifier: M2ClientTypes.BatchJobIdentifier? = nil, jobParams: [Swift.String: Swift.String]? = nil ) { self.applicationId = applicationId + self.authSecretsManagerArn = authSecretsManagerArn self.batchJobIdentifier = batchJobIdentifier self.jobParams = jobParams } @@ -2959,6 +2971,7 @@ extension M2ClientTypes { case creating case deleting case failed + case unhealthy case updating case sdkUnknown(Swift.String) @@ -2968,6 +2981,7 @@ extension M2ClientTypes { .creating, .deleting, .failed, + .unhealthy, .updating ] } @@ -2983,6 +2997,7 @@ extension M2ClientTypes { case .creating: return "Creating" case .deleting: return "Deleting" case .failed: return "Failed" + case .unhealthy: return "UnHealthy" case .updating: return "Updating" case let .sdkUnknown(s): return s } @@ -3031,7 +3046,7 @@ public struct GetEnvironmentOutput: Swift.Sendable { /// The unique identifiers of the security groups assigned to this runtime environment. /// This member is required. public var securityGroupIds: [Swift.String]? - /// The status of the runtime environment. + /// The status of the runtime environment. If the Amazon Web Services Mainframe Modernization environment is missing a connection to the customer owned dependent resource, the status will be Unhealthy. /// This member is required. public var status: M2ClientTypes.EnvironmentLifecycle? /// The reason for the reported status. @@ -3706,6 +3721,18 @@ extension ListBatchJobRestartPointsInput { } } +extension ListBatchJobRestartPointsInput { + + static func queryItemProvider(_ value: ListBatchJobRestartPointsInput) throws -> [Smithy.URIQueryItem] { + var items = [Smithy.URIQueryItem]() + if let authSecretsManagerArn = value.authSecretsManagerArn { + let authSecretsManagerArnQueryItem = Smithy.URIQueryItem(name: "authSecretsManagerArn".urlPercentEncoding(), value: Swift.String(authSecretsManagerArn).urlPercentEncoding()) + items.append(authSecretsManagerArnQueryItem) + } + return items + } +} + extension ListDataSetImportHistoryInput { static func urlPathProvider(_ value: ListDataSetImportHistoryInput) -> Swift.String? { @@ -3948,6 +3975,14 @@ extension UpdateEnvironmentInput { } } +extension CancelBatchJobExecutionInput { + + static func write(value: CancelBatchJobExecutionInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["authSecretsManagerArn"].write(value.authSecretsManagerArn) + } +} + extension CreateApplicationInput { static func write(value: CreateApplicationInput?, to writer: SmithyJSON.Writer) throws { @@ -4007,6 +4042,7 @@ extension StartBatchJobInput { static func write(value: StartBatchJobInput?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["authSecretsManagerArn"].write(value.authSecretsManagerArn) try writer["batchJobIdentifier"].write(value.batchJobIdentifier, with: M2ClientTypes.BatchJobIdentifier.write(value:to:)) try writer["jobParams"].writeMap(value.jobParams, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) } diff --git a/Sources/Services/AWSRDS/Sources/AWSRDS/Models.swift b/Sources/Services/AWSRDS/Sources/AWSRDS/Models.swift index 366d4645beb..5c295adb54d 100644 --- a/Sources/Services/AWSRDS/Sources/AWSRDS/Models.swift +++ b/Sources/Services/AWSRDS/Sources/AWSRDS/Models.swift @@ -8764,7 +8764,7 @@ public struct CreateEventSubscriptionOutput: Swift.Sendable { } } -/// The GlobalClusterIdentifier already exists. Choose a new global database identifier (unique name) to create a new global database cluster. +/// The GlobalClusterIdentifier already exists. Specify a new global database identifier (unique name) to create a new global database cluster or to rename an existing one. public struct GlobalClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { public struct Properties { @@ -9009,6 +9009,8 @@ extension RDSClientTypes { public var databaseName: Swift.String? /// The deletion protection setting for the new global database cluster. public var deletionProtection: Swift.Bool? + /// The writer endpoint for the new global database cluster. This endpoint always points to the writer DB instance in the current primary cluster. + public var endpoint: Swift.String? /// The Aurora database engine used by the global database cluster. public var engine: Swift.String? /// The life cycle type for the global cluster. For more information, see CreateGlobalCluster. @@ -9035,6 +9037,7 @@ extension RDSClientTypes { public init( databaseName: Swift.String? = nil, deletionProtection: Swift.Bool? = nil, + endpoint: Swift.String? = nil, engine: Swift.String? = nil, engineLifecycleSupport: Swift.String? = nil, engineVersion: Swift.String? = nil, @@ -9050,6 +9053,7 @@ extension RDSClientTypes { { self.databaseName = databaseName self.deletionProtection = deletionProtection + self.endpoint = endpoint self.engine = engine self.engineLifecycleSupport = engineLifecycleSupport self.engineVersion = engineVersion @@ -29621,6 +29625,7 @@ enum ModifyGlobalClusterOutputError { let baseError = try AWSClientRuntime.AWSQueryError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) if let error = baseError.customError() { return error } switch baseError.code { + case "GlobalClusterAlreadyExistsFault": return try GlobalClusterAlreadyExistsFault.makeError(baseError: baseError) case "GlobalClusterNotFoundFault": return try GlobalClusterNotFoundFault.makeError(baseError: baseError) case "InvalidDBClusterStateFault": return try InvalidDBClusterStateFault.makeError(baseError: baseError) case "InvalidDBInstanceState": return try InvalidDBInstanceStateFault.makeError(baseError: baseError) @@ -33206,6 +33211,7 @@ extension RDSClientTypes.GlobalCluster { value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() value.deletionProtection = try reader["DeletionProtection"].readIfPresent() value.globalClusterMembers = try reader["GlobalClusterMembers"].readListIfPresent(memberReadingClosure: RDSClientTypes.GlobalClusterMember.read(from:), memberNodeInfo: "GlobalClusterMember", isFlattened: false) + value.endpoint = try reader["Endpoint"].readIfPresent() value.failoverState = try reader["FailoverState"].readIfPresent(with: RDSClientTypes.FailoverState.read(from:)) value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.read(from:), memberNodeInfo: "Tag", isFlattened: false) return value diff --git a/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift b/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift index 139b708f5b4..bac5c2c78c9 100644 --- a/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift +++ b/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift @@ -2380,7 +2380,7 @@ extension RDSClient { /// /// __Possible Exceptions:__ /// - `DBClusterNotFoundFault` : DBClusterIdentifier doesn't refer to an existing DB cluster. - /// - `GlobalClusterAlreadyExistsFault` : The GlobalClusterIdentifier already exists. Choose a new global database identifier (unique name) to create a new global database cluster. + /// - `GlobalClusterAlreadyExistsFault` : The GlobalClusterIdentifier already exists. Specify a new global database identifier (unique name) to create a new global database cluster or to rename an existing one. /// - `GlobalClusterQuotaExceededFault` : The number of global database clusters for this account is already at the maximum allowed. /// - `InvalidDBClusterStateFault` : The requested operation can't be performed while the cluster is in this state. public func createGlobalCluster(input: CreateGlobalClusterInput) async throws -> CreateGlobalClusterOutput { @@ -9146,6 +9146,7 @@ extension RDSClient { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `GlobalClusterAlreadyExistsFault` : The GlobalClusterIdentifier already exists. Specify a new global database identifier (unique name) to create a new global database cluster or to rename an existing one. /// - `GlobalClusterNotFoundFault` : The GlobalClusterIdentifier doesn't refer to an existing global database cluster. /// - `InvalidDBClusterStateFault` : The requested operation can't be performed while the cluster is in this state. /// - `InvalidDBInstanceStateFault` : The DB instance isn't in a valid state. diff --git a/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/Models.swift b/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/Models.swift index 8e6ac989b8e..f5d9def5196 100644 --- a/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/Models.swift +++ b/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/Models.swift @@ -18,6 +18,7 @@ import enum SmithyReadWrite.ReaderError @_spi(SmithyReadWrite) import enum SmithyReadWrite.ReadingClosures @_spi(SmithyReadWrite) import enum SmithyReadWrite.WritingClosures @_spi(SmithyTimestamps) import enum SmithyTimestamps.TimestampFormat +@_spi(SmithyReadWrite) import func SmithyReadWrite.listReadingClosure import protocol AWSClientRuntime.AWSServiceError import protocol ClientRuntime.HTTPError import protocol ClientRuntime.ModeledError @@ -26,6 +27,7 @@ import protocol ClientRuntime.ModeledError @_spi(SmithyReadWrite) import struct AWSClientRuntime.RestJSONError @_spi(UnknownAWSHTTPServiceError) import struct AWSClientRuntime.UnknownAWSHTTPServiceError import struct Smithy.URIQueryItem +@_spi(SmithyReadWrite) import struct SmithyReadWrite.ReadingClosureBox @_spi(SmithyTimestamps) import struct SmithyTimestamps.TimestampFormatter @@ -79,70 +81,6 @@ public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntim } } -extension RepostspaceClientTypes { - - public enum ConfigurationStatus: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { - case configured - case unconfigured - case sdkUnknown(Swift.String) - - public static var allCases: [ConfigurationStatus] { - return [ - .configured, - .unconfigured - ] - } - - 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 .configured: return "CONFIGURED" - case .unconfigured: return "UNCONFIGURED" - case let .sdkUnknown(s): return s - } - } - } -} - -/// Updating or deleting a resource can cause an inconsistent state. -public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - - public struct Properties { - /// This member is required. - public internal(set) var message: Swift.String? = nil - /// The ID of the resource. - /// This member is required. - public internal(set) var resourceId: Swift.String? = nil - /// The type of the resource. - /// This member is required. - public internal(set) var resourceType: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ConflictException" } - public static var fault: ClientRuntime.ErrorFault { .client } - public static var isRetryable: Swift.Bool { false } - public static var isThrottling: Swift.Bool { false } - public internal(set) var httpResponse = SmithyHTTPAPI.HTTPResponse() - public internal(set) var message: Swift.String? - public internal(set) var requestID: Swift.String? - - public init( - message: Swift.String? = nil, - resourceId: Swift.String? = nil, - resourceType: Swift.String? = nil - ) - { - self.properties.message = message - self.properties.resourceId = resourceId - self.properties.resourceType = resourceType - } -} - /// Unexpected error during processing of request. public struct InternalServerException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { @@ -207,51 +145,6 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -/// Request would cause a service quota to be exceeded. -public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - - public struct Properties { - /// This member is required. - public internal(set) var message: Swift.String? = nil - /// The code to identify the quota. - /// This member is required. - public internal(set) var quotaCode: Swift.String? = nil - /// The id of the resource. - /// This member is required. - public internal(set) var resourceId: Swift.String? = nil - /// The type of the resource. - /// This member is required. - public internal(set) var resourceType: Swift.String? = nil - /// The code to identify the service. - /// This member is required. - public internal(set) var serviceCode: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ServiceQuotaExceededException" } - public static var fault: ClientRuntime.ErrorFault { .client } - public static var isRetryable: Swift.Bool { false } - public static var isThrottling: Swift.Bool { false } - public internal(set) var httpResponse = SmithyHTTPAPI.HTTPResponse() - public internal(set) var message: Swift.String? - public internal(set) var requestID: Swift.String? - - public init( - message: Swift.String? = nil, - quotaCode: Swift.String? = nil, - resourceId: Swift.String? = nil, - resourceType: Swift.String? = nil, - serviceCode: Swift.String? = nil - ) - { - self.properties.message = message - self.properties.quotaCode = quotaCode - self.properties.resourceId = resourceId - self.properties.resourceType = resourceType - self.properties.serviceCode = serviceCode - } -} - /// Request was denied due to request throttling. public struct ThrottlingException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { @@ -380,6 +273,259 @@ public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime. } } +extension RepostspaceClientTypes { + + public enum Role: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case administrator + case expert + case moderator + case supportrequestor + case sdkUnknown(Swift.String) + + public static var allCases: [Role] { + return [ + .administrator, + .expert, + .moderator, + .supportrequestor + ] + } + + 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 .administrator: return "ADMINISTRATOR" + case .expert: return "EXPERT" + case .moderator: return "MODERATOR" + case .supportrequestor: return "SUPPORTREQUESTOR" + case let .sdkUnknown(s): return s + } + } + } +} + +public struct BatchAddRoleInput: Swift.Sendable { + /// The user or group accessor identifiers to add the role to. + /// This member is required. + public var accessorIds: [Swift.String]? + /// The role to add to the users or groups. + /// This member is required. + public var role: RepostspaceClientTypes.Role? + /// The unique ID of the private re:Post. + /// This member is required. + public var spaceId: Swift.String? + + public init( + accessorIds: [Swift.String]? = nil, + role: RepostspaceClientTypes.Role? = nil, + spaceId: Swift.String? = nil + ) + { + self.accessorIds = accessorIds + self.role = role + self.spaceId = spaceId + } +} + +extension RepostspaceClientTypes { + + /// An error that occurred during a batch operation. + public struct BatchError: Swift.Sendable { + /// The accessor identifier that's related to the error. + /// This member is required. + public var accessorId: Swift.String? + /// The error code. + /// This member is required. + public var error: Swift.Int? + /// Description of the error. + /// This member is required. + public var message: Swift.String? + + public init( + accessorId: Swift.String? = nil, + error: Swift.Int? = nil, + message: Swift.String? = nil + ) + { + self.accessorId = accessorId + self.error = error + self.message = message + } + } +} + +public struct BatchAddRoleOutput: Swift.Sendable { + /// An array of successfully updated accessor identifiers. + /// This member is required. + public var addedAccessorIds: [Swift.String]? + /// An array of errors that occurred when roles were added. + /// This member is required. + public var errors: [RepostspaceClientTypes.BatchError]? + + public init( + addedAccessorIds: [Swift.String]? = nil, + errors: [RepostspaceClientTypes.BatchError]? = nil + ) + { + self.addedAccessorIds = addedAccessorIds + self.errors = errors + } +} + +public struct BatchRemoveRoleInput: Swift.Sendable { + /// The user or group accessor identifiers to remove the role from. + /// This member is required. + public var accessorIds: [Swift.String]? + /// The role to remove from the users or groups. + /// This member is required. + public var role: RepostspaceClientTypes.Role? + /// The unique ID of the private re:Post. + /// This member is required. + public var spaceId: Swift.String? + + public init( + accessorIds: [Swift.String]? = nil, + role: RepostspaceClientTypes.Role? = nil, + spaceId: Swift.String? = nil + ) + { + self.accessorIds = accessorIds + self.role = role + self.spaceId = spaceId + } +} + +public struct BatchRemoveRoleOutput: Swift.Sendable { + /// An array of errors that occurred when roles were removed. + /// This member is required. + public var errors: [RepostspaceClientTypes.BatchError]? + /// An array of successfully updated accessor identifiers. + /// This member is required. + public var removedAccessorIds: [Swift.String]? + + public init( + errors: [RepostspaceClientTypes.BatchError]? = nil, + removedAccessorIds: [Swift.String]? = nil + ) + { + self.errors = errors + self.removedAccessorIds = removedAccessorIds + } +} + +extension RepostspaceClientTypes { + + public enum ConfigurationStatus: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case configured + case unconfigured + case sdkUnknown(Swift.String) + + public static var allCases: [ConfigurationStatus] { + return [ + .configured, + .unconfigured + ] + } + + 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 .configured: return "CONFIGURED" + case .unconfigured: return "UNCONFIGURED" + case let .sdkUnknown(s): return s + } + } + } +} + +/// Updating or deleting a resource can cause an inconsistent state. +public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// This member is required. + public internal(set) var message: Swift.String? = nil + /// The ID of the resource. + /// This member is required. + public internal(set) var resourceId: Swift.String? = nil + /// The type of the resource. + /// This member is required. + public internal(set) var resourceType: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ConflictException" } + public static var fault: ClientRuntime.ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = SmithyHTTPAPI.HTTPResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil, + resourceId: Swift.String? = nil, + resourceType: Swift.String? = nil + ) + { + self.properties.message = message + self.properties.resourceId = resourceId + self.properties.resourceType = resourceType + } +} + +/// Request would cause a service quota to be exceeded. +public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// This member is required. + public internal(set) var message: Swift.String? = nil + /// The code to identify the quota. + /// This member is required. + public internal(set) var quotaCode: Swift.String? = nil + /// The id of the resource. + /// This member is required. + public internal(set) var resourceId: Swift.String? = nil + /// The type of the resource. + /// This member is required. + public internal(set) var resourceType: Swift.String? = nil + /// The code to identify the service. + /// This member is required. + public internal(set) var serviceCode: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ServiceQuotaExceededException" } + public static var fault: ClientRuntime.ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = SmithyHTTPAPI.HTTPResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil, + quotaCode: Swift.String? = nil, + resourceId: Swift.String? = nil, + resourceType: Swift.String? = nil, + serviceCode: Swift.String? = nil + ) + { + self.properties.message = message + self.properties.quotaCode = quotaCode + self.properties.resourceId = resourceId + self.properties.resourceType = resourceType + self.properties.serviceCode = serviceCode + } +} + extension RepostspaceClientTypes { public enum TierLevel: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { @@ -564,6 +710,7 @@ public struct GetSpaceOutput: Swift.Sendable { /// The description of the private re:Post. public var description: Swift.String? /// The list of groups that are administrators of the private re:Post. + @available(*, deprecated, message: "This property has been depracted and will be replaced by the roles property.") public var groupAdmins: [Swift.String]? /// The name of the private re:Post. /// This member is required. @@ -571,6 +718,8 @@ public struct GetSpaceOutput: Swift.Sendable { /// The AWS generated subdomain of the private re:Post /// This member is required. public var randomDomain: Swift.String? + /// A map of accessor identifiers and their roles. + public var roles: [Swift.String: [RepostspaceClientTypes.Role]]? /// The unique ID of the private re:Post. /// This member is required. public var spaceId: Swift.String? @@ -584,6 +733,7 @@ public struct GetSpaceOutput: Swift.Sendable { /// This member is required. public var tier: RepostspaceClientTypes.TierLevel? /// The list of users that are administrators of the private re:Post. + @available(*, deprecated, message: "This property has been depracted and will be replaced by the roles property.") public var userAdmins: [Swift.String]? /// The number of users that have onboarded to the private re:Post. public var userCount: Swift.Int? @@ -608,6 +758,7 @@ public struct GetSpaceOutput: Swift.Sendable { groupAdmins: [Swift.String]? = nil, name: Swift.String? = nil, randomDomain: Swift.String? = nil, + roles: [Swift.String: [RepostspaceClientTypes.Role]]? = nil, spaceId: Swift.String? = nil, status: Swift.String? = nil, storageLimit: Swift.Int? = nil, @@ -630,6 +781,7 @@ public struct GetSpaceOutput: Swift.Sendable { self.groupAdmins = groupAdmins self.name = name self.randomDomain = randomDomain + self.roles = roles self.spaceId = spaceId self.status = status self.storageLimit = storageLimit @@ -644,7 +796,7 @@ public struct GetSpaceOutput: Swift.Sendable { extension GetSpaceOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { - "GetSpaceOutput(arn: \(Swift.String(describing: arn)), clientId: \(Swift.String(describing: clientId)), configurationStatus: \(Swift.String(describing: configurationStatus)), contentSize: \(Swift.String(describing: contentSize)), createDateTime: \(Swift.String(describing: createDateTime)), customerRoleArn: \(Swift.String(describing: customerRoleArn)), deleteDateTime: \(Swift.String(describing: deleteDateTime)), groupAdmins: \(Swift.String(describing: groupAdmins)), randomDomain: \(Swift.String(describing: randomDomain)), spaceId: \(Swift.String(describing: spaceId)), status: \(Swift.String(describing: status)), storageLimit: \(Swift.String(describing: storageLimit)), tier: \(Swift.String(describing: tier)), userAdmins: \(Swift.String(describing: userAdmins)), userCount: \(Swift.String(describing: userCount)), userKMSKey: \(Swift.String(describing: userKMSKey)), vanityDomain: \(Swift.String(describing: vanityDomain)), vanityDomainStatus: \(Swift.String(describing: vanityDomainStatus)), description: \"CONTENT_REDACTED\", name: \"CONTENT_REDACTED\")"} + "GetSpaceOutput(arn: \(Swift.String(describing: arn)), clientId: \(Swift.String(describing: clientId)), configurationStatus: \(Swift.String(describing: configurationStatus)), contentSize: \(Swift.String(describing: contentSize)), createDateTime: \(Swift.String(describing: createDateTime)), customerRoleArn: \(Swift.String(describing: customerRoleArn)), deleteDateTime: \(Swift.String(describing: deleteDateTime)), groupAdmins: \(Swift.String(describing: groupAdmins)), randomDomain: \(Swift.String(describing: randomDomain)), roles: \(Swift.String(describing: roles)), spaceId: \(Swift.String(describing: spaceId)), status: \(Swift.String(describing: status)), storageLimit: \(Swift.String(describing: storageLimit)), tier: \(Swift.String(describing: tier)), userAdmins: \(Swift.String(describing: userAdmins)), userCount: \(Swift.String(describing: userCount)), userKMSKey: \(Swift.String(describing: userKMSKey)), vanityDomain: \(Swift.String(describing: vanityDomain)), vanityDomainStatus: \(Swift.String(describing: vanityDomainStatus)), description: \"CONTENT_REDACTED\", name: \"CONTENT_REDACTED\")"} } public struct ListSpacesInput: Swift.Sendable { @@ -934,6 +1086,26 @@ extension UpdateSpaceInput: Swift.CustomDebugStringConvertible { "UpdateSpaceInput(roleArn: \(Swift.String(describing: roleArn)), spaceId: \(Swift.String(describing: spaceId)), tier: \(Swift.String(describing: tier)), description: \"CONTENT_REDACTED\")"} } +extension BatchAddRoleInput { + + static func urlPathProvider(_ value: BatchAddRoleInput) -> Swift.String? { + guard let spaceId = value.spaceId else { + return nil + } + return "/spaces/\(spaceId.urlPercentEncoding())/roles" + } +} + +extension BatchRemoveRoleInput { + + static func urlPathProvider(_ value: BatchRemoveRoleInput) -> Swift.String? { + guard let spaceId = value.spaceId else { + return nil + } + return "/spaces/\(spaceId.urlPercentEncoding())/roles" + } +} + extension CreateSpaceInput { static func urlPathProvider(_ value: CreateSpaceInput) -> Swift.String? { @@ -1076,6 +1248,24 @@ extension UpdateSpaceInput { } } +extension BatchAddRoleInput { + + static func write(value: BatchAddRoleInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["accessorIds"].writeList(value.accessorIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) + try writer["role"].write(value.role) + } +} + +extension BatchRemoveRoleInput { + + static func write(value: BatchRemoveRoleInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["accessorIds"].writeList(value.accessorIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) + try writer["role"].write(value.role) + } +} + extension CreateSpaceInput { static func write(value: CreateSpaceInput?, to writer: SmithyJSON.Writer) throws { @@ -1118,6 +1308,32 @@ extension UpdateSpaceInput { } } +extension BatchAddRoleOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> BatchAddRoleOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = BatchAddRoleOutput() + value.addedAccessorIds = try reader["addedAccessorIds"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + value.errors = try reader["errors"].readListIfPresent(memberReadingClosure: RepostspaceClientTypes.BatchError.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + return value + } +} + +extension BatchRemoveRoleOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> BatchRemoveRoleOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = BatchRemoveRoleOutput() + value.errors = try reader["errors"].readListIfPresent(memberReadingClosure: RepostspaceClientTypes.BatchError.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + value.removedAccessorIds = try reader["removedAccessorIds"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + return value + } +} + extension CreateSpaceOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> CreateSpaceOutput { @@ -1162,6 +1378,7 @@ extension GetSpaceOutput { value.groupAdmins = try reader["groupAdmins"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) value.name = try reader["name"].readIfPresent() ?? "" value.randomDomain = try reader["randomDomain"].readIfPresent() ?? "" + value.roles = try reader["roles"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.listReadingClosure(memberReadingClosure: SmithyReadWrite.ReadingClosureBox().read(from:), memberNodeInfo: "member", isFlattened: false), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) value.spaceId = try reader["spaceId"].readIfPresent() ?? "" value.status = try reader["status"].readIfPresent() ?? "" value.storageLimit = try reader["storageLimit"].readIfPresent() ?? 0 @@ -1235,6 +1452,42 @@ extension UpdateSpaceOutput { } } +enum BatchAddRoleOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + +enum BatchRemoveRoleOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum CreateSpaceOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -1435,38 +1688,6 @@ enum UpdateSpaceOutputError { } } -extension ConflictException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ConflictException { - let reader = baseError.errorBodyReader - var value = ConflictException() - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.properties.resourceId = try reader["resourceId"].readIfPresent() ?? "" - value.properties.resourceType = try reader["resourceType"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension ServiceQuotaExceededException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ServiceQuotaExceededException { - let reader = baseError.errorBodyReader - var value = ServiceQuotaExceededException() - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.properties.quotaCode = try reader["quotaCode"].readIfPresent() ?? "" - value.properties.resourceId = try reader["resourceId"].readIfPresent() ?? "" - value.properties.resourceType = try reader["resourceType"].readIfPresent() ?? "" - value.properties.serviceCode = try reader["serviceCode"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - extension ResourceNotFoundException { static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ResourceNotFoundException { @@ -1546,6 +1767,50 @@ extension AccessDeniedException { } } +extension ConflictException { + + static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ConflictException { + let reader = baseError.errorBodyReader + var value = ConflictException() + value.properties.message = try reader["message"].readIfPresent() ?? "" + value.properties.resourceId = try reader["resourceId"].readIfPresent() ?? "" + value.properties.resourceType = try reader["resourceType"].readIfPresent() ?? "" + value.httpResponse = baseError.httpResponse + value.requestID = baseError.requestID + value.message = baseError.message + return value + } +} + +extension ServiceQuotaExceededException { + + static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ServiceQuotaExceededException { + let reader = baseError.errorBodyReader + var value = ServiceQuotaExceededException() + value.properties.message = try reader["message"].readIfPresent() ?? "" + value.properties.quotaCode = try reader["quotaCode"].readIfPresent() ?? "" + value.properties.resourceId = try reader["resourceId"].readIfPresent() ?? "" + value.properties.resourceType = try reader["resourceType"].readIfPresent() ?? "" + value.properties.serviceCode = try reader["serviceCode"].readIfPresent() ?? "" + value.httpResponse = baseError.httpResponse + value.requestID = baseError.requestID + value.message = baseError.message + return value + } +} + +extension RepostspaceClientTypes.BatchError { + + static func read(from reader: SmithyJSON.Reader) throws -> RepostspaceClientTypes.BatchError { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = RepostspaceClientTypes.BatchError() + value.accessorId = try reader["accessorId"].readIfPresent() ?? "" + value.error = try reader["error"].readIfPresent() ?? 0 + value.message = try reader["message"].readIfPresent() ?? "" + return value + } +} + extension RepostspaceClientTypes.SpaceData { static func read(from reader: SmithyJSON.Reader) throws -> RepostspaceClientTypes.SpaceData { diff --git a/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift b/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift index fdce64a4c08..0d1f7a9deaf 100644 --- a/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift +++ b/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift @@ -194,6 +194,152 @@ extension RepostspaceClient { } extension RepostspaceClient { + /// Performs the `BatchAddRole` operation on the `RepostSpace` service. + /// + /// Add role to multiple users or groups in a private re:Post. + /// + /// - Parameter BatchAddRoleInput : [no documentation found] + /// + /// - Returns: `BatchAddRoleOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : User does not have sufficient access to perform this action. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input fails to satisfy the constraints specified by an AWS service. + public func batchAddRole(input: BatchAddRoleInput) async throws -> BatchAddRoleOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "batchAddRole") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "repostspace") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(BatchAddRoleInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: BatchAddRoleInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(BatchAddRoleOutput.httpOutput(from:), BatchAddRoleOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "Repostspace") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "BatchAddRole") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + + /// Performs the `BatchRemoveRole` operation on the `RepostSpace` service. + /// + /// Remove role from multiple users or groups in a private re:Post. + /// + /// - Parameter BatchRemoveRoleInput : [no documentation found] + /// + /// - Returns: `BatchRemoveRoleOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : User does not have sufficient access to perform this action. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input fails to satisfy the constraints specified by an AWS service. + public func batchRemoveRole(input: BatchRemoveRoleInput) async throws -> BatchRemoveRoleOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .patch) + .withServiceName(value: serviceName) + .withOperation(value: "batchRemoveRole") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "repostspace") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(BatchRemoveRoleInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: BatchRemoveRoleInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(BatchRemoveRoleOutput.httpOutput(from:), BatchRemoveRoleOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "Repostspace") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "BatchRemoveRole") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `CreateSpace` operation on the `RepostSpace` service. /// /// Creates an AWS re:Post Private private re:Post. diff --git a/Sources/Services/AWSS3/Sources/AWSS3/Models.swift b/Sources/Services/AWSS3/Sources/AWSS3/Models.swift index 436db22ca51..98c4e358cd8 100644 --- a/Sources/Services/AWSS3/Sources/AWSS3/Models.swift +++ b/Sources/Services/AWSS3/Sources/AWSS3/Models.swift @@ -14320,6 +14320,9 @@ extension GetObjectAttributesInput { items.add(SmithyHTTPAPI.Header(name: "x-amz-max-parts", value: Swift.String(maxParts))) } if let objectAttributes = value.objectAttributes { + if objectAttributes.isEmpty { + items.add(name: "x-amz-object-attributes", value: "") + } objectAttributes.forEach { headerValue in items.add(SmithyHTTPAPI.Header(name: "x-amz-object-attributes", value: ClientRuntime.quoteHeaderValue(Swift.String(headerValue.rawValue)))) } @@ -14905,6 +14908,9 @@ extension ListObjectsInput { items.add(SmithyHTTPAPI.Header(name: "x-amz-expected-bucket-owner", value: Swift.String(expectedBucketOwner))) } if let optionalObjectAttributes = value.optionalObjectAttributes { + if optionalObjectAttributes.isEmpty { + items.add(name: "x-amz-optional-object-attributes", value: "") + } optionalObjectAttributes.forEach { headerValue in items.add(SmithyHTTPAPI.Header(name: "x-amz-optional-object-attributes", value: ClientRuntime.quoteHeaderValue(Swift.String(headerValue.rawValue)))) } @@ -14959,6 +14965,9 @@ extension ListObjectsV2Input { items.add(SmithyHTTPAPI.Header(name: "x-amz-expected-bucket-owner", value: Swift.String(expectedBucketOwner))) } if let optionalObjectAttributes = value.optionalObjectAttributes { + if optionalObjectAttributes.isEmpty { + items.add(name: "x-amz-optional-object-attributes", value: "") + } optionalObjectAttributes.forEach { headerValue in items.add(SmithyHTTPAPI.Header(name: "x-amz-optional-object-attributes", value: ClientRuntime.quoteHeaderValue(Swift.String(headerValue.rawValue)))) } @@ -15022,6 +15031,9 @@ extension ListObjectVersionsInput { items.add(SmithyHTTPAPI.Header(name: "x-amz-expected-bucket-owner", value: Swift.String(expectedBucketOwner))) } if let optionalObjectAttributes = value.optionalObjectAttributes { + if optionalObjectAttributes.isEmpty { + items.add(name: "x-amz-optional-object-attributes", value: "") + } optionalObjectAttributes.forEach { headerValue in items.add(SmithyHTTPAPI.Header(name: "x-amz-optional-object-attributes", value: ClientRuntime.quoteHeaderValue(Swift.String(headerValue.rawValue)))) } diff --git a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Models.swift b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Models.swift index b7b1d7ed70d..7a64106654a 100644 --- a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Models.swift +++ b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Models.swift @@ -15,6 +15,7 @@ import class SmithyHTTPAPI.HTTPResponse @_spi(SmithyReadWrite) import class SmithyJSON.Writer import enum ClientRuntime.ErrorFault import enum SmithyReadWrite.ReaderError +@_spi(SmithyReadWrite) import enum SmithyReadWrite.ReadingClosures @_spi(SmithyReadWrite) import enum SmithyReadWrite.WritingClosures @_spi(SmithyTimestamps) import enum SmithyTimestamps.TimestampFormat import protocol AWSClientRuntime.AWSServiceError @@ -991,6 +992,134 @@ extension TimestreamQueryClientTypes { } } +extension TimestreamQueryClientTypes { + + /// Provides insights into the table with the most sub-optimal spatial range scanned by your query. + public struct QuerySpatialCoverageMax: Swift.Sendable { + /// The partition key used for partitioning, which can be a default measure_name or a [customer defined partition key](https://docs.aws.amazon.com/timestream/latest/developerguide/customer-defined-partition-keys.html). + public var partitionKey: [Swift.String]? + /// The Amazon Resource Name (ARN) of the table with the most sub-optimal spatial pruning. + public var tableArn: Swift.String? + /// The maximum ratio of spatial coverage. + public var value: Swift.Double + + public init( + partitionKey: [Swift.String]? = nil, + tableArn: Swift.String? = nil, + value: Swift.Double = 0.0 + ) + { + self.partitionKey = partitionKey + self.tableArn = tableArn + self.value = value + } + } +} + +extension TimestreamQueryClientTypes { + + /// Provides insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning For example, you can do the following with the QuerySpatialCoverage information: + /// + /// * Add measure_name or use [customer-defined partition key](https://docs.aws.amazon.com/timestream/latest/developerguide/customer-defined-partition-keys.html) (CDPK) predicates. + /// + /// * If you've already done the preceding action, remove functions around them or clauses, such as LIKE. + public struct QuerySpatialCoverage: Swift.Sendable { + /// Provides insights into the spatial coverage of the executed query and the table with the most inefficient spatial pruning. + /// + /// * Value – The maximum ratio of spatial coverage. + /// + /// * TableArn – The Amazon Resource Name (ARN) of the table with sub-optimal spatial pruning. + /// + /// * PartitionKey – The partition key used for partitioning, which can be a default measure_name or a CDPK. + public var max: TimestreamQueryClientTypes.QuerySpatialCoverageMax? + + public init( + max: TimestreamQueryClientTypes.QuerySpatialCoverageMax? = nil + ) + { + self.max = max + } + } +} + +extension TimestreamQueryClientTypes { + + /// Provides insights into the table with the most sub-optimal temporal pruning scanned by your query. + public struct QueryTemporalRangeMax: Swift.Sendable { + /// The Amazon Resource Name (ARN) of the table which is queried with the largest time range. + public var tableArn: Swift.String? + /// The maximum duration in nanoseconds between the start and end of the query. + public var value: Swift.Int + + public init( + tableArn: Swift.String? = nil, + value: Swift.Int = 0 + ) + { + self.tableArn = tableArn + self.value = value + } + } +} + +extension TimestreamQueryClientTypes { + + /// Provides insights into the temporal range of the query, including the table with the largest (max) time range. + public struct QueryTemporalRange: Swift.Sendable { + /// Encapsulates the following properties that provide insights into the most sub-optimal performing table on the temporal axis: + /// + /// * Value – The maximum duration in nanoseconds between the start and end of the query. + /// + /// * TableArn – The Amazon Resource Name (ARN) of the table which is queried with the largest time range. + public var max: TimestreamQueryClientTypes.QueryTemporalRangeMax? + + public init( + max: TimestreamQueryClientTypes.QueryTemporalRangeMax? = nil + ) + { + self.max = max + } + } +} + +extension TimestreamQueryClientTypes { + + /// Provides various insights and metrics related to the ExecuteScheduledQueryRequest that was executed. + public struct ScheduledQueryInsightsResponse: Swift.Sendable { + /// Indicates the size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise. + public var outputBytes: Swift.Int? + /// Indicates the total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise. + public var outputRows: Swift.Int? + /// Provides insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning. + public var querySpatialCoverage: TimestreamQueryClientTypes.QuerySpatialCoverage? + /// Indicates the number of tables in the query. + public var queryTableCount: Swift.Int? + /// Provides insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: + /// + /// * Add missing time-predicates. + /// + /// * Remove functions around the time predicates. + /// + /// * Add time predicates to all the sub-queries. + public var queryTemporalRange: TimestreamQueryClientTypes.QueryTemporalRange? + + public init( + outputBytes: Swift.Int? = 0, + outputRows: Swift.Int? = 0, + querySpatialCoverage: TimestreamQueryClientTypes.QuerySpatialCoverage? = nil, + queryTableCount: Swift.Int? = 0, + queryTemporalRange: TimestreamQueryClientTypes.QueryTemporalRange? = nil + ) + { + self.outputBytes = outputBytes + self.outputRows = outputRows + self.querySpatialCoverage = querySpatialCoverage + self.queryTableCount = queryTableCount + self.queryTemporalRange = queryTemporalRange + } + } +} + extension TimestreamQueryClientTypes { public enum ScheduledQueryRunStatus: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { @@ -1038,6 +1167,8 @@ extension TimestreamQueryClientTypes { public var failureReason: Swift.String? /// InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value. public var invocationTime: Foundation.Date? + /// Provides various insights and metrics related to the run summary of the scheduled query. + public var queryInsightsResponse: TimestreamQueryClientTypes.ScheduledQueryInsightsResponse? /// The status of a scheduled query run. public var runStatus: TimestreamQueryClientTypes.ScheduledQueryRunStatus? /// The actual time when the query was run. @@ -1048,6 +1179,7 @@ extension TimestreamQueryClientTypes { executionStats: TimestreamQueryClientTypes.ExecutionStats? = nil, failureReason: Swift.String? = nil, invocationTime: Foundation.Date? = nil, + queryInsightsResponse: TimestreamQueryClientTypes.ScheduledQueryInsightsResponse? = nil, runStatus: TimestreamQueryClientTypes.ScheduledQueryRunStatus? = nil, triggerTime: Foundation.Date? = nil ) @@ -1056,6 +1188,7 @@ extension TimestreamQueryClientTypes { self.executionStats = executionStats self.failureReason = failureReason self.invocationTime = invocationTime + self.queryInsightsResponse = queryInsightsResponse self.runStatus = runStatus self.triggerTime = triggerTime } @@ -1187,12 +1320,64 @@ public struct DescribeScheduledQueryOutput: Swift.Sendable { } } +extension TimestreamQueryClientTypes { + + public enum ScheduledQueryInsightsMode: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case disabled + case enabledWithRateControl + case sdkUnknown(Swift.String) + + public static var allCases: [ScheduledQueryInsightsMode] { + return [ + .disabled, + .enabledWithRateControl + ] + } + + 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 .enabledWithRateControl: return "ENABLED_WITH_RATE_CONTROL" + case let .sdkUnknown(s): return s + } + } + } +} + +extension TimestreamQueryClientTypes { + + /// Encapsulates settings for enabling QueryInsights on an ExecuteScheduledQueryRequest. + public struct ScheduledQueryInsights: Swift.Sendable { + /// Provides the following modes to enable ScheduledQueryInsights: + /// + /// * ENABLED_WITH_RATE_CONTROL – Enables ScheduledQueryInsights for the queries being processed. This mode also includes a rate control mechanism, which limits the QueryInsights feature to 1 query per second (QPS). + /// + /// * DISABLED – Disables ScheduledQueryInsights. + /// This member is required. + public var mode: TimestreamQueryClientTypes.ScheduledQueryInsightsMode? + + public init( + mode: TimestreamQueryClientTypes.ScheduledQueryInsightsMode? = nil + ) + { + self.mode = mode + } + } +} + public struct ExecuteScheduledQueryInput: Swift.Sendable { /// Not used. public var clientToken: Swift.String? /// The timestamp in UTC. Query will be run as if it was invoked at this timestamp. /// This member is required. public var invocationTime: Foundation.Date? + /// Encapsulates settings for enabling QueryInsights. Enabling QueryInsights returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use QueryInsights to tune your query performance and cost. + public var queryInsights: TimestreamQueryClientTypes.ScheduledQueryInsights? /// ARN of the scheduled query. /// This member is required. public var scheduledQueryArn: Swift.String? @@ -1200,18 +1385,20 @@ public struct ExecuteScheduledQueryInput: Swift.Sendable { public init( clientToken: Swift.String? = nil, invocationTime: Foundation.Date? = nil, + queryInsights: TimestreamQueryClientTypes.ScheduledQueryInsights? = nil, scheduledQueryArn: Swift.String? = nil ) { self.clientToken = clientToken self.invocationTime = invocationTime + self.queryInsights = queryInsights self.scheduledQueryArn = scheduledQueryArn } } extension ExecuteScheduledQueryInput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { - "ExecuteScheduledQueryInput(invocationTime: \(Swift.String(describing: invocationTime)), scheduledQueryArn: \(Swift.String(describing: scheduledQueryArn)), clientToken: \"CONTENT_REDACTED\")"} + "ExecuteScheduledQueryInput(invocationTime: \(Swift.String(describing: invocationTime)), queryInsights: \(Swift.String(describing: queryInsights)), scheduledQueryArn: \(Swift.String(describing: scheduledQueryArn)), clientToken: \"CONTENT_REDACTED\")"} } public struct ListScheduledQueriesInput: Swift.Sendable { @@ -1418,6 +1605,65 @@ public struct QueryExecutionException: ClientRuntime.ModeledError, AWSClientRunt } } +extension TimestreamQueryClientTypes { + + public enum QueryInsightsMode: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case disabled + case enabledWithRateControl + case sdkUnknown(Swift.String) + + public static var allCases: [QueryInsightsMode] { + return [ + .disabled, + .enabledWithRateControl + ] + } + + 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 .enabledWithRateControl: return "ENABLED_WITH_RATE_CONTROL" + case let .sdkUnknown(s): return s + } + } + } +} + +extension TimestreamQueryClientTypes { + + /// QueryInsights is a performance tuning feature that helps you optimize your queries, reducing costs and improving performance. With QueryInsights, you can assess the pruning efficiency of your queries and identify areas for improvement to enhance query performance. With QueryInsights, you can also analyze the effectiveness of your queries in terms of temporal and spatial pruning, and identify opportunities to improve performance. Specifically, you can evaluate how well your queries use time-based and partition key-based indexing strategies to optimize data retrieval. To optimize query performance, it's essential that you fine-tune both the temporal and spatial parameters that govern query execution. The key metrics provided by QueryInsights are QuerySpatialCoverage and QueryTemporalRange. QuerySpatialCoverage indicates how much of the spatial axis the query scans, with lower values being more efficient. QueryTemporalRange shows the time range scanned, with narrower ranges being more performant. Benefits of QueryInsights The following are the key benefits of using QueryInsights: + /// + /// * Identifying inefficient queries – QueryInsights provides information on the time-based and attribute-based pruning of the tables accessed by the query. This information helps you identify the tables that are sub-optimally accessed. + /// + /// * Optimizing your data model and partitioning – You can use the QueryInsights information to access and fine-tune your data model and partitioning strategy. + /// + /// * Tuning queries – QueryInsights highlights opportunities to use indexes more effectively. + /// + /// + /// The maximum number of Query API requests you're allowed to make with QueryInsights enabled is 1 query per second (QPS). If you exceed this query rate, it might result in throttling. + public struct QueryInsights: Swift.Sendable { + /// Provides the following modes to enable QueryInsights: + /// + /// * ENABLED_WITH_RATE_CONTROL – Enables QueryInsights for the queries being processed. This mode also includes a rate control mechanism, which limits the QueryInsights feature to 1 query per second (QPS). + /// + /// * DISABLED – Disables QueryInsights. + /// This member is required. + public var mode: TimestreamQueryClientTypes.QueryInsightsMode? + + public init( + mode: TimestreamQueryClientTypes.QueryInsightsMode? = nil + ) + { + self.mode = mode + } + } +} + public struct QueryInput: Swift.Sendable { /// Unique, case-sensitive string of up to 64 ASCII characters specified when a Query request is made. Providing a ClientToken makes the call to Query idempotent. This means that running the same query repeatedly will produce the same result. In other words, making multiple identical Query requests has the same effect as making a single request. When using ClientToken in a query, note the following: /// @@ -1452,6 +1698,8 @@ public struct QueryInput: Swift.Sendable { /// /// * If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an Invalid pagination token error. public var nextToken: Swift.String? + /// Encapsulates settings for enabling QueryInsights. Enabling QueryInsights returns insights and metrics in addition to query results for the query that you executed. You can use QueryInsights to tune your query performance. + public var queryInsights: TimestreamQueryClientTypes.QueryInsights? /// The query to be run by Timestream. /// This member is required. public var queryString: Swift.String? @@ -1460,19 +1708,71 @@ public struct QueryInput: Swift.Sendable { clientToken: Swift.String? = nil, maxRows: Swift.Int? = nil, nextToken: Swift.String? = nil, + queryInsights: TimestreamQueryClientTypes.QueryInsights? = nil, queryString: Swift.String? = nil ) { self.clientToken = clientToken self.maxRows = maxRows self.nextToken = nextToken + self.queryInsights = queryInsights self.queryString = queryString } } extension QueryInput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { - "QueryInput(maxRows: \(Swift.String(describing: maxRows)), nextToken: \(Swift.String(describing: nextToken)), clientToken: \"CONTENT_REDACTED\", queryString: \"CONTENT_REDACTED\")"} + "QueryInput(maxRows: \(Swift.String(describing: maxRows)), nextToken: \(Swift.String(describing: nextToken)), queryInsights: \(Swift.String(describing: queryInsights)), clientToken: \"CONTENT_REDACTED\", queryString: \"CONTENT_REDACTED\")"} +} + +extension TimestreamQueryClientTypes { + + /// Provides various insights and metrics related to the query that you executed. + public struct QueryInsightsResponse: Swift.Sendable { + /// Indicates the size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise. + public var outputBytes: Swift.Int? + /// Indicates the total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise. + public var outputRows: Swift.Int? + /// Provides insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning. + public var querySpatialCoverage: TimestreamQueryClientTypes.QuerySpatialCoverage? + /// Indicates the number of tables in the query. + public var queryTableCount: Swift.Int? + /// Provides insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: + /// + /// * Add missing time-predicates. + /// + /// * Remove functions around the time predicates. + /// + /// * Add time predicates to all the sub-queries. + public var queryTemporalRange: TimestreamQueryClientTypes.QueryTemporalRange? + /// Indicates the partitions created by the Unload operation. + public var unloadPartitionCount: Swift.Int? + /// Indicates the size, in bytes, written by the Unload operation. + public var unloadWrittenBytes: Swift.Int? + /// Indicates the rows written by the Unload query. + public var unloadWrittenRows: Swift.Int? + + public init( + outputBytes: Swift.Int? = 0, + outputRows: Swift.Int? = 0, + querySpatialCoverage: TimestreamQueryClientTypes.QuerySpatialCoverage? = nil, + queryTableCount: Swift.Int? = 0, + queryTemporalRange: TimestreamQueryClientTypes.QueryTemporalRange? = nil, + unloadPartitionCount: Swift.Int? = 0, + unloadWrittenBytes: Swift.Int? = 0, + unloadWrittenRows: Swift.Int? = 0 + ) + { + self.outputBytes = outputBytes + self.outputRows = outputRows + self.querySpatialCoverage = querySpatialCoverage + self.queryTableCount = queryTableCount + self.queryTemporalRange = queryTemporalRange + self.unloadPartitionCount = unloadPartitionCount + self.unloadWrittenBytes = unloadWrittenBytes + self.unloadWrittenRows = unloadWrittenRows + } + } } extension TimestreamQueryClientTypes { @@ -1778,6 +2078,8 @@ public struct QueryOutput: Swift.Sendable { /// A unique ID for the given query. /// This member is required. public var queryId: Swift.String? + /// Encapsulates QueryInsights containing insights and metrics related to the query that you executed. + public var queryInsightsResponse: TimestreamQueryClientTypes.QueryInsightsResponse? /// Information about the status of the query, including progress and bytes scanned. public var queryStatus: TimestreamQueryClientTypes.QueryStatus? /// The result set rows returned by the query. @@ -1788,6 +2090,7 @@ public struct QueryOutput: Swift.Sendable { columnInfo: [TimestreamQueryClientTypes.ColumnInfo]? = nil, nextToken: Swift.String? = nil, queryId: Swift.String? = nil, + queryInsightsResponse: TimestreamQueryClientTypes.QueryInsightsResponse? = nil, queryStatus: TimestreamQueryClientTypes.QueryStatus? = nil, rows: [TimestreamQueryClientTypes.Row]? = nil ) @@ -1795,6 +2098,7 @@ public struct QueryOutput: Swift.Sendable { self.columnInfo = columnInfo self.nextToken = nextToken self.queryId = queryId + self.queryInsightsResponse = queryInsightsResponse self.queryStatus = queryStatus self.rows = rows } @@ -1996,6 +2300,7 @@ extension ExecuteScheduledQueryInput { guard let value else { return } try writer["ClientToken"].write(value.clientToken) try writer["InvocationTime"].writeTimestamp(value.invocationTime, format: SmithyTimestamps.TimestampFormat.epochSeconds) + try writer["QueryInsights"].write(value.queryInsights, with: TimestreamQueryClientTypes.ScheduledQueryInsights.write(value:to:)) try writer["ScheduledQueryArn"].write(value.scheduledQueryArn) } } @@ -2035,6 +2340,7 @@ extension QueryInput { try writer["ClientToken"].write(value.clientToken) try writer["MaxRows"].write(value.maxRows) try writer["NextToken"].write(value.nextToken) + try writer["QueryInsights"].write(value.queryInsights, with: TimestreamQueryClientTypes.QueryInsights.write(value:to:)) try writer["QueryString"].write(value.queryString) } } @@ -2200,6 +2506,7 @@ extension QueryOutput { value.columnInfo = try reader["ColumnInfo"].readListIfPresent(memberReadingClosure: TimestreamQueryClientTypes.ColumnInfo.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] value.nextToken = try reader["NextToken"].readIfPresent() value.queryId = try reader["QueryId"].readIfPresent() ?? "" + value.queryInsightsResponse = try reader["QueryInsightsResponse"].readIfPresent(with: TimestreamQueryClientTypes.QueryInsightsResponse.read(from:)) value.queryStatus = try reader["QueryStatus"].readIfPresent(with: TimestreamQueryClientTypes.QueryStatus.read(from:)) value.rows = try reader["Rows"].readListIfPresent(memberReadingClosure: TimestreamQueryClientTypes.Row.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] return value @@ -2675,6 +2982,7 @@ extension TimestreamQueryClientTypes.ScheduledQueryRunSummary { value.triggerTime = try reader["TriggerTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) value.runStatus = try reader["RunStatus"].readIfPresent() value.executionStats = try reader["ExecutionStats"].readIfPresent(with: TimestreamQueryClientTypes.ExecutionStats.read(from:)) + value.queryInsightsResponse = try reader["QueryInsightsResponse"].readIfPresent(with: TimestreamQueryClientTypes.ScheduledQueryInsightsResponse.read(from:)) value.errorReportLocation = try reader["ErrorReportLocation"].readIfPresent(with: TimestreamQueryClientTypes.ErrorReportLocation.read(from:)) value.failureReason = try reader["FailureReason"].readIfPresent() return value @@ -2702,6 +3010,63 @@ extension TimestreamQueryClientTypes.S3ReportLocation { } } +extension TimestreamQueryClientTypes.ScheduledQueryInsightsResponse { + + static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.ScheduledQueryInsightsResponse { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TimestreamQueryClientTypes.ScheduledQueryInsightsResponse() + value.querySpatialCoverage = try reader["QuerySpatialCoverage"].readIfPresent(with: TimestreamQueryClientTypes.QuerySpatialCoverage.read(from:)) + value.queryTemporalRange = try reader["QueryTemporalRange"].readIfPresent(with: TimestreamQueryClientTypes.QueryTemporalRange.read(from:)) + value.queryTableCount = try reader["QueryTableCount"].readIfPresent() + value.outputRows = try reader["OutputRows"].readIfPresent() + value.outputBytes = try reader["OutputBytes"].readIfPresent() + return value + } +} + +extension TimestreamQueryClientTypes.QueryTemporalRange { + + static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.QueryTemporalRange { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TimestreamQueryClientTypes.QueryTemporalRange() + value.max = try reader["Max"].readIfPresent(with: TimestreamQueryClientTypes.QueryTemporalRangeMax.read(from:)) + return value + } +} + +extension TimestreamQueryClientTypes.QueryTemporalRangeMax { + + static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.QueryTemporalRangeMax { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TimestreamQueryClientTypes.QueryTemporalRangeMax() + value.value = try reader["Value"].readIfPresent() ?? 0 + value.tableArn = try reader["TableArn"].readIfPresent() + return value + } +} + +extension TimestreamQueryClientTypes.QuerySpatialCoverage { + + static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.QuerySpatialCoverage { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TimestreamQueryClientTypes.QuerySpatialCoverage() + value.max = try reader["Max"].readIfPresent(with: TimestreamQueryClientTypes.QuerySpatialCoverageMax.read(from:)) + return value + } +} + +extension TimestreamQueryClientTypes.QuerySpatialCoverageMax { + + static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.QuerySpatialCoverageMax { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TimestreamQueryClientTypes.QuerySpatialCoverageMax() + value.value = try reader["Value"].readIfPresent() ?? 0 + value.tableArn = try reader["TableArn"].readIfPresent() + value.partitionKey = try reader["PartitionKey"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) + return value + } +} + extension TimestreamQueryClientTypes.ExecutionStats { static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.ExecutionStats { @@ -3066,4 +3431,37 @@ extension TimestreamQueryClientTypes.QueryStatus { } } +extension TimestreamQueryClientTypes.QueryInsightsResponse { + + static func read(from reader: SmithyJSON.Reader) throws -> TimestreamQueryClientTypes.QueryInsightsResponse { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TimestreamQueryClientTypes.QueryInsightsResponse() + value.querySpatialCoverage = try reader["QuerySpatialCoverage"].readIfPresent(with: TimestreamQueryClientTypes.QuerySpatialCoverage.read(from:)) + value.queryTemporalRange = try reader["QueryTemporalRange"].readIfPresent(with: TimestreamQueryClientTypes.QueryTemporalRange.read(from:)) + value.queryTableCount = try reader["QueryTableCount"].readIfPresent() + value.outputRows = try reader["OutputRows"].readIfPresent() + value.outputBytes = try reader["OutputBytes"].readIfPresent() + value.unloadPartitionCount = try reader["UnloadPartitionCount"].readIfPresent() + value.unloadWrittenRows = try reader["UnloadWrittenRows"].readIfPresent() + value.unloadWrittenBytes = try reader["UnloadWrittenBytes"].readIfPresent() + return value + } +} + +extension TimestreamQueryClientTypes.ScheduledQueryInsights { + + static func write(value: TimestreamQueryClientTypes.ScheduledQueryInsights?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["Mode"].write(value.mode) + } +} + +extension TimestreamQueryClientTypes.QueryInsights { + + static func write(value: TimestreamQueryClientTypes.QueryInsights?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["Mode"].write(value.mode) + } +} + public enum TimestreamQueryClientTypes {} diff --git a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Paginators.swift b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Paginators.swift index 6c39f36dbb5..6a0bf52fde2 100644 --- a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Paginators.swift +++ b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/Paginators.swift @@ -91,6 +91,7 @@ extension QueryInput: ClientRuntime.PaginateToken { clientToken: self.clientToken, maxRows: self.maxRows, nextToken: token, + queryInsights: self.queryInsights, queryString: self.queryString )} } diff --git a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift index d484e16409f..4b290bc5659 100644 --- a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift +++ b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift @@ -652,7 +652,7 @@ extension TimestreamQueryClient { /// Performs the `ExecuteScheduledQuery` operation on the `Timestream_20181101` service. /// - /// You can use this API to run a scheduled query manually. + /// You can use this API to run a scheduled query manually. If you enabled QueryInsights, this API also returns insights and metrics related to the query that you executed as part of an Amazon SNS notification. QueryInsights helps with performance tuning of your query. /// /// - Parameter ExecuteScheduledQueryInput : [no documentation found] /// @@ -949,7 +949,7 @@ extension TimestreamQueryClient { /// Performs the `Query` operation on the `Timestream_20181101` service. /// - /// Query is a synchronous operation that enables you to run a query against your Amazon Timestream data. Query will time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the [code sample](https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html) for details. Your query request will fail in the following cases: + /// Query is a synchronous operation that enables you to run a query against your Amazon Timestream data. If you enabled QueryInsights, this API also returns insights and metrics related to the query that you executed. QueryInsights helps with performance tuning of your query. The maximum number of Query API requests you're allowed to make with QueryInsights enabled is 1 query per second (QPS). If you exceed this query rate, it might result in throttling. Query will time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the [code sample](https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html) for details. Your query request will fail in the following cases: /// /// * If you submit a Query request with the same client token outside of the 5-minute idempotency window. /// diff --git a/packageDependencies.plist b/packageDependencies.plist index d4024de96e0..513ba1223db 100644 --- a/packageDependencies.plist +++ b/packageDependencies.plist @@ -9,6 +9,6 @@ clientRuntimeBranch main clientRuntimeVersion - 0.82.0 + 0.83.0