From f86adcc8f21201c32ff8d8f88fc1304809f9a6f2 Mon Sep 17 00:00:00 2001 From: AWS SDK Swift Automation Date: Thu, 19 Sep 2024 18:52:13 +0000 Subject: [PATCH] chore: Updates version to 1.0.2 --- Package.swift | 2 +- Package.version | 2 +- Package.version.next | 2 +- .../Sources/AWSCodeConnections/Models.swift | 46 +- .../AWSGlue/Sources/AWSGlue/GlueClient.swift | 78 +++ .../AWSGlue/Sources/AWSGlue/Models.swift | 111 +++++ .../Sources/AWSLambda/LambdaClient.swift | 20 +- .../AWSLambda/Sources/AWSLambda/Models.swift | 135 ++++-- .../Sources/AWSMediaConvert/Models.swift | 142 ++++++ .../Sources/AWSMediaLive/Models.swift | 272 ++++++++++- .../Sources/AWSQuickSight/Models.swift | 185 ++++++++ .../Sources/AWSQuickSight/Paginators.swift | 32 ++ .../AWSQuickSight/QuickSightClient.swift | 73 +++ .../Sources/AWSSageMaker/Models.swift | 24 + .../Sources/AWSWorkSpacesWeb/Models.swift | 449 +++++++++++++++++- .../Sources/AWSWorkSpacesWeb/Paginators.swift | 47 ++ .../WorkSpacesWebClient.swift | 211 ++++++++ packageDependencies.plist | 2 +- 18 files changed, 1765 insertions(+), 68 deletions(-) create mode 100644 Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Paginators.swift diff --git a/Package.swift b/Package.swift index 00fe75fe279..2202252f838 100644 --- a/Package.swift +++ b/Package.swift @@ -255,7 +255,7 @@ func addResolvedTargets() { // MARK: - Generated addDependencies( - clientRuntimeVersion: "0.72.0", + clientRuntimeVersion: "0.73.0", crtVersion: "0.36.0" ) diff --git a/Package.version b/Package.version index 7f207341d5d..e6d5cb833c6 100644 --- a/Package.version +++ b/Package.version @@ -1 +1 @@ -1.0.1 \ No newline at end of file +1.0.2 \ No newline at end of file diff --git a/Package.version.next b/Package.version.next index e6d5cb833c6..e4c0d46e55f 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.0.3 \ No newline at end of file diff --git a/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/Models.swift b/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/Models.swift index fddca496021..d966b0bd858 100644 --- a/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/Models.swift +++ b/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/Models.swift @@ -596,6 +596,35 @@ extension CodeConnectionsClientTypes { } } +extension CodeConnectionsClientTypes { + + public enum PullRequestComment: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case disabled + case enabled + case sdkUnknown(Swift.String) + + public static var allCases: [PullRequestComment] { + return [ + .disabled, + .enabled + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .disabled: return "DISABLED" + case .enabled: return "ENABLED" + case let .sdkUnknown(s): return s + } + } + } +} + extension CodeConnectionsClientTypes { public enum SyncConfigurationType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { @@ -660,6 +689,8 @@ public struct CreateSyncConfigurationInput { public var configFile: Swift.String? /// Whether to enable or disable publishing of deployment status to source providers. public var publishDeploymentStatus: CodeConnectionsClientTypes.PublishDeploymentStatus? + /// A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created. + public var pullRequestComment: CodeConnectionsClientTypes.PullRequestComment? /// The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository. /// This member is required. public var repositoryLinkId: Swift.String? @@ -679,6 +710,7 @@ public struct CreateSyncConfigurationInput { branch: Swift.String? = nil, configFile: Swift.String? = nil, publishDeploymentStatus: CodeConnectionsClientTypes.PublishDeploymentStatus? = nil, + pullRequestComment: CodeConnectionsClientTypes.PullRequestComment? = nil, repositoryLinkId: Swift.String? = nil, resourceName: Swift.String? = nil, roleArn: Swift.String? = nil, @@ -689,6 +721,7 @@ public struct CreateSyncConfigurationInput { self.branch = branch self.configFile = configFile self.publishDeploymentStatus = publishDeploymentStatus + self.pullRequestComment = pullRequestComment self.repositoryLinkId = repositoryLinkId self.resourceName = resourceName self.roleArn = roleArn @@ -713,6 +746,8 @@ extension CodeConnectionsClientTypes { public var providerType: CodeConnectionsClientTypes.ProviderType? /// Whether to enable or disable publishing of deployment status to source providers. public var publishDeploymentStatus: CodeConnectionsClientTypes.PublishDeploymentStatus? + /// A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created. + public var pullRequestComment: CodeConnectionsClientTypes.PullRequestComment? /// The ID of the repository link associated with a specific sync configuration. /// This member is required. public var repositoryLinkId: Swift.String? @@ -737,6 +772,7 @@ extension CodeConnectionsClientTypes { ownerId: Swift.String? = nil, providerType: CodeConnectionsClientTypes.ProviderType? = nil, publishDeploymentStatus: CodeConnectionsClientTypes.PublishDeploymentStatus? = nil, + pullRequestComment: CodeConnectionsClientTypes.PullRequestComment? = nil, repositoryLinkId: Swift.String? = nil, repositoryName: Swift.String? = nil, resourceName: Swift.String? = nil, @@ -750,6 +786,7 @@ extension CodeConnectionsClientTypes { self.ownerId = ownerId self.providerType = providerType self.publishDeploymentStatus = publishDeploymentStatus + self.pullRequestComment = pullRequestComment self.repositoryLinkId = repositoryLinkId self.repositoryName = repositoryName self.resourceName = resourceName @@ -947,7 +984,7 @@ extension CodeConnectionsClientTypes { extension CodeConnectionsClientTypes { /// A resource that is used to connect third-party source providers with services like CodePipeline. Note: A connection created through CloudFormation, the CLI, or the SDK is in `PENDING` status by default. You can make its status `AVAILABLE` by updating the connection in the console. public struct Connection { - /// The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between Amazon Web Services. The ARN is never reused if the connection is deleted. + /// The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between Amazon Web Servicesservices. The ARN is never reused if the connection is deleted. public var connectionArn: Swift.String? /// The name of the connection. Connection names must be unique in an Amazon Web Services account. public var connectionName: Swift.String? @@ -2143,6 +2180,8 @@ public struct UpdateSyncConfigurationInput { public var configFile: Swift.String? /// Whether to enable or disable publishing of deployment status to source providers. public var publishDeploymentStatus: CodeConnectionsClientTypes.PublishDeploymentStatus? + /// TA toggle that specifies whether to enable or disable pull request comments for the sync configuration to be updated. + public var pullRequestComment: CodeConnectionsClientTypes.PullRequestComment? /// The ID of the repository link for the sync configuration to be updated. public var repositoryLinkId: Swift.String? /// The name of the Amazon Web Services resource for the sync configuration to be updated. @@ -2160,6 +2199,7 @@ public struct UpdateSyncConfigurationInput { branch: Swift.String? = nil, configFile: Swift.String? = nil, publishDeploymentStatus: CodeConnectionsClientTypes.PublishDeploymentStatus? = nil, + pullRequestComment: CodeConnectionsClientTypes.PullRequestComment? = nil, repositoryLinkId: Swift.String? = nil, resourceName: Swift.String? = nil, roleArn: Swift.String? = nil, @@ -2170,6 +2210,7 @@ public struct UpdateSyncConfigurationInput { self.branch = branch self.configFile = configFile self.publishDeploymentStatus = publishDeploymentStatus + self.pullRequestComment = pullRequestComment self.repositoryLinkId = repositoryLinkId self.resourceName = resourceName self.roleArn = roleArn @@ -2422,6 +2463,7 @@ extension CreateSyncConfigurationInput { try writer["Branch"].write(value.branch) try writer["ConfigFile"].write(value.configFile) try writer["PublishDeploymentStatus"].write(value.publishDeploymentStatus) + try writer["PullRequestComment"].write(value.pullRequestComment) try writer["RepositoryLinkId"].write(value.repositoryLinkId) try writer["ResourceName"].write(value.resourceName) try writer["RoleArn"].write(value.roleArn) @@ -2637,6 +2679,7 @@ extension UpdateSyncConfigurationInput { try writer["Branch"].write(value.branch) try writer["ConfigFile"].write(value.configFile) try writer["PublishDeploymentStatus"].write(value.publishDeploymentStatus) + try writer["PullRequestComment"].write(value.pullRequestComment) try writer["RepositoryLinkId"].write(value.repositoryLinkId) try writer["ResourceName"].write(value.resourceName) try writer["RoleArn"].write(value.roleArn) @@ -3681,6 +3724,7 @@ extension CodeConnectionsClientTypes.SyncConfiguration { value.syncType = try reader["SyncType"].readIfPresent() ?? .sdkUnknown("") value.publishDeploymentStatus = try reader["PublishDeploymentStatus"].readIfPresent() value.triggerResourceUpdateOn = try reader["TriggerResourceUpdateOn"].readIfPresent() + value.pullRequestComment = try reader["PullRequestComment"].readIfPresent() return value } } diff --git a/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift b/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift index 20e6453cfdc..a6615a5905e 100644 --- a/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift +++ b/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift @@ -14906,6 +14906,84 @@ extension GlueClient { return try await op.execute(input: input) } + /// Performs the `TestConnection` operation on the `AWSGlue` service. + /// + /// Tests a connection to a service to validate the service credentials that you provide. You can either provide an existing connection name or a TestConnectionInput for testing a non-existing connection input. Providing both at the same time will cause an error. If the action is successful, the service sends back an HTTP 200 response. + /// + /// - Parameter TestConnectionInput : [no documentation found] + /// + /// - Returns: `TestConnectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Access to a resource was denied. + /// - `ConflictException` : The CreatePartitions API was called on a table that has indexes enabled. + /// - `EntityNotFoundException` : A specified entity does not exist + /// - `FederationSourceException` : A federation source failed. + /// - `GlueEncryptionException` : An encryption operation failed. + /// - `InternalServiceException` : An internal service error occurred. + /// - `InvalidInputException` : The input provided was not valid. + /// - `OperationTimeoutException` : The operation timed out. + /// - `ResourceNumberLimitExceededException` : A resource numerical limit was exceeded. + public func testConnection(input: TestConnectionInput) async throws -> TestConnectionOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "testConnection") + .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: "glue") + .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(TestConnectionInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(TestConnectionOutput.httpOutput(from:), TestConnectionOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.interceptors.add(AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AWSGlue.TestConnection")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: TestConnectionInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/x-amz-json-1.1")) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "Glue") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "TestConnection") + 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 `UntagResource` operation on the `AWSGlue` service. /// /// Removes tags from a resource. diff --git a/Sources/Services/AWSGlue/Sources/AWSGlue/Models.swift b/Sources/Services/AWSGlue/Sources/AWSGlue/Models.swift index c09879ac114..7914e229c48 100644 --- a/Sources/Services/AWSGlue/Sources/AWSGlue/Models.swift +++ b/Sources/Services/AWSGlue/Sources/AWSGlue/Models.swift @@ -23184,6 +23184,62 @@ public struct TagResourceOutput { public init() { } } +extension GlueClientTypes { + /// A structure that is used to specify testing a connection to a service. + public struct TestConnectionInput { + /// A structure containing the authentication configuration in the TestConnection request. Required for a connection to Salesforce using OAuth authentication. + public var authenticationConfiguration: GlueClientTypes.AuthenticationConfigurationInput? + /// The key-value pairs that define parameters for the connection. JDBC connections use the following connection properties: + /// + /// * Required: All of (HOST, PORT, JDBC_ENGINE) or JDBC_CONNECTION_URL. + /// + /// * Required: All of (USERNAME, PASSWORD) or SECRET_ID. + /// + /// * Optional: JDBC_ENFORCE_SSL, CUSTOM_JDBC_CERT, CUSTOM_JDBC_CERT_STRING, SKIP_CUSTOM_JDBC_CERT_VALIDATION. These parameters are used to configure SSL with JDBC. + /// + /// + /// SALESFORCE connections require the AuthenticationConfiguration member to be configured. + /// This member is required. + public var connectionProperties: [Swift.String: Swift.String]? + /// The type of connection to test. This operation is only available for the JDBC or SALESFORCE connection types. + /// This member is required. + public var connectionType: GlueClientTypes.ConnectionType? + + public init( + authenticationConfiguration: GlueClientTypes.AuthenticationConfigurationInput? = nil, + connectionProperties: [Swift.String: Swift.String]? = nil, + connectionType: GlueClientTypes.ConnectionType? = nil + ) + { + self.authenticationConfiguration = authenticationConfiguration + self.connectionProperties = connectionProperties + self.connectionType = connectionType + } + } + +} + +public struct TestConnectionInput { + /// Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing. + public var connectionName: Swift.String? + /// A structure that is used to specify testing a connection to a service. + public var testConnectionInput: GlueClientTypes.TestConnectionInput? + + public init( + connectionName: Swift.String? = nil, + testConnectionInput: GlueClientTypes.TestConnectionInput? = nil + ) + { + self.connectionName = connectionName + self.testConnectionInput = testConnectionInput + } +} + +public struct TestConnectionOutput { + + public init() { } +} + public struct UntagResourceInput { /// The Amazon Resource Name (ARN) of the resource from which to remove the tags. /// This member is required. @@ -26950,6 +27006,13 @@ extension TagResourceInput { } } +extension TestConnectionInput { + + static func urlPathProvider(_ value: TestConnectionInput) -> Swift.String? { + return "/" + } +} + extension UntagResourceInput { static func urlPathProvider(_ value: UntagResourceInput) -> Swift.String? { @@ -29189,6 +29252,15 @@ extension TagResourceInput { } } +extension TestConnectionInput { + + static func write(value: TestConnectionInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["ConnectionName"].write(value.connectionName) + try writer["TestConnectionInput"].write(value.testConnectionInput, with: GlueClientTypes.TestConnectionInput.write(value:to:)) + } +} + extension UntagResourceInput { static func write(value: UntagResourceInput?, to writer: SmithyJSON.Writer) throws { @@ -31937,6 +32009,13 @@ extension TagResourceOutput { } } +extension TestConnectionOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> TestConnectionOutput { + return TestConnectionOutput() + } +} + extension UntagResourceOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UntagResourceOutput { @@ -35667,6 +35746,28 @@ enum TagResourceOutputError { } } +enum TestConnectionOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.AWSJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "ConflictException": return try ConflictException.makeError(baseError: baseError) + case "EntityNotFoundException": return try EntityNotFoundException.makeError(baseError: baseError) + case "FederationSourceException": return try FederationSourceException.makeError(baseError: baseError) + case "GlueEncryptionException": return try GlueEncryptionException.makeError(baseError: baseError) + case "InternalServiceException": return try InternalServiceException.makeError(baseError: baseError) + case "InvalidInputException": return try InvalidInputException.makeError(baseError: baseError) + case "OperationTimeoutException": return try OperationTimeoutException.makeError(baseError: baseError) + case "ResourceNumberLimitExceededException": return try ResourceNumberLimitExceededException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum UntagResourceOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -42774,6 +42875,16 @@ extension GlueClientTypes.SortCriterion { } } +extension GlueClientTypes.TestConnectionInput { + + static func write(value: GlueClientTypes.TestConnectionInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["AuthenticationConfiguration"].write(value.authenticationConfiguration, with: GlueClientTypes.AuthenticationConfigurationInput.write(value:to:)) + try writer["ConnectionProperties"].writeMap(value.connectionProperties, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + try writer["ConnectionType"].write(value.connectionType) + } +} + extension GlueClientTypes.UpdateGrokClassifierRequest { static func write(value: GlueClientTypes.UpdateGrokClassifierRequest?, to writer: SmithyJSON.Writer) throws { diff --git a/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift b/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift index 7fef6640de0..4df5c8033bc 100644 --- a/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift +++ b/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift @@ -281,7 +281,7 @@ extension LambdaClient { /// Performs the `AddPermission` operation on the `AWSGirApiService` service. /// - /// Grants an Amazon Web Servicesservice, Amazon Web Services account, or Amazon Web Services organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST. To grant permission to another account, specify the account ID as the Principal. To grant permission to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For Amazon Web Servicesservices, the principal is a domain-style identifier that the service defines, such as s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Servicesservices, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function. This operation adds a statement to a resource-based permissions policy for the function. For more information about function policies, see [Using resource-based policies for Lambda](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html). + /// Grants a [principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST. To grant permission to another account, specify the account ID as the Principal. To grant permission to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For Amazon Web Servicesservices, the principal is a domain-style identifier that the service defines, such as s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Servicesservices, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function. This operation adds a statement to a resource-based permissions policy for the function. For more information about function policies, see [Using resource-based policies for Lambda](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html). /// /// - Parameter AddPermissionInput : [no documentation found] /// @@ -297,6 +297,7 @@ extension LambdaClient { /// * For AddPermission and RemovePermission API operations: Call GetPolicy to retrieve the latest RevisionId for your resource. /// /// * For all other API operations: Call GetFunction or GetAlias to retrieve the latest RevisionId for your resource. + /// - `PublicPolicyException` : Lambda prevented your policy from being created because it would grant public access to your function. If you intended to create a public policy, use the [PutPublicAccessBlockConfig] API action to configure your function's public-access settings to allow public policies. /// - `ResourceConflictException` : The resource already exists, or another operation is in progress. /// - `ResourceNotFoundException` : The resource specified in the request does not exist. /// - `ServiceException` : The Lambda service encountered an internal error. @@ -1472,7 +1473,7 @@ extension LambdaClient { /// Performs the `DeleteResourcePolicy` operation on the `AWSGirApiService` service. /// - /// Deletes a [resource-based policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) from a function. + /// The option to create and modify full JSON resource-based policies, and to use the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't be available in all Amazon Web Services Regions until September 30, 2024. Deletes a [resource-based policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) from a function. /// /// - Parameter DeleteResourcePolicyInput : [no documentation found] /// @@ -2657,7 +2658,7 @@ extension LambdaClient { /// Performs the `GetPublicAccessBlockConfig` operation on the `AWSGirApiService` service. /// - /// Retrieve the public-access settings for a function. + /// The option to configure public-access settings, and to use the PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be available in all Amazon Web Services Regions until September 30, 2024. Retrieve the public-access settings for a function. /// /// - Parameter GetPublicAccessBlockConfigInput : [no documentation found] /// @@ -2726,7 +2727,7 @@ extension LambdaClient { /// Performs the `GetResourcePolicy` operation on the `AWSGirApiService` service. /// - /// Retrieves the [resource-based policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) attached to a function. + /// The option to create and modify full JSON resource-based policies, and to use the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't be available in all Amazon Web Services Regions until September 30, 2024. Retrieves the [resource-based policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) attached to a function. /// /// - Parameter GetResourcePolicyInput : [no documentation found] /// @@ -3834,7 +3835,7 @@ extension LambdaClient { /// Performs the `ListTags` operation on the `AWSGirApiService` service. /// - /// Returns a function's [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html). You can also view tags with [GetFunction]. + /// Returns a function, event source mapping, or code signing configuration's [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html). You can also view funciton tags with [GetFunction]. /// /// - Parameter ListTagsInput : [no documentation found] /// @@ -4493,7 +4494,7 @@ extension LambdaClient { /// Performs the `PutPublicAccessBlockConfig` operation on the `AWSGirApiService` service. /// - /// Configure your function's public-access settings. To control public access to a Lambda function, you can choose whether to allow the creation of [resource-based policies](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) that allow public access to that function. You can also block public access to a function, even if it has an existing resource-based policy that allows it. + /// The option to configure public-access settings, and to use the PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be available in all Amazon Web Services Regions until September 30, 2024. Configure your function's public-access settings. To control public access to a Lambda function, you can choose whether to allow the creation of [resource-based policies](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) that allow public access to that function. You can also block public access to a function, even if it has an existing resource-based policy that allows it. /// /// - Parameter PutPublicAccessBlockConfigInput : [no documentation found] /// @@ -4566,7 +4567,7 @@ extension LambdaClient { /// Performs the `PutResourcePolicy` operation on the `AWSGirApiService` service. /// - /// Adds a [resource-based policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) to a function. You can use resource-based policies to grant access to other [Amazon Web Services accounts](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-cross-account.html), [organizations](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-organization.html), or [services](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-services.html). Resource-based policies apply to a single function, version, or alias. Adding a resource-based policy using this API action replaces any existing policy you've previously created. This means that if you've previously added resource-based permissions to a function using the [AddPermission] action, those permissions will be overwritten by your new policy. + /// The option to create and modify full JSON resource-based policies, and to use the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't be available in all Amazon Web Services Regions until September 30, 2024. Adds a [resource-based policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) to a function. You can use resource-based policies to grant access to other [Amazon Web Services accounts](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-cross-account.html), [organizations](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-organization.html), or [services](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-services.html). Resource-based policies apply to a single function, version, or alias. Adding a resource-based policy using this API action replaces any existing policy you've previously created. This means that if you've previously added resource-based permissions to a function using the [AddPermission] action, those permissions will be overwritten by your new policy. /// /// - Parameter PutResourcePolicyInput : [no documentation found] /// @@ -4810,6 +4811,7 @@ extension LambdaClient { /// * For AddPermission and RemovePermission API operations: Call GetPolicy to retrieve the latest RevisionId for your resource. /// /// * For all other API operations: Call GetFunction or GetAlias to retrieve the latest RevisionId for your resource. + /// - `PublicPolicyException` : Lambda prevented your policy from being created because it would grant public access to your function. If you intended to create a public policy, use the [PutPublicAccessBlockConfig] API action to configure your function's public-access settings to allow public policies. /// - `ResourceNotFoundException` : The resource specified in the request does not exist. /// - `ServiceException` : The Lambda service encountered an internal error. /// - `TooManyRequestsException` : The request throughput limit was exceeded. For more information, see [Lambda quotas](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests). @@ -4870,7 +4872,7 @@ extension LambdaClient { /// Performs the `TagResource` operation on the `AWSGirApiService` service. /// - /// Adds [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a function. + /// Adds [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a function, event source mapping, or code signing configuration. /// /// - Parameter TagResourceInput : [no documentation found] /// @@ -4943,7 +4945,7 @@ extension LambdaClient { /// Performs the `UntagResource` operation on the `AWSGirApiService` service. /// - /// Removes [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from a function. + /// Removes [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from a function, event source mapping, or code signing configuration. /// /// - Parameter UntagResourceInput : [no documentation found] /// diff --git a/Sources/Services/AWSLambda/Sources/AWSLambda/Models.swift b/Sources/Services/AWSLambda/Sources/AWSLambda/Models.swift index d1286dfcb42..1671fba9df7 100644 --- a/Sources/Services/AWSLambda/Sources/AWSLambda/Models.swift +++ b/Sources/Services/AWSLambda/Sources/AWSLambda/Models.swift @@ -460,6 +460,34 @@ public struct AddLayerVersionPermissionOutput { } } +/// Lambda prevented your policy from being created because it would grant public access to your function. If you intended to create a public policy, use the [PutPublicAccessBlockConfig] API action to configure your function's public-access settings to allow public policies. +public struct PublicPolicyException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + /// The exception type. + public internal(set) var type: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "PublicPolicyException" } + 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, + type: Swift.String? = nil + ) + { + self.properties.message = message + self.properties.type = type + } +} + extension LambdaClientTypes { public enum FunctionUrlAuthType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { @@ -509,7 +537,7 @@ public struct AddPermissionInput { public var functionName: Swift.String? /// The type of authentication that your function URL uses. Set to AWS_IAM if you want to restrict access to authenticated users only. Set to NONE if you want to bypass IAM authentication to create a public endpoint. For more information, see [Security and auth model for Lambda function URLs](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html). public var functionUrlAuthType: LambdaClientTypes.FunctionUrlAuthType? - /// The Amazon Web Servicesservice or Amazon Web Services account that invokes the function. If you specify a service, use SourceArn or SourceAccount to limit who can invoke the function through that service. + /// The Amazon Web Servicesservice, Amazon Web Services account, IAM user, or IAM role that invokes the function. If you specify a service, use SourceArn or SourceAccount to limit who can invoke the function through that service. /// This member is required. public var principal: Swift.String? /// The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization. @@ -847,16 +875,20 @@ public struct CreateCodeSigningConfigInput { public var codeSigningPolicies: LambdaClientTypes.CodeSigningPolicies? /// Descriptive name for this code signing configuration. public var description: Swift.String? + /// A list of tags to add to the code signing configuration. + public var tags: [Swift.String: Swift.String]? public init( allowedPublishers: LambdaClientTypes.AllowedPublishers? = nil, codeSigningPolicies: LambdaClientTypes.CodeSigningPolicies? = nil, - description: Swift.String? = nil + description: Swift.String? = nil, + tags: [Swift.String: Swift.String]? = nil ) { self.allowedPublishers = allowedPublishers self.codeSigningPolicies = codeSigningPolicies self.description = description + self.tags = tags } } @@ -1351,6 +1383,8 @@ public struct CreateEventSourceMappingInput { public var startingPosition: LambdaClientTypes.EventSourcePosition? /// With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. StartingPositionTimestamp cannot be in the future. public var startingPositionTimestamp: Foundation.Date? + /// A list of tags to apply to the event source mapping. + public var tags: [Swift.String: Swift.String]? /// The name of the Kafka topic. public var topics: [Swift.String]? /// (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window. @@ -1379,6 +1413,7 @@ public struct CreateEventSourceMappingInput { sourceAccessConfigurations: [LambdaClientTypes.SourceAccessConfiguration]? = nil, startingPosition: LambdaClientTypes.EventSourcePosition? = nil, startingPositionTimestamp: Foundation.Date? = nil, + tags: [Swift.String: Swift.String]? = nil, topics: [Swift.String]? = nil, tumblingWindowInSeconds: Swift.Int? = nil ) @@ -1405,6 +1440,7 @@ public struct CreateEventSourceMappingInput { self.sourceAccessConfigurations = sourceAccessConfigurations self.startingPosition = startingPosition self.startingPositionTimestamp = startingPositionTimestamp + self.tags = tags self.topics = topics self.tumblingWindowInSeconds = tumblingWindowInSeconds } @@ -1444,6 +1480,8 @@ public struct CreateEventSourceMappingOutput { public var documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? /// The Amazon Resource Name (ARN) of the event source. public var eventSourceArn: Swift.String? + /// The Amazon Resource Name (ARN) of the event source mapping. + public var eventSourceMappingArn: Swift.String? /// An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). If filter criteria is encrypted, this field shows up as null in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have kms:Decrypt permissions for the correct KMS key. public var filterCriteria: LambdaClientTypes.FilterCriteria? /// An object that contains details about an error related to filter criteria encryption. @@ -1498,6 +1536,7 @@ public struct CreateEventSourceMappingOutput { destinationConfig: LambdaClientTypes.DestinationConfig? = nil, documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? = nil, eventSourceArn: Swift.String? = nil, + eventSourceMappingArn: Swift.String? = nil, filterCriteria: LambdaClientTypes.FilterCriteria? = nil, filterCriteriaError: LambdaClientTypes.FilterCriteriaError? = nil, functionArn: Swift.String? = nil, @@ -1529,6 +1568,7 @@ public struct CreateEventSourceMappingOutput { self.destinationConfig = destinationConfig self.documentDBEventSourceConfig = documentDBEventSourceConfig self.eventSourceArn = eventSourceArn + self.eventSourceMappingArn = eventSourceMappingArn self.filterCriteria = filterCriteria self.filterCriteriaError = filterCriteriaError self.functionArn = functionArn @@ -3195,6 +3235,8 @@ public struct DeleteEventSourceMappingOutput { public var documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? /// The Amazon Resource Name (ARN) of the event source. public var eventSourceArn: Swift.String? + /// The Amazon Resource Name (ARN) of the event source mapping. + public var eventSourceMappingArn: Swift.String? /// An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). If filter criteria is encrypted, this field shows up as null in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have kms:Decrypt permissions for the correct KMS key. public var filterCriteria: LambdaClientTypes.FilterCriteria? /// An object that contains details about an error related to filter criteria encryption. @@ -3249,6 +3291,7 @@ public struct DeleteEventSourceMappingOutput { destinationConfig: LambdaClientTypes.DestinationConfig? = nil, documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? = nil, eventSourceArn: Swift.String? = nil, + eventSourceMappingArn: Swift.String? = nil, filterCriteria: LambdaClientTypes.FilterCriteria? = nil, filterCriteriaError: LambdaClientTypes.FilterCriteriaError? = nil, functionArn: Swift.String? = nil, @@ -3280,6 +3323,7 @@ public struct DeleteEventSourceMappingOutput { self.destinationConfig = destinationConfig self.documentDBEventSourceConfig = documentDBEventSourceConfig self.eventSourceArn = eventSourceArn + self.eventSourceMappingArn = eventSourceMappingArn self.filterCriteria = filterCriteria self.filterCriteriaError = filterCriteriaError self.functionArn = functionArn @@ -3624,6 +3668,8 @@ public struct GetEventSourceMappingOutput { public var documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? /// The Amazon Resource Name (ARN) of the event source. public var eventSourceArn: Swift.String? + /// The Amazon Resource Name (ARN) of the event source mapping. + public var eventSourceMappingArn: Swift.String? /// An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). If filter criteria is encrypted, this field shows up as null in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have kms:Decrypt permissions for the correct KMS key. public var filterCriteria: LambdaClientTypes.FilterCriteria? /// An object that contains details about an error related to filter criteria encryption. @@ -3678,6 +3724,7 @@ public struct GetEventSourceMappingOutput { destinationConfig: LambdaClientTypes.DestinationConfig? = nil, documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? = nil, eventSourceArn: Swift.String? = nil, + eventSourceMappingArn: Swift.String? = nil, filterCriteria: LambdaClientTypes.FilterCriteria? = nil, filterCriteriaError: LambdaClientTypes.FilterCriteriaError? = nil, functionArn: Swift.String? = nil, @@ -3709,6 +3756,7 @@ public struct GetEventSourceMappingOutput { self.destinationConfig = destinationConfig self.documentDBEventSourceConfig = documentDBEventSourceConfig self.eventSourceArn = eventSourceArn + self.eventSourceMappingArn = eventSourceMappingArn self.filterCriteria = filterCriteria self.filterCriteriaError = filterCriteriaError self.functionArn = functionArn @@ -6108,6 +6156,8 @@ extension LambdaClientTypes { public var documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? /// The Amazon Resource Name (ARN) of the event source. public var eventSourceArn: Swift.String? + /// The Amazon Resource Name (ARN) of the event source mapping. + public var eventSourceMappingArn: Swift.String? /// An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). If filter criteria is encrypted, this field shows up as null in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have kms:Decrypt permissions for the correct KMS key. public var filterCriteria: LambdaClientTypes.FilterCriteria? /// An object that contains details about an error related to filter criteria encryption. @@ -6162,6 +6212,7 @@ extension LambdaClientTypes { destinationConfig: LambdaClientTypes.DestinationConfig? = nil, documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? = nil, eventSourceArn: Swift.String? = nil, + eventSourceMappingArn: Swift.String? = nil, filterCriteria: LambdaClientTypes.FilterCriteria? = nil, filterCriteriaError: LambdaClientTypes.FilterCriteriaError? = nil, functionArn: Swift.String? = nil, @@ -6193,6 +6244,7 @@ extension LambdaClientTypes { self.destinationConfig = destinationConfig self.documentDBEventSourceConfig = documentDBEventSourceConfig self.eventSourceArn = eventSourceArn + self.eventSourceMappingArn = eventSourceMappingArn self.filterCriteria = filterCriteria self.filterCriteriaError = filterCriteriaError self.functionArn = functionArn @@ -6758,7 +6810,7 @@ public struct ListProvisionedConcurrencyConfigsOutput { } public struct ListTagsInput { - /// The function's Amazon Resource Name (ARN). Note: Lambda does not support adding tags to aliases or versions. + /// The resource's Amazon Resource Name (ARN). Note: Lambda does not support adding tags to function aliases or versions. /// This member is required. public var resource: Swift.String? @@ -7440,34 +7492,6 @@ public struct PutPublicAccessBlockConfigOutput { } } -/// Lambda prevented your policy from being created because it would grant public access to your function. If you intended to create a public policy, use the [PutPublicAccessBlockConfig] API action to configure your function's public-access settings to allow public policies. -public struct PublicPolicyException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - - public struct Properties { - public internal(set) var message: Swift.String? = nil - /// The exception type. - public internal(set) var type: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "PublicPolicyException" } - 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, - type: Swift.String? = nil - ) - { - self.properties.message = message - self.properties.type = type - } -} - public struct PutResourcePolicyInput { /// The JSON resource-based policy you want to add to your function. To learn more about creating resource-based policies for controlling access to Lambda, see [Working with resource-based IAM policies in Lambda](https://docs.aws.amazon.com/) in the Lambda Developer Guide. /// This member is required. @@ -7632,10 +7656,10 @@ public struct RemovePermissionInput { } public struct TagResourceInput { - /// The function's Amazon Resource Name (ARN). + /// The resource's Amazon Resource Name (ARN). /// This member is required. public var resource: Swift.String? - /// A list of tags to apply to the function. + /// A list of tags to apply to the resource. /// This member is required. public var tags: [Swift.String: Swift.String]? @@ -7650,10 +7674,10 @@ public struct TagResourceInput { } public struct UntagResourceInput { - /// The function's Amazon Resource Name (ARN). + /// The resource's Amazon Resource Name (ARN). /// This member is required. public var resource: Swift.String? - /// A list of tag keys to remove from the function. + /// A list of tag keys to remove from the resource. /// This member is required. public var tagKeys: [Swift.String]? @@ -7897,6 +7921,8 @@ public struct UpdateEventSourceMappingOutput { public var documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? /// The Amazon Resource Name (ARN) of the event source. public var eventSourceArn: Swift.String? + /// The Amazon Resource Name (ARN) of the event source mapping. + public var eventSourceMappingArn: Swift.String? /// An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). If filter criteria is encrypted, this field shows up as null in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have kms:Decrypt permissions for the correct KMS key. public var filterCriteria: LambdaClientTypes.FilterCriteria? /// An object that contains details about an error related to filter criteria encryption. @@ -7951,6 +7977,7 @@ public struct UpdateEventSourceMappingOutput { destinationConfig: LambdaClientTypes.DestinationConfig? = nil, documentDBEventSourceConfig: LambdaClientTypes.DocumentDBEventSourceConfig? = nil, eventSourceArn: Swift.String? = nil, + eventSourceMappingArn: Swift.String? = nil, filterCriteria: LambdaClientTypes.FilterCriteria? = nil, filterCriteriaError: LambdaClientTypes.FilterCriteriaError? = nil, functionArn: Swift.String? = nil, @@ -7982,6 +8009,7 @@ public struct UpdateEventSourceMappingOutput { self.destinationConfig = destinationConfig self.documentDBEventSourceConfig = documentDBEventSourceConfig self.eventSourceArn = eventSourceArn + self.eventSourceMappingArn = eventSourceMappingArn self.filterCriteria = filterCriteria self.filterCriteriaError = filterCriteriaError self.functionArn = functionArn @@ -9994,6 +10022,7 @@ extension CreateCodeSigningConfigInput { try writer["AllowedPublishers"].write(value.allowedPublishers, with: LambdaClientTypes.AllowedPublishers.write(value:to:)) try writer["CodeSigningPolicies"].write(value.codeSigningPolicies, with: LambdaClientTypes.CodeSigningPolicies.write(value:to:)) try writer["Description"].write(value.description) + try writer["Tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) } } @@ -10023,6 +10052,7 @@ extension CreateEventSourceMappingInput { try writer["SourceAccessConfigurations"].writeList(value.sourceAccessConfigurations, memberWritingClosure: LambdaClientTypes.SourceAccessConfiguration.write(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["StartingPosition"].write(value.startingPosition) try writer["StartingPositionTimestamp"].writeTimestamp(value.startingPositionTimestamp, format: SmithyTimestamps.TimestampFormat.epochSeconds) + try writer["Tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) try writer["Topics"].writeList(value.topics, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["TumblingWindowInSeconds"].write(value.tumblingWindowInSeconds) } @@ -10363,6 +10393,7 @@ extension CreateEventSourceMappingOutput { value.destinationConfig = try reader["DestinationConfig"].readIfPresent(with: LambdaClientTypes.DestinationConfig.read(from:)) value.documentDBEventSourceConfig = try reader["DocumentDBEventSourceConfig"].readIfPresent(with: LambdaClientTypes.DocumentDBEventSourceConfig.read(from:)) value.eventSourceArn = try reader["EventSourceArn"].readIfPresent() + value.eventSourceMappingArn = try reader["EventSourceMappingArn"].readIfPresent() value.filterCriteria = try reader["FilterCriteria"].readIfPresent(with: LambdaClientTypes.FilterCriteria.read(from:)) value.filterCriteriaError = try reader["FilterCriteriaError"].readIfPresent(with: LambdaClientTypes.FilterCriteriaError.read(from:)) value.functionArn = try reader["FunctionArn"].readIfPresent() @@ -10481,6 +10512,7 @@ extension DeleteEventSourceMappingOutput { value.destinationConfig = try reader["DestinationConfig"].readIfPresent(with: LambdaClientTypes.DestinationConfig.read(from:)) value.documentDBEventSourceConfig = try reader["DocumentDBEventSourceConfig"].readIfPresent(with: LambdaClientTypes.DocumentDBEventSourceConfig.read(from:)) value.eventSourceArn = try reader["EventSourceArn"].readIfPresent() + value.eventSourceMappingArn = try reader["EventSourceMappingArn"].readIfPresent() value.filterCriteria = try reader["FilterCriteria"].readIfPresent(with: LambdaClientTypes.FilterCriteria.read(from:)) value.filterCriteriaError = try reader["FilterCriteriaError"].readIfPresent(with: LambdaClientTypes.FilterCriteriaError.read(from:)) value.functionArn = try reader["FunctionArn"].readIfPresent() @@ -10619,6 +10651,7 @@ extension GetEventSourceMappingOutput { value.destinationConfig = try reader["DestinationConfig"].readIfPresent(with: LambdaClientTypes.DestinationConfig.read(from:)) value.documentDBEventSourceConfig = try reader["DocumentDBEventSourceConfig"].readIfPresent(with: LambdaClientTypes.DocumentDBEventSourceConfig.read(from:)) value.eventSourceArn = try reader["EventSourceArn"].readIfPresent() + value.eventSourceMappingArn = try reader["EventSourceMappingArn"].readIfPresent() value.filterCriteria = try reader["FilterCriteria"].readIfPresent(with: LambdaClientTypes.FilterCriteria.read(from:)) value.filterCriteriaError = try reader["FilterCriteriaError"].readIfPresent(with: LambdaClientTypes.FilterCriteriaError.read(from:)) value.functionArn = try reader["FunctionArn"].readIfPresent() @@ -11357,6 +11390,7 @@ extension UpdateEventSourceMappingOutput { value.destinationConfig = try reader["DestinationConfig"].readIfPresent(with: LambdaClientTypes.DestinationConfig.read(from:)) value.documentDBEventSourceConfig = try reader["DocumentDBEventSourceConfig"].readIfPresent(with: LambdaClientTypes.DocumentDBEventSourceConfig.read(from:)) value.eventSourceArn = try reader["EventSourceArn"].readIfPresent() + value.eventSourceMappingArn = try reader["EventSourceMappingArn"].readIfPresent() value.filterCriteria = try reader["FilterCriteria"].readIfPresent(with: LambdaClientTypes.FilterCriteria.read(from:)) value.filterCriteriaError = try reader["FilterCriteriaError"].readIfPresent(with: LambdaClientTypes.FilterCriteriaError.read(from:)) value.functionArn = try reader["FunctionArn"].readIfPresent() @@ -11543,6 +11577,7 @@ enum AddPermissionOutputError { case "InvalidParameterValueException": return try InvalidParameterValueException.makeError(baseError: baseError) case "PolicyLengthExceededException": return try PolicyLengthExceededException.makeError(baseError: baseError) case "PreconditionFailedException": return try PreconditionFailedException.makeError(baseError: baseError) + case "PublicPolicyException": return try PublicPolicyException.makeError(baseError: baseError) case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) case "ServiceException": return try ServiceException.makeError(baseError: baseError) @@ -12676,6 +12711,7 @@ enum RemovePermissionOutputError { switch baseError.code { case "InvalidParameterValueException": return try InvalidParameterValueException.makeError(baseError: baseError) case "PreconditionFailedException": return try PreconditionFailedException.makeError(baseError: baseError) + case "PublicPolicyException": return try PublicPolicyException.makeError(baseError: baseError) case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) case "ServiceException": return try ServiceException.makeError(baseError: baseError) case "TooManyRequestsException": return try TooManyRequestsException.makeError(baseError: baseError) @@ -12958,6 +12994,20 @@ extension ResourceConflictException { } } +extension PublicPolicyException { + + static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> PublicPolicyException { + let reader = baseError.errorBodyReader + var value = PublicPolicyException() + value.properties.message = try reader["Message"].readIfPresent() + value.properties.type = try reader["Type"].readIfPresent() + value.httpResponse = baseError.httpResponse + value.requestID = baseError.requestID + value.message = baseError.message + return value + } +} + extension CodeVerificationFailedException { static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> CodeVerificationFailedException { @@ -13393,20 +13443,6 @@ extension KMSInvalidStateException { } } -extension PublicPolicyException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> PublicPolicyException { - let reader = baseError.errorBodyReader - var value = PublicPolicyException() - value.properties.message = try reader["Message"].readIfPresent() - value.properties.type = try reader["Type"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - extension LambdaClientTypes.InvokeWithResponseStreamResponseEvent { static var unmarshal: SmithyEventStreamsAPI.UnmarshalClosure { { message in @@ -14107,6 +14143,7 @@ extension LambdaClientTypes.EventSourceMappingConfiguration { value.documentDBEventSourceConfig = try reader["DocumentDBEventSourceConfig"].readIfPresent(with: LambdaClientTypes.DocumentDBEventSourceConfig.read(from:)) value.kmsKeyArn = try reader["KMSKeyArn"].readIfPresent() value.filterCriteriaError = try reader["FilterCriteriaError"].readIfPresent(with: LambdaClientTypes.FilterCriteriaError.read(from:)) + value.eventSourceMappingArn = try reader["EventSourceMappingArn"].readIfPresent() return value } } diff --git a/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/Models.swift b/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/Models.swift index 280dff73b1a..3d1653d6cf5 100644 --- a/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/Models.swift +++ b/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/Models.swift @@ -8237,6 +8237,119 @@ extension MediaConvertClientTypes { } } +extension MediaConvertClientTypes { + + /// Specify which SPEKE version 2.0 audio preset MediaConvert uses to request content keys from your SPEKE server. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To encrypt to your audio outputs, choose from the following: Audio preset 1, Audio preset 2, or Audio preset 3. To encrypt your audio outputs, using the same content key for both your audio and video outputs: Choose Shared. When you do, you must also set SPEKE v2.0 video preset to Shared. To not encrypt your audio outputs: Choose Unencrypted. When you do, to encrypt your video outputs, you must also specify a SPEKE v2.0 video preset (other than Shared or Unencrypted). + public enum PresetSpeke20Audio: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case presetAudio1 + case presetAudio2 + case presetAudio3 + case shared + case unencrypted + case sdkUnknown(Swift.String) + + public static var allCases: [PresetSpeke20Audio] { + return [ + .presetAudio1, + .presetAudio2, + .presetAudio3, + .shared, + .unencrypted + ] + } + + 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 .presetAudio1: return "PRESET_AUDIO_1" + case .presetAudio2: return "PRESET_AUDIO_2" + case .presetAudio3: return "PRESET_AUDIO_3" + case .shared: return "SHARED" + case .unencrypted: return "UNENCRYPTED" + case let .sdkUnknown(s): return s + } + } + } +} + +extension MediaConvertClientTypes { + + /// Specify which SPEKE version 2.0 video preset MediaConvert uses to request content keys from your SPEKE server. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To encrypt to your video outputs, choose from the following: Video preset 1, Video preset 2, Video preset 3, Video preset 4, Video preset 5, Video preset 6, Video preset 7, or Video preset 8. To encrypt your video outputs, using the same content key for both your video and audio outputs: Choose Shared. When you do, you must also set SPEKE v2.0 audio preset to Shared. To not encrypt your video outputs: Choose Unencrypted. When you do, to encrypt your audio outputs, you must also specify a SPEKE v2.0 audio preset (other than Shared or Unencrypted). + public enum PresetSpeke20Video: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case presetVideo1 + case presetVideo2 + case presetVideo3 + case presetVideo4 + case presetVideo5 + case presetVideo6 + case presetVideo7 + case presetVideo8 + case shared + case unencrypted + case sdkUnknown(Swift.String) + + public static var allCases: [PresetSpeke20Video] { + return [ + .presetVideo1, + .presetVideo2, + .presetVideo3, + .presetVideo4, + .presetVideo5, + .presetVideo6, + .presetVideo7, + .presetVideo8, + .shared, + .unencrypted + ] + } + + 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 .presetVideo1: return "PRESET_VIDEO_1" + case .presetVideo2: return "PRESET_VIDEO_2" + case .presetVideo3: return "PRESET_VIDEO_3" + case .presetVideo4: return "PRESET_VIDEO_4" + case .presetVideo5: return "PRESET_VIDEO_5" + case .presetVideo6: return "PRESET_VIDEO_6" + case .presetVideo7: return "PRESET_VIDEO_7" + case .presetVideo8: return "PRESET_VIDEO_8" + case .shared: return "SHARED" + case .unencrypted: return "UNENCRYPTED" + case let .sdkUnknown(s): return s + } + } + } +} + +extension MediaConvertClientTypes { + /// Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset. + public struct EncryptionContractConfiguration { + /// Specify which SPEKE version 2.0 audio preset MediaConvert uses to request content keys from your SPEKE server. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To encrypt to your audio outputs, choose from the following: Audio preset 1, Audio preset 2, or Audio preset 3. To encrypt your audio outputs, using the same content key for both your audio and video outputs: Choose Shared. When you do, you must also set SPEKE v2.0 video preset to Shared. To not encrypt your audio outputs: Choose Unencrypted. When you do, to encrypt your video outputs, you must also specify a SPEKE v2.0 video preset (other than Shared or Unencrypted). + public var spekeAudioPreset: MediaConvertClientTypes.PresetSpeke20Audio? + /// Specify which SPEKE version 2.0 video preset MediaConvert uses to request content keys from your SPEKE server. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To encrypt to your video outputs, choose from the following: Video preset 1, Video preset 2, Video preset 3, Video preset 4, Video preset 5, Video preset 6, Video preset 7, or Video preset 8. To encrypt your video outputs, using the same content key for both your video and audio outputs: Choose Shared. When you do, you must also set SPEKE v2.0 audio preset to Shared. To not encrypt your video outputs: Choose Unencrypted. When you do, to encrypt your audio outputs, you must also specify a SPEKE v2.0 audio preset (other than Shared or Unencrypted). + public var spekeVideoPreset: MediaConvertClientTypes.PresetSpeke20Video? + + public init( + spekeAudioPreset: MediaConvertClientTypes.PresetSpeke20Audio? = nil, + spekeVideoPreset: MediaConvertClientTypes.PresetSpeke20Video? = nil + ) + { + self.spekeAudioPreset = spekeAudioPreset + self.spekeVideoPreset = spekeVideoPreset + } + } + +} + extension MediaConvertClientTypes { /// If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead. public struct SpekeKeyProviderCmaf { @@ -8244,6 +8357,8 @@ extension MediaConvertClientTypes { public var certificateArn: Swift.String? /// Specify the DRM system IDs that you want signaled in the DASH manifest that MediaConvert creates as part of this CMAF package. The DASH manifest can currently signal up to three system IDs. For more information, see https://dashif.org/identifiers/content_protection/. public var dashSignaledSystemIds: [Swift.String]? + /// Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset. + public var encryptionContractConfiguration: MediaConvertClientTypes.EncryptionContractConfiguration? /// Specify the DRM system ID that you want signaled in the HLS manifest that MediaConvert creates as part of this CMAF package. The HLS manifest can currently signal only one system ID. For more information, see https://dashif.org/identifiers/content_protection/. public var hlsSignaledSystemIds: [Swift.String]? /// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content. @@ -8254,6 +8369,7 @@ extension MediaConvertClientTypes { public init( certificateArn: Swift.String? = nil, dashSignaledSystemIds: [Swift.String]? = nil, + encryptionContractConfiguration: MediaConvertClientTypes.EncryptionContractConfiguration? = nil, hlsSignaledSystemIds: [Swift.String]? = nil, resourceId: Swift.String? = nil, url: Swift.String? = nil @@ -8261,6 +8377,7 @@ extension MediaConvertClientTypes { { self.certificateArn = certificateArn self.dashSignaledSystemIds = dashSignaledSystemIds + self.encryptionContractConfiguration = encryptionContractConfiguration self.hlsSignaledSystemIds = hlsSignaledSystemIds self.resourceId = resourceId self.url = url @@ -9044,6 +9161,8 @@ extension MediaConvertClientTypes { public struct SpekeKeyProvider { /// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here. public var certificateArn: Swift.String? + /// Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset. + public var encryptionContractConfiguration: MediaConvertClientTypes.EncryptionContractConfiguration? /// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content. public var resourceId: Swift.String? /// Relates to SPEKE implementation. DRM system identifiers. DASH output groups support a max of two system ids. Other group types support one system id. See https://dashif.org/identifiers/content_protection/ for more details. @@ -9053,12 +9172,14 @@ extension MediaConvertClientTypes { public init( certificateArn: Swift.String? = nil, + encryptionContractConfiguration: MediaConvertClientTypes.EncryptionContractConfiguration? = nil, resourceId: Swift.String? = nil, systemIds: [Swift.String]? = nil, url: Swift.String? = nil ) { self.certificateArn = certificateArn + self.encryptionContractConfiguration = encryptionContractConfiguration self.resourceId = resourceId self.systemIds = systemIds self.url = url @@ -27247,6 +27368,7 @@ extension MediaConvertClientTypes.SpekeKeyProvider { static func write(value: MediaConvertClientTypes.SpekeKeyProvider?, to writer: SmithyJSON.Writer) throws { guard let value else { return } try writer["certificateArn"].write(value.certificateArn) + try writer["encryptionContractConfiguration"].write(value.encryptionContractConfiguration, with: MediaConvertClientTypes.EncryptionContractConfiguration.write(value:to:)) try writer["resourceId"].write(value.resourceId) try writer["systemIds"].writeList(value.systemIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["url"].write(value.url) @@ -27256,6 +27378,7 @@ extension MediaConvertClientTypes.SpekeKeyProvider { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = MediaConvertClientTypes.SpekeKeyProvider() value.certificateArn = try reader["certificateArn"].readIfPresent() + value.encryptionContractConfiguration = try reader["encryptionContractConfiguration"].readIfPresent(with: MediaConvertClientTypes.EncryptionContractConfiguration.read(from:)) value.resourceId = try reader["resourceId"].readIfPresent() value.systemIds = try reader["systemIds"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) value.url = try reader["url"].readIfPresent() @@ -27263,6 +27386,23 @@ extension MediaConvertClientTypes.SpekeKeyProvider { } } +extension MediaConvertClientTypes.EncryptionContractConfiguration { + + static func write(value: MediaConvertClientTypes.EncryptionContractConfiguration?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["spekeAudioPreset"].write(value.spekeAudioPreset) + try writer["spekeVideoPreset"].write(value.spekeVideoPreset) + } + + static func read(from reader: SmithyJSON.Reader) throws -> MediaConvertClientTypes.EncryptionContractConfiguration { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = MediaConvertClientTypes.EncryptionContractConfiguration() + value.spekeAudioPreset = try reader["spekeAudioPreset"].readIfPresent() + value.spekeVideoPreset = try reader["spekeVideoPreset"].readIfPresent() + return value + } +} + extension MediaConvertClientTypes.DestinationSettings { static func write(value: MediaConvertClientTypes.DestinationSettings?, to writer: SmithyJSON.Writer) throws { @@ -27794,6 +27934,7 @@ extension MediaConvertClientTypes.SpekeKeyProviderCmaf { guard let value else { return } try writer["certificateArn"].write(value.certificateArn) try writer["dashSignaledSystemIds"].writeList(value.dashSignaledSystemIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) + try writer["encryptionContractConfiguration"].write(value.encryptionContractConfiguration, with: MediaConvertClientTypes.EncryptionContractConfiguration.write(value:to:)) try writer["hlsSignaledSystemIds"].writeList(value.hlsSignaledSystemIds, memberWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["resourceId"].write(value.resourceId) try writer["url"].write(value.url) @@ -27804,6 +27945,7 @@ extension MediaConvertClientTypes.SpekeKeyProviderCmaf { var value = MediaConvertClientTypes.SpekeKeyProviderCmaf() value.certificateArn = try reader["certificateArn"].readIfPresent() value.dashSignaledSystemIds = try reader["dashSignaledSystemIds"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) + value.encryptionContractConfiguration = try reader["encryptionContractConfiguration"].readIfPresent(with: MediaConvertClientTypes.EncryptionContractConfiguration.read(from:)) value.hlsSignaledSystemIds = try reader["hlsSignaledSystemIds"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) value.resourceId = try reader["resourceId"].readIfPresent() value.url = try reader["url"].readIfPresent() diff --git a/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/Models.swift b/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/Models.swift index c10361e2183..d274f528292 100644 --- a/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/Models.swift +++ b/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/Models.swift @@ -6601,7 +6601,7 @@ extension MediaLiveClientTypes { extension MediaLiveClientTypes { - /// With the introduction of MediaLive OnPrem, a MediaLive input can now exist in two different places: AWS or inside an on-premise datacenter. By default all inputs will continue to be AWS inputs. + /// With the introduction of MediaLive Anywhere, a MediaLive input can now exist in two different places: AWS or inside an on-premises datacenter. By default all inputs will continue to be AWS inputs. public enum InputNetworkLocation: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { case aws case onPremises @@ -10267,6 +10267,90 @@ extension MediaLiveClientTypes { } +extension MediaLiveClientTypes { + /// Multiplex M2ts Settings + public struct MultiplexM2tsSettings { + /// When set to drop, output audio streams will be removed from the program if the selected input audio stream is removed from the input. This allows the output audio configuration to dynamically change based on input configuration. If this is set to encodeSilence, all output audio streams will output encoded silence when not connected to an active input stream. + public var absentInputAudioBehavior: MediaLiveClientTypes.M2tsAbsentInputAudioBehavior? + /// When set to enabled, uses ARIB-compliant field muxing and removes video descriptor. + public var arib: MediaLiveClientTypes.M2tsArib? + /// When set to dvb, uses DVB buffer model for Dolby Digital audio. When set to atsc, the ATSC model is used. + public var audioBufferModel: MediaLiveClientTypes.M2tsAudioBufferModel? + /// The number of audio frames to insert for each PES packet. + public var audioFramesPerPes: Swift.Int? + /// When set to atsc, uses stream type = 0x81 for AC3 and stream type = 0x87 for EAC3. When set to dvb, uses stream type = 0x06. + public var audioStreamType: MediaLiveClientTypes.M2tsAudioStreamType? + /// When set to enabled, generates captionServiceDescriptor in PMT. + public var ccDescriptor: MediaLiveClientTypes.M2tsCcDescriptor? + /// If set to passthrough, passes any EBIF data from the input source to this output. + public var ebif: MediaLiveClientTypes.M2tsEbifControl? + /// Include or exclude the ES Rate field in the PES header. + public var esRateInPes: MediaLiveClientTypes.M2tsEsRateInPes? + /// If set to passthrough, passes any KLV data from the input source to this output. + public var klv: MediaLiveClientTypes.M2tsKlv? + /// If set to passthrough, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output. + public var nielsenId3Behavior: MediaLiveClientTypes.M2tsNielsenId3Behavior? + /// When set to pcrEveryPesPacket, a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This parameter is effective only when the PCR PID is the same as the video or audio elementary stream. + public var pcrControl: MediaLiveClientTypes.M2tsPcrControl? + /// Maximum time in milliseconds between Program Clock Reference (PCRs) inserted into the transport stream. + public var pcrPeriod: Swift.Int? + /// Optionally pass SCTE-35 signals from the input source to this output. + public var scte35Control: MediaLiveClientTypes.M2tsScte35Control? + /// Defines the amount SCTE-35 preroll will be increased (in milliseconds) on the output. Preroll is the amount of time between the presence of a SCTE-35 indication in a transport stream and the PTS of the video frame it references. Zero means don't add pullup (it doesn't mean set the preroll to zero). Negative pullup is not supported, which means that you can't make the preroll shorter. Be aware that latency in the output will increase by the pullup amount. + public var scte35PrerollPullupMilliseconds: Swift.Double? + + public init( + absentInputAudioBehavior: MediaLiveClientTypes.M2tsAbsentInputAudioBehavior? = nil, + arib: MediaLiveClientTypes.M2tsArib? = nil, + audioBufferModel: MediaLiveClientTypes.M2tsAudioBufferModel? = nil, + audioFramesPerPes: Swift.Int? = nil, + audioStreamType: MediaLiveClientTypes.M2tsAudioStreamType? = nil, + ccDescriptor: MediaLiveClientTypes.M2tsCcDescriptor? = nil, + ebif: MediaLiveClientTypes.M2tsEbifControl? = nil, + esRateInPes: MediaLiveClientTypes.M2tsEsRateInPes? = nil, + klv: MediaLiveClientTypes.M2tsKlv? = nil, + nielsenId3Behavior: MediaLiveClientTypes.M2tsNielsenId3Behavior? = nil, + pcrControl: MediaLiveClientTypes.M2tsPcrControl? = nil, + pcrPeriod: Swift.Int? = nil, + scte35Control: MediaLiveClientTypes.M2tsScte35Control? = nil, + scte35PrerollPullupMilliseconds: Swift.Double? = nil + ) + { + self.absentInputAudioBehavior = absentInputAudioBehavior + self.arib = arib + self.audioBufferModel = audioBufferModel + self.audioFramesPerPes = audioFramesPerPes + self.audioStreamType = audioStreamType + self.ccDescriptor = ccDescriptor + self.ebif = ebif + self.esRateInPes = esRateInPes + self.klv = klv + self.nielsenId3Behavior = nielsenId3Behavior + self.pcrControl = pcrControl + self.pcrPeriod = pcrPeriod + self.scte35Control = scte35Control + self.scte35PrerollPullupMilliseconds = scte35PrerollPullupMilliseconds + } + } + +} + +extension MediaLiveClientTypes { + /// Multiplex Container Settings + public struct MultiplexContainerSettings { + /// Multiplex M2ts Settings + public var multiplexM2tsSettings: MediaLiveClientTypes.MultiplexM2tsSettings? + + public init( + multiplexM2tsSettings: MediaLiveClientTypes.MultiplexM2tsSettings? = nil + ) + { + self.multiplexM2tsSettings = multiplexM2tsSettings + } + } + +} + extension MediaLiveClientTypes { /// Reference to an OutputDestination ID defined in the channel public struct OutputLocationRef { @@ -10286,14 +10370,18 @@ extension MediaLiveClientTypes { extension MediaLiveClientTypes { /// Multiplex Output Settings public struct MultiplexOutputSettings { + /// Multiplex Container Settings + public var containerSettings: MediaLiveClientTypes.MultiplexContainerSettings? /// Destination is a Multiplex. /// This member is required. public var destination: MediaLiveClientTypes.OutputLocationRef? public init( + containerSettings: MediaLiveClientTypes.MultiplexContainerSettings? = nil, destination: MediaLiveClientTypes.OutputLocationRef? = nil ) { + self.containerSettings = containerSettings self.destination = destination } } @@ -15245,6 +15333,101 @@ extension MediaLiveClientTypes { } } +extension MediaLiveClientTypes { + + /// Bandwidth Reduction Post Filter Sharpening + public enum BandwidthReductionPostFilterSharpening: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case disabled + case sharpening1 + case sharpening2 + case sharpening3 + case sdkUnknown(Swift.String) + + public static var allCases: [BandwidthReductionPostFilterSharpening] { + return [ + .disabled, + .sharpening1, + .sharpening2, + .sharpening3 + ] + } + + 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 .sharpening1: return "SHARPENING_1" + case .sharpening2: return "SHARPENING_2" + case .sharpening3: return "SHARPENING_3" + case let .sdkUnknown(s): return s + } + } + } +} + +extension MediaLiveClientTypes { + + /// Bandwidth Reduction Filter Strength + public enum BandwidthReductionFilterStrength: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case auto + case strength1 + case strength2 + case strength3 + case strength4 + case sdkUnknown(Swift.String) + + public static var allCases: [BandwidthReductionFilterStrength] { + return [ + .auto, + .strength1, + .strength2, + .strength3, + .strength4 + ] + } + + 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 .auto: return "AUTO" + case .strength1: return "STRENGTH_1" + case .strength2: return "STRENGTH_2" + case .strength3: return "STRENGTH_3" + case .strength4: return "STRENGTH_4" + case let .sdkUnknown(s): return s + } + } + } +} + +extension MediaLiveClientTypes { + /// Bandwidth Reduction Filter Settings + public struct BandwidthReductionFilterSettings { + /// Configures the sharpening control, which is available when the bandwidth reduction filter is enabled. This control sharpens edges and contours, which produces a specific artistic effect that you might want. We recommend that you test each of the values (including DISABLED) to observe the sharpening effect on the content. + public var postFilterSharpening: MediaLiveClientTypes.BandwidthReductionPostFilterSharpening? + /// Enables the bandwidth reduction filter. The filter strengths range from 1 to 4. We recommend that you always enable this filter and use AUTO, to let MediaLive apply the optimum filtering for the context. + public var strength: MediaLiveClientTypes.BandwidthReductionFilterStrength? + + public init( + postFilterSharpening: MediaLiveClientTypes.BandwidthReductionPostFilterSharpening? = nil, + strength: MediaLiveClientTypes.BandwidthReductionFilterStrength? = nil + ) + { + self.postFilterSharpening = postFilterSharpening + self.strength = strength + } + } + +} + extension MediaLiveClientTypes { /// Temporal Filter Post Filter Sharpening @@ -15380,13 +15563,17 @@ extension MediaLiveClientTypes { extension MediaLiveClientTypes { /// H264 Filter Settings public struct H264FilterSettings { + /// Bandwidth Reduction Filter Settings + public var bandwidthReductionFilterSettings: MediaLiveClientTypes.BandwidthReductionFilterSettings? /// Temporal Filter Settings public var temporalFilterSettings: MediaLiveClientTypes.TemporalFilterSettings? public init( + bandwidthReductionFilterSettings: MediaLiveClientTypes.BandwidthReductionFilterSettings? = nil, temporalFilterSettings: MediaLiveClientTypes.TemporalFilterSettings? = nil ) { + self.bandwidthReductionFilterSettings = bandwidthReductionFilterSettings self.temporalFilterSettings = temporalFilterSettings } } @@ -16350,13 +16537,17 @@ extension MediaLiveClientTypes { extension MediaLiveClientTypes { /// H265 Filter Settings public struct H265FilterSettings { + /// Bandwidth Reduction Filter Settings + public var bandwidthReductionFilterSettings: MediaLiveClientTypes.BandwidthReductionFilterSettings? /// Temporal Filter Settings public var temporalFilterSettings: MediaLiveClientTypes.TemporalFilterSettings? public init( + bandwidthReductionFilterSettings: MediaLiveClientTypes.BandwidthReductionFilterSettings? = nil, temporalFilterSettings: MediaLiveClientTypes.TemporalFilterSettings? = nil ) { + self.bandwidthReductionFilterSettings = bandwidthReductionFilterSettings self.temporalFilterSettings = temporalFilterSettings } } @@ -34006,6 +34197,7 @@ extension MediaLiveClientTypes.H265FilterSettings { static func write(value: MediaLiveClientTypes.H265FilterSettings?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["bandwidthReductionFilterSettings"].write(value.bandwidthReductionFilterSettings, with: MediaLiveClientTypes.BandwidthReductionFilterSettings.write(value:to:)) try writer["temporalFilterSettings"].write(value.temporalFilterSettings, with: MediaLiveClientTypes.TemporalFilterSettings.write(value:to:)) } @@ -34013,6 +34205,24 @@ extension MediaLiveClientTypes.H265FilterSettings { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = MediaLiveClientTypes.H265FilterSettings() value.temporalFilterSettings = try reader["temporalFilterSettings"].readIfPresent(with: MediaLiveClientTypes.TemporalFilterSettings.read(from:)) + value.bandwidthReductionFilterSettings = try reader["bandwidthReductionFilterSettings"].readIfPresent(with: MediaLiveClientTypes.BandwidthReductionFilterSettings.read(from:)) + return value + } +} + +extension MediaLiveClientTypes.BandwidthReductionFilterSettings { + + static func write(value: MediaLiveClientTypes.BandwidthReductionFilterSettings?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["postFilterSharpening"].write(value.postFilterSharpening) + try writer["strength"].write(value.strength) + } + + static func read(from reader: SmithyJSON.Reader) throws -> MediaLiveClientTypes.BandwidthReductionFilterSettings { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = MediaLiveClientTypes.BandwidthReductionFilterSettings() + value.postFilterSharpening = try reader["postFilterSharpening"].readIfPresent() + value.strength = try reader["strength"].readIfPresent() return value } } @@ -34156,6 +34366,7 @@ extension MediaLiveClientTypes.H264FilterSettings { static func write(value: MediaLiveClientTypes.H264FilterSettings?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["bandwidthReductionFilterSettings"].write(value.bandwidthReductionFilterSettings, with: MediaLiveClientTypes.BandwidthReductionFilterSettings.write(value:to:)) try writer["temporalFilterSettings"].write(value.temporalFilterSettings, with: MediaLiveClientTypes.TemporalFilterSettings.write(value:to:)) } @@ -34163,6 +34374,7 @@ extension MediaLiveClientTypes.H264FilterSettings { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = MediaLiveClientTypes.H264FilterSettings() value.temporalFilterSettings = try reader["temporalFilterSettings"].readIfPresent(with: MediaLiveClientTypes.TemporalFilterSettings.read(from:)) + value.bandwidthReductionFilterSettings = try reader["bandwidthReductionFilterSettings"].readIfPresent(with: MediaLiveClientTypes.BandwidthReductionFilterSettings.read(from:)) return value } } @@ -34594,6 +34806,7 @@ extension MediaLiveClientTypes.MultiplexOutputSettings { static func write(value: MediaLiveClientTypes.MultiplexOutputSettings?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["containerSettings"].write(value.containerSettings, with: MediaLiveClientTypes.MultiplexContainerSettings.write(value:to:)) try writer["destination"].write(value.destination, with: MediaLiveClientTypes.OutputLocationRef.write(value:to:)) } @@ -34601,6 +34814,63 @@ extension MediaLiveClientTypes.MultiplexOutputSettings { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = MediaLiveClientTypes.MultiplexOutputSettings() value.destination = try reader["destination"].readIfPresent(with: MediaLiveClientTypes.OutputLocationRef.read(from:)) + value.containerSettings = try reader["containerSettings"].readIfPresent(with: MediaLiveClientTypes.MultiplexContainerSettings.read(from:)) + return value + } +} + +extension MediaLiveClientTypes.MultiplexContainerSettings { + + static func write(value: MediaLiveClientTypes.MultiplexContainerSettings?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["multiplexM2tsSettings"].write(value.multiplexM2tsSettings, with: MediaLiveClientTypes.MultiplexM2tsSettings.write(value:to:)) + } + + static func read(from reader: SmithyJSON.Reader) throws -> MediaLiveClientTypes.MultiplexContainerSettings { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = MediaLiveClientTypes.MultiplexContainerSettings() + value.multiplexM2tsSettings = try reader["multiplexM2tsSettings"].readIfPresent(with: MediaLiveClientTypes.MultiplexM2tsSettings.read(from:)) + return value + } +} + +extension MediaLiveClientTypes.MultiplexM2tsSettings { + + static func write(value: MediaLiveClientTypes.MultiplexM2tsSettings?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["absentInputAudioBehavior"].write(value.absentInputAudioBehavior) + try writer["arib"].write(value.arib) + try writer["audioBufferModel"].write(value.audioBufferModel) + try writer["audioFramesPerPes"].write(value.audioFramesPerPes) + try writer["audioStreamType"].write(value.audioStreamType) + try writer["ccDescriptor"].write(value.ccDescriptor) + try writer["ebif"].write(value.ebif) + try writer["esRateInPes"].write(value.esRateInPes) + try writer["klv"].write(value.klv) + try writer["nielsenId3Behavior"].write(value.nielsenId3Behavior) + try writer["pcrControl"].write(value.pcrControl) + try writer["pcrPeriod"].write(value.pcrPeriod) + try writer["scte35Control"].write(value.scte35Control) + try writer["scte35PrerollPullupMilliseconds"].write(value.scte35PrerollPullupMilliseconds) + } + + static func read(from reader: SmithyJSON.Reader) throws -> MediaLiveClientTypes.MultiplexM2tsSettings { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = MediaLiveClientTypes.MultiplexM2tsSettings() + value.absentInputAudioBehavior = try reader["absentInputAudioBehavior"].readIfPresent() + value.arib = try reader["arib"].readIfPresent() + value.audioBufferModel = try reader["audioBufferModel"].readIfPresent() + value.audioFramesPerPes = try reader["audioFramesPerPes"].readIfPresent() + value.audioStreamType = try reader["audioStreamType"].readIfPresent() + value.ccDescriptor = try reader["ccDescriptor"].readIfPresent() + value.ebif = try reader["ebif"].readIfPresent() + value.esRateInPes = try reader["esRateInPes"].readIfPresent() + value.klv = try reader["klv"].readIfPresent() + value.nielsenId3Behavior = try reader["nielsenId3Behavior"].readIfPresent() + value.pcrControl = try reader["pcrControl"].readIfPresent() + value.pcrPeriod = try reader["pcrPeriod"].readIfPresent() + value.scte35Control = try reader["scte35Control"].readIfPresent() + value.scte35PrerollPullupMilliseconds = try reader["scte35PrerollPullupMilliseconds"].readIfPresent() return value } } diff --git a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Models.swift b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Models.swift index 5c8dfc340bb..31915fc7baa 100644 --- a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Models.swift +++ b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Models.swift @@ -2434,6 +2434,35 @@ extension QuickSightClientTypes { } +extension QuickSightClientTypes { + + public enum CommitMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case auto + case manual + case sdkUnknown(Swift.String) + + public static var allCases: [CommitMode] { + return [ + .auto, + .manual + ] + } + + 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 .auto: return "AUTO" + case .manual: return "MANUAL" + case let .sdkUnknown(s): return s + } + } + } +} + extension QuickSightClientTypes { /// A control to display info icons for filters and parameters. public struct SheetControlInfoIconLabelOptions { @@ -2731,6 +2760,8 @@ extension QuickSightClientTypes { extension QuickSightClientTypes { /// The default options that correspond to the filter control type of a DateTimePicker. public struct DefaultDateTimePickerControlOptions { + /// The visibility configuration of the Apply button on a DateTimePickerControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of a control. public var displayOptions: QuickSightClientTypes.DateTimePickerControlDisplayOptions? /// The date time picker type of the DefaultDateTimePickerControlOptions. Choose one of the following options: @@ -2741,10 +2772,12 @@ extension QuickSightClientTypes { public var type: QuickSightClientTypes.SheetControlDateTimePickerType? public init( + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.DateTimePickerControlDisplayOptions? = nil, type: QuickSightClientTypes.SheetControlDateTimePickerType? = nil ) { + self.commitMode = commitMode self.displayOptions = displayOptions self.type = type } @@ -2840,6 +2873,8 @@ extension QuickSightClientTypes { extension QuickSightClientTypes { /// The default options that correspond to the Dropdown filter control type. public struct DefaultFilterDropDownControlOptions { + /// The visibility configuration of the Apply button on a FilterDropDownControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of a control. public var displayOptions: QuickSightClientTypes.DropDownControlDisplayOptions? /// A list of selectable values that are used in a control. @@ -2852,11 +2887,13 @@ extension QuickSightClientTypes { public var type: QuickSightClientTypes.SheetControlListType? public init( + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.DropDownControlDisplayOptions? = nil, selectableValues: QuickSightClientTypes.FilterSelectableValues? = nil, type: QuickSightClientTypes.SheetControlListType? = nil ) { + self.commitMode = commitMode self.displayOptions = displayOptions self.selectableValues = selectableValues self.type = type @@ -2964,13 +3001,17 @@ extension QuickSightClientTypes { extension QuickSightClientTypes { /// The default options that correspond to the RelativeDateTime filter control type. public struct DefaultRelativeDateTimeControlOptions { + /// The visibility configuration of the Apply button on a RelativeDateTimeControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of a control. public var displayOptions: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions? public init( + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions? = nil ) { + self.commitMode = commitMode self.displayOptions = displayOptions } } @@ -4790,6 +4831,8 @@ extension QuickSightClientTypes { extension QuickSightClientTypes { /// A control from a date filter that is used to specify date and time. public struct FilterDateTimePickerControl { + /// The visibility configurationof the Apply button on a DateTimePickerControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of a control. public var displayOptions: QuickSightClientTypes.DateTimePickerControlDisplayOptions? /// The ID of the FilterDateTimePickerControl. @@ -4809,6 +4852,7 @@ extension QuickSightClientTypes { public var type: QuickSightClientTypes.SheetControlDateTimePickerType? public init( + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.DateTimePickerControlDisplayOptions? = nil, filterControlId: Swift.String? = nil, sourceFilterId: Swift.String? = nil, @@ -4816,6 +4860,7 @@ extension QuickSightClientTypes { type: QuickSightClientTypes.SheetControlDateTimePickerType? = nil ) { + self.commitMode = commitMode self.displayOptions = displayOptions self.filterControlId = filterControlId self.sourceFilterId = sourceFilterId @@ -4831,6 +4876,8 @@ extension QuickSightClientTypes { public struct FilterDropDownControl { /// The values that are displayed in a control can be configured to only show values that are valid based on what's selected in other controls. public var cascadingControlConfiguration: QuickSightClientTypes.CascadingControlConfiguration? + /// The visibility configuration of the Apply button on a FilterDropDownControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of the FilterDropDownControl. public var displayOptions: QuickSightClientTypes.DropDownControlDisplayOptions? /// The ID of the FilterDropDownControl. @@ -4853,6 +4900,7 @@ extension QuickSightClientTypes { public init( cascadingControlConfiguration: QuickSightClientTypes.CascadingControlConfiguration? = nil, + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.DropDownControlDisplayOptions? = nil, filterControlId: Swift.String? = nil, selectableValues: QuickSightClientTypes.FilterSelectableValues? = nil, @@ -4862,6 +4910,7 @@ extension QuickSightClientTypes { ) { self.cascadingControlConfiguration = cascadingControlConfiguration + self.commitMode = commitMode self.displayOptions = displayOptions self.filterControlId = filterControlId self.selectableValues = selectableValues @@ -4923,6 +4972,8 @@ extension QuickSightClientTypes { extension QuickSightClientTypes { /// A control from a date filter that is used to specify the relative date. public struct FilterRelativeDateTimeControl { + /// The visibility configuration of the Apply button on a FilterRelativeDateTimeControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of a control. public var displayOptions: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions? /// The ID of the FilterTextAreaControl. @@ -4936,12 +4987,14 @@ extension QuickSightClientTypes { public var title: Swift.String? public init( + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions? = nil, filterControlId: Swift.String? = nil, sourceFilterId: Swift.String? = nil, title: Swift.String? = nil ) { + self.commitMode = commitMode self.displayOptions = displayOptions self.filterControlId = filterControlId self.sourceFilterId = sourceFilterId @@ -5857,6 +5910,8 @@ extension QuickSightClientTypes { public struct ParameterDropDownControl { /// The values that are displayed in a control can be configured to only show values that are valid based on what's selected in other controls. public var cascadingControlConfiguration: QuickSightClientTypes.CascadingControlConfiguration? + /// The visibility configuration of the Apply button on a ParameterDropDownControl. + public var commitMode: QuickSightClientTypes.CommitMode? /// The display options of a control. public var displayOptions: QuickSightClientTypes.DropDownControlDisplayOptions? /// The ID of the ParameterDropDownControl. @@ -5875,6 +5930,7 @@ extension QuickSightClientTypes { public init( cascadingControlConfiguration: QuickSightClientTypes.CascadingControlConfiguration? = nil, + commitMode: QuickSightClientTypes.CommitMode? = nil, displayOptions: QuickSightClientTypes.DropDownControlDisplayOptions? = nil, parameterControlId: Swift.String? = nil, selectableValues: QuickSightClientTypes.ParameterSelectableValues? = nil, @@ -5884,6 +5940,7 @@ extension QuickSightClientTypes { ) { self.cascadingControlConfiguration = cascadingControlConfiguration + self.commitMode = commitMode self.displayOptions = displayOptions self.parameterControlId = parameterControlId self.selectableValues = selectableValues @@ -35651,6 +35708,56 @@ public struct ListFoldersOutput { } } +public struct ListFoldersForResourceInput { + /// The ID for the Amazon Web Services account that contains the resource. + /// This member is required. + public var awsAccountId: Swift.String? + /// The maximum number of results to be returned per request. + public var maxResults: Swift.Int? + /// The token for the next set of results, or null if there are no more results. + public var nextToken: Swift.String? + /// The Amazon Resource Name (ARN) the resource whose folders you need to list. + /// This member is required. + public var resourceArn: Swift.String? + + public init( + awsAccountId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + resourceArn: Swift.String? = nil + ) + { + self.awsAccountId = awsAccountId + self.maxResults = maxResults + self.nextToken = nextToken + self.resourceArn = resourceArn + } +} + +public struct ListFoldersForResourceOutput { + /// A list that contains the Amazon Resource Names (ARNs) of all folders that the resource is a member of. + public var folders: [Swift.String]? + /// The token for the next set of results, or null if there are no more results. + public var nextToken: Swift.String? + /// The Amazon Web Services request ID for this operation. + public var requestId: Swift.String? + /// The HTTP status of the request. + public var status: Swift.Int + + public init( + folders: [Swift.String]? = nil, + nextToken: Swift.String? = nil, + requestId: Swift.String? = nil, + status: Swift.Int = 0 + ) + { + self.folders = folders + self.nextToken = nextToken + self.requestId = requestId + self.status = status + } +} + public struct ListGroupMembershipsInput { /// The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon QuickSight account. /// This member is required. @@ -41779,6 +41886,35 @@ extension ListFoldersInput { } } +extension ListFoldersForResourceInput { + + static func urlPathProvider(_ value: ListFoldersForResourceInput) -> Swift.String? { + guard let awsAccountId = value.awsAccountId else { + return nil + } + guard let resourceArn = value.resourceArn else { + return nil + } + return "/accounts/\(awsAccountId.urlPercentEncoding())/resource/\(resourceArn.urlPercentEncoding())/folders" + } +} + +extension ListFoldersForResourceInput { + + static func queryItemProvider(_ value: ListFoldersForResourceInput) throws -> [Smithy.URIQueryItem] { + var items = [Smithy.URIQueryItem]() + if let nextToken = value.nextToken { + let nextTokenQueryItem = Smithy.URIQueryItem(name: "next-token".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = value.maxResults { + let maxResultsQueryItem = Smithy.URIQueryItem(name: "max-results".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + return items + } +} + extension ListGroupMembershipsInput { static func urlPathProvider(_ value: ListGroupMembershipsInput) -> Swift.String? { @@ -45389,6 +45525,21 @@ extension ListFoldersOutput { } } +extension ListFoldersForResourceOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListFoldersForResourceOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ListFoldersForResourceOutput() + value.folders = try reader["Folders"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + value.requestId = try reader["RequestId"].readIfPresent() + value.status = httpResponse.statusCode.rawValue + return value + } +} + extension ListGroupMembershipsOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListGroupMembershipsOutput { @@ -48544,6 +48695,26 @@ enum ListFoldersOutputError { } } +enum ListFoldersForResourceOutputError { + + 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) + case "InvalidNextTokenException": return try InvalidNextTokenException.makeError(baseError: baseError) + case "InvalidParameterValueException": return try InvalidParameterValueException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "UnsupportedUserEditionException": return try UnsupportedUserEditionException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListGroupMembershipsOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -51235,6 +51406,7 @@ extension QuickSightClientTypes.DefaultRelativeDateTimeControlOptions { static func write(value: QuickSightClientTypes.DefaultRelativeDateTimeControlOptions?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions.write(value:to:)) } @@ -51242,6 +51414,7 @@ extension QuickSightClientTypes.DefaultRelativeDateTimeControlOptions { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = QuickSightClientTypes.DefaultRelativeDateTimeControlOptions() value.displayOptions = try reader["DisplayOptions"].readIfPresent(with: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions.read(from:)) + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } @@ -51483,6 +51656,7 @@ extension QuickSightClientTypes.DefaultFilterDropDownControlOptions { static func write(value: QuickSightClientTypes.DefaultFilterDropDownControlOptions?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.DropDownControlDisplayOptions.write(value:to:)) try writer["SelectableValues"].write(value.selectableValues, with: QuickSightClientTypes.FilterSelectableValues.write(value:to:)) try writer["Type"].write(value.type) @@ -51494,6 +51668,7 @@ extension QuickSightClientTypes.DefaultFilterDropDownControlOptions { value.displayOptions = try reader["DisplayOptions"].readIfPresent(with: QuickSightClientTypes.DropDownControlDisplayOptions.read(from:)) value.type = try reader["Type"].readIfPresent() value.selectableValues = try reader["SelectableValues"].readIfPresent(with: QuickSightClientTypes.FilterSelectableValues.read(from:)) + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } @@ -51606,6 +51781,7 @@ extension QuickSightClientTypes.DefaultDateTimePickerControlOptions { static func write(value: QuickSightClientTypes.DefaultDateTimePickerControlOptions?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.DateTimePickerControlDisplayOptions.write(value:to:)) try writer["Type"].write(value.type) } @@ -51615,6 +51791,7 @@ extension QuickSightClientTypes.DefaultDateTimePickerControlOptions { var value = QuickSightClientTypes.DefaultDateTimePickerControlOptions() value.type = try reader["Type"].readIfPresent() value.displayOptions = try reader["DisplayOptions"].readIfPresent(with: QuickSightClientTypes.DateTimePickerControlDisplayOptions.read(from:)) + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } @@ -59636,6 +59813,7 @@ extension QuickSightClientTypes.FilterRelativeDateTimeControl { static func write(value: QuickSightClientTypes.FilterRelativeDateTimeControl?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions.write(value:to:)) try writer["FilterControlId"].write(value.filterControlId) try writer["SourceFilterId"].write(value.sourceFilterId) @@ -59649,6 +59827,7 @@ extension QuickSightClientTypes.FilterRelativeDateTimeControl { value.title = try reader["Title"].readIfPresent() ?? "" value.sourceFilterId = try reader["SourceFilterId"].readIfPresent() ?? "" value.displayOptions = try reader["DisplayOptions"].readIfPresent(with: QuickSightClientTypes.RelativeDateTimeControlDisplayOptions.read(from:)) + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } @@ -59731,6 +59910,7 @@ extension QuickSightClientTypes.FilterDropDownControl { static func write(value: QuickSightClientTypes.FilterDropDownControl?, to writer: SmithyJSON.Writer) throws { guard let value else { return } try writer["CascadingControlConfiguration"].write(value.cascadingControlConfiguration, with: QuickSightClientTypes.CascadingControlConfiguration.write(value:to:)) + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.DropDownControlDisplayOptions.write(value:to:)) try writer["FilterControlId"].write(value.filterControlId) try writer["SelectableValues"].write(value.selectableValues, with: QuickSightClientTypes.FilterSelectableValues.write(value:to:)) @@ -59749,6 +59929,7 @@ extension QuickSightClientTypes.FilterDropDownControl { value.type = try reader["Type"].readIfPresent() value.selectableValues = try reader["SelectableValues"].readIfPresent(with: QuickSightClientTypes.FilterSelectableValues.read(from:)) value.cascadingControlConfiguration = try reader["CascadingControlConfiguration"].readIfPresent(with: QuickSightClientTypes.CascadingControlConfiguration.read(from:)) + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } @@ -59784,6 +59965,7 @@ extension QuickSightClientTypes.FilterDateTimePickerControl { static func write(value: QuickSightClientTypes.FilterDateTimePickerControl?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.DateTimePickerControlDisplayOptions.write(value:to:)) try writer["FilterControlId"].write(value.filterControlId) try writer["SourceFilterId"].write(value.sourceFilterId) @@ -59799,6 +59981,7 @@ extension QuickSightClientTypes.FilterDateTimePickerControl { value.sourceFilterId = try reader["SourceFilterId"].readIfPresent() ?? "" value.displayOptions = try reader["DisplayOptions"].readIfPresent(with: QuickSightClientTypes.DateTimePickerControlDisplayOptions.read(from:)) value.type = try reader["Type"].readIfPresent() + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } @@ -59904,6 +60087,7 @@ extension QuickSightClientTypes.ParameterDropDownControl { static func write(value: QuickSightClientTypes.ParameterDropDownControl?, to writer: SmithyJSON.Writer) throws { guard let value else { return } try writer["CascadingControlConfiguration"].write(value.cascadingControlConfiguration, with: QuickSightClientTypes.CascadingControlConfiguration.write(value:to:)) + try writer["CommitMode"].write(value.commitMode) try writer["DisplayOptions"].write(value.displayOptions, with: QuickSightClientTypes.DropDownControlDisplayOptions.write(value:to:)) try writer["ParameterControlId"].write(value.parameterControlId) try writer["SelectableValues"].write(value.selectableValues, with: QuickSightClientTypes.ParameterSelectableValues.write(value:to:)) @@ -59922,6 +60106,7 @@ extension QuickSightClientTypes.ParameterDropDownControl { value.type = try reader["Type"].readIfPresent() value.selectableValues = try reader["SelectableValues"].readIfPresent(with: QuickSightClientTypes.ParameterSelectableValues.read(from:)) value.cascadingControlConfiguration = try reader["CascadingControlConfiguration"].readIfPresent(with: QuickSightClientTypes.CascadingControlConfiguration.read(from:)) + value.commitMode = try reader["CommitMode"].readIfPresent() return value } } diff --git a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Paginators.swift b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Paginators.swift index ede1b030e61..f8b2c10104e 100644 --- a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Paginators.swift +++ b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/Paginators.swift @@ -357,6 +357,38 @@ extension PaginatorSequence where OperationStackInput == ListFoldersInput, Opera return try await self.asyncCompactMap { item in item.folderSummaryList } } } +extension QuickSightClient { + /// Paginate over `[ListFoldersForResourceOutput]` results. + /// + /// When this operation is called, an `AsyncSequence` is created. AsyncSequences are lazy so no service + /// calls are made until the sequence is iterated over. This also means there is no guarantee that the request is valid + /// until then. If there are errors in your request, you will see the failures only after you start iterating. + /// - Parameters: + /// - input: A `[ListFoldersForResourceInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListFoldersForResourceOutput` + public func listFoldersForResourcePaginated(input: ListFoldersForResourceInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listFoldersForResource(input:)) + } +} + +extension ListFoldersForResourceInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListFoldersForResourceInput { + return ListFoldersForResourceInput( + awsAccountId: self.awsAccountId, + maxResults: self.maxResults, + nextToken: token, + resourceArn: self.resourceArn + )} +} + +extension PaginatorSequence where OperationStackInput == ListFoldersForResourceInput, OperationStackOutput == ListFoldersForResourceOutput { + /// This paginator transforms the `AsyncSequence` returned by `listFoldersForResourcePaginated` + /// to access the nested member `[Swift.String]` + /// - Returns: `[Swift.String]` + public func folders() async throws -> [Swift.String] { + return try await self.asyncCompactMap { item in item.folders } + } +} extension QuickSightClient { /// Paginate over `[ListGroupMembershipsOutput]` results. /// diff --git a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift index 10fcabeea09..371e1ad2117 100644 --- a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift +++ b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift @@ -8006,6 +8006,79 @@ extension QuickSightClient { return try await op.execute(input: input) } + /// Performs the `ListFoldersForResource` operation on the `QuickSight_20180401` service. + /// + /// List all folders that a resource is a member of. + /// + /// - Parameter ListFoldersForResourceInput : [no documentation found] + /// + /// - Returns: `ListFoldersForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct credentials. + /// - `InternalFailureException` : An internal failure occurred. + /// - `InvalidNextTokenException` : The NextToken value isn't valid. + /// - `InvalidParameterValueException` : One or more parameters has a value that isn't valid. + /// - `ResourceNotFoundException` : One or more resources can't be found. + /// - `ThrottlingException` : Access is throttled. + /// - `UnsupportedUserEditionException` : This error indicates that you are calling an operation on an Amazon QuickSight subscription where the edition doesn't include support for that operation. Amazon Amazon QuickSight currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition. + public func listFoldersForResource(input: ListFoldersForResourceInput) async throws -> ListFoldersForResourceOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listFoldersForResource") + .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: "quicksight") + .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(ListFoldersForResourceInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.serialize(ClientRuntime.QueryItemMiddleware(ListFoldersForResourceInput.queryItemProvider(_:))) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ListFoldersForResourceOutput.httpOutput(from:), ListFoldersForResourceOutputError.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: "QuickSight") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListFoldersForResource") + 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 `ListGroupMemberships` operation on the `QuickSight_20180401` service. /// /// Lists member users in a group. diff --git a/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/Models.swift b/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/Models.swift index 40f5194c888..904359cf302 100644 --- a/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/Models.swift +++ b/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/Models.swift @@ -4225,6 +4225,14 @@ extension SageMakerClientTypes { case mlG54xlarge case mlG58xlarge case mlG5Xlarge + case mlG6e12xlarge + case mlG6e16xlarge + case mlG6e24xlarge + case mlG6e2xlarge + case mlG6e48xlarge + case mlG6e4xlarge + case mlG6e8xlarge + case mlG6eXlarge case mlG612xlarge case mlG616xlarge case mlG624xlarge @@ -4382,6 +4390,14 @@ extension SageMakerClientTypes { .mlG54xlarge, .mlG58xlarge, .mlG5Xlarge, + .mlG6e12xlarge, + .mlG6e16xlarge, + .mlG6e24xlarge, + .mlG6e2xlarge, + .mlG6e48xlarge, + .mlG6e4xlarge, + .mlG6e8xlarge, + .mlG6eXlarge, .mlG612xlarge, .mlG616xlarge, .mlG624xlarge, @@ -4545,6 +4561,14 @@ extension SageMakerClientTypes { case .mlG54xlarge: return "ml.g5.4xlarge" case .mlG58xlarge: return "ml.g5.8xlarge" case .mlG5Xlarge: return "ml.g5.xlarge" + case .mlG6e12xlarge: return "ml.g6e.12xlarge" + case .mlG6e16xlarge: return "ml.g6e.16xlarge" + case .mlG6e24xlarge: return "ml.g6e.24xlarge" + case .mlG6e2xlarge: return "ml.g6e.2xlarge" + case .mlG6e48xlarge: return "ml.g6e.48xlarge" + case .mlG6e4xlarge: return "ml.g6e.4xlarge" + case .mlG6e8xlarge: return "ml.g6e.8xlarge" + case .mlG6eXlarge: return "ml.g6e.xlarge" case .mlG612xlarge: return "ml.g6.12xlarge" case .mlG616xlarge: return "ml.g6.16xlarge" case .mlG624xlarge: return "ml.g6.24xlarge" diff --git a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Models.swift b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Models.swift index 450ef3f78eb..2b22c5c61f0 100644 --- a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Models.swift +++ b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Models.swift @@ -797,6 +797,133 @@ public struct UpdateBrowserSettingsOutput { } } +public struct ExpireSessionInput { + /// The ID of the web portal for the session. + /// This member is required. + public var portalId: Swift.String? + /// The ID of the session to expire. + /// This member is required. + public var sessionId: Swift.String? + + public init( + portalId: Swift.String? = nil, + sessionId: Swift.String? = nil + ) + { + self.portalId = portalId + self.sessionId = sessionId + } +} + +public struct ExpireSessionOutput { + + public init() { } +} + +public struct GetSessionInput { + /// The ID of the web portal for the session. + /// This member is required. + public var portalId: Swift.String? + /// The ID of the session. + /// This member is required. + public var sessionId: Swift.String? + + public init( + portalId: Swift.String? = nil, + sessionId: Swift.String? = nil + ) + { + self.portalId = portalId + self.sessionId = sessionId + } +} + +extension WorkSpacesWebClientTypes { + + public enum SessionStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case active + case terminated + case sdkUnknown(Swift.String) + + public static var allCases: [SessionStatus] { + return [ + .active, + .terminated + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .active: return "Active" + case .terminated: return "Terminated" + case let .sdkUnknown(s): return s + } + } + } +} + +extension WorkSpacesWebClientTypes { + /// Information about a secure browser session. + public struct Session { + /// The IP address of the client. + public var clientIpAddresses: [Swift.String]? + /// The end time of the session. + public var endTime: Foundation.Date? + /// The ARN of the web portal. + public var portalArn: Swift.String? + /// The ID of the session. + public var sessionId: Swift.String? + /// The start time of the session. + public var startTime: Foundation.Date? + /// The status of the session. + public var status: WorkSpacesWebClientTypes.SessionStatus? + /// The username of the session. + public var username: Swift.String? + + public init( + clientIpAddresses: [Swift.String]? = nil, + endTime: Foundation.Date? = nil, + portalArn: Swift.String? = nil, + sessionId: Swift.String? = nil, + startTime: Foundation.Date? = nil, + status: WorkSpacesWebClientTypes.SessionStatus? = nil, + username: Swift.String? = nil + ) + { + self.clientIpAddresses = clientIpAddresses + self.endTime = endTime + self.portalArn = portalArn + self.sessionId = sessionId + self.startTime = startTime + self.status = status + self.username = username + } + } + +} + +extension WorkSpacesWebClientTypes.Session: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "Session(endTime: \(Swift.String(describing: endTime)), portalArn: \(Swift.String(describing: portalArn)), sessionId: \(Swift.String(describing: sessionId)), startTime: \(Swift.String(describing: startTime)), status: \(Swift.String(describing: status)), clientIpAddresses: \"CONTENT_REDACTED\", username: \"CONTENT_REDACTED\")"} +} + +public struct GetSessionOutput { + /// The sessions in a list. + public var session: WorkSpacesWebClientTypes.Session? + + public init( + session: WorkSpacesWebClientTypes.Session? = nil + ) + { + self.session = session + } +} + extension WorkSpacesWebClientTypes { public enum IdentityProviderType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { @@ -1592,6 +1719,135 @@ public struct UpdateIpAccessSettingsOutput { } } +extension WorkSpacesWebClientTypes { + + public enum SessionSortBy: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case startTimeAscending + case startTimeDescending + case sdkUnknown(Swift.String) + + public static var allCases: [SessionSortBy] { + return [ + .startTimeAscending, + .startTimeDescending + ] + } + + 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 .startTimeAscending: return "StartTimeAscending" + case .startTimeDescending: return "StartTimeDescending" + case let .sdkUnknown(s): return s + } + } + } +} + +public struct ListSessionsInput { + /// The maximum number of results to be included in the next page. + public var maxResults: Swift.Int? + /// The pagination token used to retrieve the next page of results for this operation. + public var nextToken: Swift.String? + /// The ID of the web portal for the sessions. + /// This member is required. + public var portalId: Swift.String? + /// The ID of the session. + public var sessionId: Swift.String? + /// The method in which the returned sessions should be sorted. + public var sortBy: WorkSpacesWebClientTypes.SessionSortBy? + /// The status of the session. + public var status: WorkSpacesWebClientTypes.SessionStatus? + /// The username of the session. + public var username: Swift.String? + + public init( + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + portalId: Swift.String? = nil, + sessionId: Swift.String? = nil, + sortBy: WorkSpacesWebClientTypes.SessionSortBy? = nil, + status: WorkSpacesWebClientTypes.SessionStatus? = nil, + username: Swift.String? = nil + ) + { + self.maxResults = maxResults + self.nextToken = nextToken + self.portalId = portalId + self.sessionId = sessionId + self.sortBy = sortBy + self.status = status + self.username = username + } +} + +extension ListSessionsInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "ListSessionsInput(maxResults: \(Swift.String(describing: maxResults)), nextToken: \(Swift.String(describing: nextToken)), portalId: \(Swift.String(describing: portalId)), sessionId: \(Swift.String(describing: sessionId)), sortBy: \(Swift.String(describing: sortBy)), status: \(Swift.String(describing: status)), username: \"CONTENT_REDACTED\")"} +} + +extension WorkSpacesWebClientTypes { + /// Summary information about a secure browser session. + public struct SessionSummary { + /// The end time of the session. + public var endTime: Foundation.Date? + /// The ARN of the web portal. + public var portalArn: Swift.String? + /// The ID of the session. + public var sessionId: Swift.String? + /// The start time of the session. + public var startTime: Foundation.Date? + /// The status of the session. + public var status: WorkSpacesWebClientTypes.SessionStatus? + /// The username of the session. + public var username: Swift.String? + + public init( + endTime: Foundation.Date? = nil, + portalArn: Swift.String? = nil, + sessionId: Swift.String? = nil, + startTime: Foundation.Date? = nil, + status: WorkSpacesWebClientTypes.SessionStatus? = nil, + username: Swift.String? = nil + ) + { + self.endTime = endTime + self.portalArn = portalArn + self.sessionId = sessionId + self.startTime = startTime + self.status = status + self.username = username + } + } + +} + +extension WorkSpacesWebClientTypes.SessionSummary: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "SessionSummary(endTime: \(Swift.String(describing: endTime)), portalArn: \(Swift.String(describing: portalArn)), sessionId: \(Swift.String(describing: sessionId)), startTime: \(Swift.String(describing: startTime)), status: \(Swift.String(describing: status)), username: \"CONTENT_REDACTED\")"} +} + +public struct ListSessionsOutput { + /// The pagination token used to retrieve the next page of results for this operation. + public var nextToken: Swift.String? + /// The sessions in a list. + /// This member is required. + public var sessions: [WorkSpacesWebClientTypes.SessionSummary]? + + public init( + nextToken: Swift.String? = nil, + sessions: [WorkSpacesWebClientTypes.SessionSummary]? = nil + ) + { + self.nextToken = nextToken + self.sessions = sessions + } +} + public struct ListTagsForResourceInput { /// The ARN of the resource. /// This member is required. @@ -1903,7 +2159,7 @@ extension WorkSpacesWebClientTypes { public struct CreatePortalInput { /// The additional encryption context of the portal. public var additionalEncryptionContext: [Swift.String: Swift.String]? - /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center (successor to Single Sign-On). Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. + /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center. Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. public var authenticationType: WorkSpacesWebClientTypes.AuthenticationType? /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. public var clientToken: Swift.String? @@ -2165,7 +2421,7 @@ extension WorkSpacesWebClientTypes { public struct Portal { /// The additional encryption context of the portal. public var additionalEncryptionContext: [Swift.String: Swift.String]? - /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center (successor to Single Sign-On). Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. + /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center. Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. public var authenticationType: WorkSpacesWebClientTypes.AuthenticationType? /// The ARN of the browser settings that is associated with this web portal. public var browserSettingsArn: Swift.String? @@ -2315,7 +2571,7 @@ public struct ListPortalsInput { extension WorkSpacesWebClientTypes { /// The summary of the portal. public struct PortalSummary { - /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center (successor to Single Sign-On). Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. + /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center. Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. public var authenticationType: WorkSpacesWebClientTypes.AuthenticationType? /// The ARN of the browser settings that is associated with the web portal. public var browserSettingsArn: Swift.String? @@ -2411,7 +2667,7 @@ public struct ListPortalsOutput { } public struct UpdatePortalInput { - /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center (successor to Single Sign-On). Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. + /// The type of authentication integration points used when signing into the web portal. Defaults to Standard. Standard web portals are authenticated directly through your identity provider. You need to call CreateIdentityProvider to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider. IAM Identity Center web portals are authenticated through IAM Identity Center. Identity sources (including external identity provider integration), plus user and group access to your web portal, can be configured in the IAM Identity Center. public var authenticationType: WorkSpacesWebClientTypes.AuthenticationType? /// The name of the web portal. This is not visible to users who log into the web portal. public var displayName: Swift.String? @@ -3855,6 +4111,19 @@ extension DisassociateUserSettingsInput { } } +extension ExpireSessionInput { + + static func urlPathProvider(_ value: ExpireSessionInput) -> Swift.String? { + guard let portalId = value.portalId else { + return nil + } + guard let sessionId = value.sessionId else { + return nil + } + return "/portals/\(portalId.urlPercentEncoding())/sessions/\(sessionId.urlPercentEncoding())" + } +} + extension GetBrowserSettingsInput { static func urlPathProvider(_ value: GetBrowserSettingsInput) -> Swift.String? { @@ -3915,6 +4184,19 @@ extension GetPortalServiceProviderMetadataInput { } } +extension GetSessionInput { + + static func urlPathProvider(_ value: GetSessionInput) -> Swift.String? { + guard let portalId = value.portalId else { + return nil + } + guard let sessionId = value.sessionId else { + return nil + } + return "/portals/\(portalId.urlPercentEncoding())/sessions/\(sessionId.urlPercentEncoding())" + } +} + extension GetTrustStoreInput { static func urlPathProvider(_ value: GetTrustStoreInput) -> Swift.String? { @@ -4087,6 +4369,48 @@ extension ListPortalsInput { } } +extension ListSessionsInput { + + static func urlPathProvider(_ value: ListSessionsInput) -> Swift.String? { + guard let portalId = value.portalId else { + return nil + } + return "/portals/\(portalId.urlPercentEncoding())/sessions" + } +} + +extension ListSessionsInput { + + static func queryItemProvider(_ value: ListSessionsInput) throws -> [Smithy.URIQueryItem] { + var items = [Smithy.URIQueryItem]() + if let maxResults = value.maxResults { + let maxResultsQueryItem = Smithy.URIQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + if let nextToken = value.nextToken { + let nextTokenQueryItem = Smithy.URIQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let sortBy = value.sortBy { + let sortByQueryItem = Smithy.URIQueryItem(name: "sortBy".urlPercentEncoding(), value: Swift.String(sortBy.rawValue).urlPercentEncoding()) + items.append(sortByQueryItem) + } + if let sessionId = value.sessionId { + let sessionIdQueryItem = Smithy.URIQueryItem(name: "sessionId".urlPercentEncoding(), value: Swift.String(sessionId).urlPercentEncoding()) + items.append(sessionIdQueryItem) + } + if let username = value.username { + let usernameQueryItem = Smithy.URIQueryItem(name: "username".urlPercentEncoding(), value: Swift.String(username).urlPercentEncoding()) + items.append(usernameQueryItem) + } + if let status = value.status { + let statusQueryItem = Smithy.URIQueryItem(name: "status".urlPercentEncoding(), value: Swift.String(status.rawValue).urlPercentEncoding()) + items.append(statusQueryItem) + } + return items + } +} + extension ListTagsForResourceInput { static func urlPathProvider(_ value: ListTagsForResourceInput) -> Swift.String? { @@ -4785,6 +5109,13 @@ extension DisassociateUserSettingsOutput { } } +extension ExpireSessionOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ExpireSessionOutput { + return ExpireSessionOutput() + } +} + extension GetBrowserSettingsOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetBrowserSettingsOutput { @@ -4858,6 +5189,18 @@ extension GetPortalServiceProviderMetadataOutput { } } +extension GetSessionOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetSessionOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = GetSessionOutput() + value.session = try reader["session"].readIfPresent(with: WorkSpacesWebClientTypes.Session.read(from:)) + return value + } +} + extension GetTrustStoreOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetTrustStoreOutput { @@ -4972,6 +5315,19 @@ extension ListPortalsOutput { } } +extension ListSessionsOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListSessionsOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ListSessionsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.sessions = try reader["sessions"].readListIfPresent(memberReadingClosure: WorkSpacesWebClientTypes.SessionSummary.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + return value + } +} + extension ListTagsForResourceOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListTagsForResourceOutput { @@ -5674,6 +6030,24 @@ enum DisassociateUserSettingsOutputError { } } +enum ExpireSessionOutputError { + + 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 GetBrowserSettingsOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -5782,6 +6156,24 @@ enum GetPortalServiceProviderMetadataOutputError { } } +enum GetSessionOutputError { + + 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 GetTrustStoreOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -5939,6 +6331,24 @@ enum ListPortalsOutputError { } } +enum ListSessionsOutputError { + + 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 ListTagsForResourceOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -6438,6 +6848,22 @@ extension WorkSpacesWebClientTypes.Portal { } } +extension WorkSpacesWebClientTypes.Session { + + static func read(from reader: SmithyJSON.Reader) throws -> WorkSpacesWebClientTypes.Session { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = WorkSpacesWebClientTypes.Session() + value.portalArn = try reader["portalArn"].readIfPresent() + value.sessionId = try reader["sessionId"].readIfPresent() + value.username = try reader["username"].readIfPresent() + value.clientIpAddresses = try reader["clientIpAddresses"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) + value.status = try reader["status"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + value.endTime = try reader["endTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + return value + } +} + extension WorkSpacesWebClientTypes.TrustStore { static func read(from reader: SmithyJSON.Reader) throws -> WorkSpacesWebClientTypes.TrustStore { @@ -6605,6 +7031,21 @@ extension WorkSpacesWebClientTypes.PortalSummary { } } +extension WorkSpacesWebClientTypes.SessionSummary { + + static func read(from reader: SmithyJSON.Reader) throws -> WorkSpacesWebClientTypes.SessionSummary { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = WorkSpacesWebClientTypes.SessionSummary() + value.portalArn = try reader["portalArn"].readIfPresent() + value.sessionId = try reader["sessionId"].readIfPresent() + value.username = try reader["username"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + value.endTime = try reader["endTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + return value + } +} + extension WorkSpacesWebClientTypes.Tag { static func write(value: WorkSpacesWebClientTypes.Tag?, to writer: SmithyJSON.Writer) throws { diff --git a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Paginators.swift b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Paginators.swift new file mode 100644 index 00000000000..b2c1d556084 --- /dev/null +++ b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/Paginators.swift @@ -0,0 +1,47 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +import protocol ClientRuntime.PaginateToken +import struct ClientRuntime.PaginatorSequence + +extension WorkSpacesWebClient { + /// Paginate over `[ListSessionsOutput]` results. + /// + /// When this operation is called, an `AsyncSequence` is created. AsyncSequences are lazy so no service + /// calls are made until the sequence is iterated over. This also means there is no guarantee that the request is valid + /// until then. If there are errors in your request, you will see the failures only after you start iterating. + /// - Parameters: + /// - input: A `[ListSessionsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListSessionsOutput` + public func listSessionsPaginated(input: ListSessionsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listSessions(input:)) + } +} + +extension ListSessionsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListSessionsInput { + return ListSessionsInput( + maxResults: self.maxResults, + nextToken: token, + portalId: self.portalId, + sessionId: self.sessionId, + sortBy: self.sortBy, + status: self.status, + username: self.username + )} +} + +extension PaginatorSequence where OperationStackInput == ListSessionsInput, OperationStackOutput == ListSessionsOutput { + /// This paginator transforms the `AsyncSequence` returned by `listSessionsPaginated` + /// to access the nested member `[WorkSpacesWebClientTypes.SessionSummary]` + /// - Returns: `[WorkSpacesWebClientTypes.SessionSummary]` + public func sessions() async throws -> [WorkSpacesWebClientTypes.SessionSummary] { + return try await self.asyncCompactMap { item in item.sessions } + } +} diff --git a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift index b48019d0511..66efaea0744 100644 --- a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift +++ b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift @@ -2216,6 +2216,76 @@ extension WorkSpacesWebClient { return try await op.execute(input: input) } + /// Performs the `ExpireSession` operation on the `AWSErmineControlPlaneService` service. + /// + /// Expires an active secure browser session. + /// + /// - Parameter ExpireSessionInput : [no documentation found] + /// + /// - Returns: `ExpireSessionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Access is denied. + /// - `InternalServerException` : There is an internal server error. + /// - `ResourceNotFoundException` : The resource cannot be found. + /// - `ThrottlingException` : There is a throttling error. + /// - `ValidationException` : There is a validation error. + public func expireSession(input: ExpireSessionInput) async throws -> ExpireSessionOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "expireSession") + .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: "workspaces-web") + .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(ExpireSessionInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ExpireSessionOutput.httpOutput(from:), ExpireSessionOutputError.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: "WorkSpacesWeb") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ExpireSession") + 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 `GetBrowserSettings` operation on the `AWSErmineControlPlaneService` service. /// /// Gets browser settings. @@ -2636,6 +2706,76 @@ extension WorkSpacesWebClient { return try await op.execute(input: input) } + /// Performs the `GetSession` operation on the `AWSErmineControlPlaneService` service. + /// + /// Gets information for a secure browser session. + /// + /// - Parameter GetSessionInput : [no documentation found] + /// + /// - Returns: `GetSessionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Access is denied. + /// - `InternalServerException` : There is an internal server error. + /// - `ResourceNotFoundException` : The resource cannot be found. + /// - `ThrottlingException` : There is a throttling error. + /// - `ValidationException` : There is a validation error. + public func getSession(input: GetSessionInput) async throws -> GetSessionOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getSession") + .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: "workspaces-web") + .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(GetSessionInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(GetSessionOutput.httpOutput(from:), GetSessionOutputError.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: "WorkSpacesWeb") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "GetSession") + 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 `GetTrustStore` operation on the `AWSErmineControlPlaneService` service. /// /// Gets the trust store. @@ -3267,6 +3407,77 @@ extension WorkSpacesWebClient { return try await op.execute(input: input) } + /// Performs the `ListSessions` operation on the `AWSErmineControlPlaneService` service. + /// + /// Lists information for multiple secure browser sessions from a specific portal. + /// + /// - Parameter ListSessionsInput : [no documentation found] + /// + /// - Returns: `ListSessionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : Access is denied. + /// - `InternalServerException` : There is an internal server error. + /// - `ResourceNotFoundException` : The resource cannot be found. + /// - `ThrottlingException` : There is a throttling error. + /// - `ValidationException` : There is a validation error. + public func listSessions(input: ListSessionsInput) async throws -> ListSessionsOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listSessions") + .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: "workspaces-web") + .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(ListSessionsInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.serialize(ClientRuntime.QueryItemMiddleware(ListSessionsInput.queryItemProvider(_:))) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ListSessionsOutput.httpOutput(from:), ListSessionsOutputError.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: "WorkSpacesWeb") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListSessions") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListTagsForResource` operation on the `AWSErmineControlPlaneService` service. /// /// Retrieves a list of tags for a resource. diff --git a/packageDependencies.plist b/packageDependencies.plist index efd027b1029..dd91abcb75d 100644 --- a/packageDependencies.plist +++ b/packageDependencies.plist @@ -9,6 +9,6 @@ clientRuntimeBranch main clientRuntimeVersion - 0.72.0 + 0.73.0