From 07e658e0fdc8a46923156c30a76fdd5d7427465e Mon Sep 17 00:00:00 2001 From: Konstantin Novichikhin Date: Fri, 27 Oct 2023 01:10:13 -0400 Subject: [PATCH] Code generate with EventBridge Scheduler client and Go SDK v1.46.5 models. (#144) --- Package.swift | 15 + .../AppConfigClient/AWSAppConfigClient.swift | 24 +- .../AppConfigClientProtocol+async.swift | 8 +- .../AppConfigClientProtocol.swift | 16 +- .../AppConfigClientProtocolV2.swift | 8 +- .../AppConfigOperationsClientOutput.swift | 1 + .../AppConfigClient/MockAppConfigClient.swift | 16 +- .../MockAppConfigClientV2.swift | 8 +- .../ThrowingAppConfigClient.swift | 16 +- .../ThrowingAppConfigClientV2.swift | 8 +- .../AppConfigModelDefaultInstances.swift | 14 +- .../AppConfigModelOperations.swift | 30 +- .../AppConfigModelStructures.swift | 62 +- .../AppConfigModel/AppConfigModelTypes.swift | 62 +- .../AWSCloudformationClient.swift | 118 ++ .../CloudformationClientProtocol+async.swift | 27 + .../CloudformationClientProtocol.swift | 31 + .../CloudformationClientProtocolV2.swift | 14 + .../CloudformationInvocationsReporting.swift | 3 + .../CloudformationOperationsClientInput.swift | 5 + ...CloudformationOperationsClientOutput.swift | 13 + .../CloudformationOperationsReporting.swift | 3 + .../MockCloudformationClient.swift | 46 + .../MockCloudformationClientV2.swift | 21 + .../ThrowingCloudformationClient.swift | 44 + .../ThrowingCloudformationClientV2.swift | 21 + .../CloudformationModelDefaultInstances.swift | 96 +- .../CloudformationModelOperations.swift | 3 + .../CloudformationModelStructures.swift | 193 ++- .../CloudformationModelTypes.swift | 19 +- .../CodePipelineModelDefaultInstances.swift | 102 +- .../CodePipelineModelStructures.swift | 180 ++- .../CodePipelineModelTypes.swift | 228 ++- .../DynamoDBModelDefaultInstances.swift | 21 +- .../DynamoDBModelStructures.swift | 47 +- .../DynamoDBModel/DynamoDBModelTypes.swift | 38 + Sources/ECRClient/AWSECRClient.swift | 30 +- .../ECRClient/ECRClientProtocol+async.swift | 10 +- Sources/ECRClient/ECRClientProtocol.swift | 20 +- Sources/ECRClient/ECRClientProtocolV2.swift | 10 +- Sources/ECRClient/MockECRClient.swift | 20 +- Sources/ECRClient/MockECRClientV2.swift | 10 +- Sources/ECRClient/ThrowingECRClient.swift | 20 +- Sources/ECRClient/ThrowingECRClientV2.swift | 10 +- .../ECRModel/ECRModelDefaultInstances.swift | 4 +- Sources/ECRModel/ECRModelStructures.swift | 8 +- .../AWSElasticComputeCloudClient.swift | 711 +++++++- ...sticComputeCloudClientProtocol+async.swift | 170 +- .../ElasticComputeCloudClientProtocol.swift | 189 ++- .../ElasticComputeCloudClientProtocolV2.swift | 84 +- ...sticComputeCloudInvocationsReporting.swift | 18 + ...ticComputeCloudOperationsClientInput.swift | 30 + ...icComputeCloudOperationsClientOutput.swift | 91 ++ ...asticComputeCloudOperationsReporting.swift | 18 + .../MockElasticComputeCloudClient.swift | 280 +++- .../MockElasticComputeCloudClientV2.swift | 125 +- .../ThrowingElasticComputeCloudClient.swift | 265 ++- .../ThrowingElasticComputeCloudClientV2.swift | 124 +- ...ticComputeCloudModelDefaultInstances.swift | 300 +++- .../ElasticComputeCloudModelOperations.swift | 18 + .../ElasticComputeCloudModelStructures.swift | 551 ++++++- .../ElasticComputeCloudModelTypes.swift | 260 ++- .../ElasticContainerModelTypes.swift | 1 + Sources/RDSClient/AWSRDSClient.swift | 372 ++++- Sources/RDSClient/MockRDSClient.swift | 150 +- Sources/RDSClient/MockRDSClientV2.swift | 69 +- .../RDSClient/RDSClientProtocol+async.swift | 87 +- Sources/RDSClient/RDSClientProtocol.swift | 105 +- Sources/RDSClient/RDSClientProtocolV2.swift | 48 +- .../RDSClient/RDSInvocationsReporting.swift | 9 + .../RDSClient/RDSOperationsClientInput.swift | 15 + .../RDSClient/RDSOperationsClientOutput.swift | 39 + .../RDSClient/RDSOperationsReporting.swift | 9 + Sources/RDSClient/ThrowingRDSClient.swift | 144 +- Sources/RDSClient/ThrowingRDSClientV2.swift | 69 +- .../RDSModel/RDSModelDefaultInstances.swift | 228 ++- Sources/RDSModel/RDSModelErrors.swift | 15 + Sources/RDSModel/RDSModelOperations.swift | 9 + Sources/RDSModel/RDSModelStructures.swift | 468 +++++- Sources/RDSModel/RDSModelTypes.swift | 62 + Sources/S3Model/S3ModelTypes.swift | 5 + .../SchedulerClient/AWSSchedulerClient.swift | 1426 +++++++++++++++++ .../AWSSchedulerClientGenerator.swift | 141 ++ .../SchedulerClient/MockSchedulerClient.swift | 591 +++++++ .../MockSchedulerClientV2.swift | 293 ++++ .../SchedulerClientProtocol+async.swift | 358 +++++ .../SchedulerClientProtocol.swift | 404 +++++ .../SchedulerClientProtocolV2.swift | 202 +++ .../SchedulerInvocationsReporting.swift | 71 + .../SchedulerOperationsClientInput.swift | 253 +++ .../SchedulerOperationsClientOutput.swift | 181 +++ .../SchedulerOperationsReporting.swift | 70 + .../ThrowingSchedulerClient.swift | 569 +++++++ .../ThrowingSchedulerClientV2.swift | 295 ++++ .../SchedulerModelDefaultInstances.swift | 708 ++++++++ .../SchedulerModel/SchedulerModelErrors.swift | 96 ++ .../SchedulerModelOperations.swift | 785 +++++++++ .../SchedulerModelStructures.swift | 1244 ++++++++++++++ .../SchedulerModel/SchedulerModelTypes.swift | 1270 +++++++++++++++ .../SecurityTokenModelDefaultInstances.swift | 14 + .../SecurityTokenModelStructures.swift | 32 +- .../SecurityTokenModelTypes.swift | 60 + .../AWSSimpleNotificationClient.swift | 24 +- .../MockSimpleNotificationClient.swift | 16 +- .../MockSimpleNotificationClientV2.swift | 8 +- ...mpleNotificationClientProtocol+async.swift | 8 +- .../SimpleNotificationClientProtocol.swift | 16 +- .../SimpleNotificationClientProtocolV2.swift | 8 +- .../ThrowingSimpleNotificationClient.swift | 16 +- .../ThrowingSimpleNotificationClientV2.swift | 8 +- ...pleNotificationModelDefaultInstances.swift | 24 + .../SimpleNotificationModelErrors.swift | 10 + .../SimpleNotificationModelStructures.swift | 30 + .../SimpleWorkflowModelDefaultInstances.swift | 7 +- .../SimpleWorkflowModelStructures.swift | 29 +- .../SimpleWorkflowModelTypes.swift | 3 +- 116 files changed, 15786 insertions(+), 325 deletions(-) create mode 100644 Sources/SchedulerClient/AWSSchedulerClient.swift create mode 100644 Sources/SchedulerClient/AWSSchedulerClientGenerator.swift create mode 100644 Sources/SchedulerClient/MockSchedulerClient.swift create mode 100644 Sources/SchedulerClient/MockSchedulerClientV2.swift create mode 100644 Sources/SchedulerClient/SchedulerClientProtocol+async.swift create mode 100644 Sources/SchedulerClient/SchedulerClientProtocol.swift create mode 100644 Sources/SchedulerClient/SchedulerClientProtocolV2.swift create mode 100644 Sources/SchedulerClient/SchedulerInvocationsReporting.swift create mode 100644 Sources/SchedulerClient/SchedulerOperationsClientInput.swift create mode 100644 Sources/SchedulerClient/SchedulerOperationsClientOutput.swift create mode 100644 Sources/SchedulerClient/SchedulerOperationsReporting.swift create mode 100644 Sources/SchedulerClient/ThrowingSchedulerClient.swift create mode 100644 Sources/SchedulerClient/ThrowingSchedulerClientV2.swift create mode 100644 Sources/SchedulerModel/SchedulerModelDefaultInstances.swift create mode 100644 Sources/SchedulerModel/SchedulerModelErrors.swift create mode 100644 Sources/SchedulerModel/SchedulerModelOperations.swift create mode 100644 Sources/SchedulerModel/SchedulerModelStructures.swift create mode 100644 Sources/SchedulerModel/SchedulerModelTypes.swift diff --git a/Package.swift b/Package.swift index 89ed0a8..13edd63 100644 --- a/Package.swift +++ b/Package.swift @@ -88,6 +88,12 @@ let package = Package( .library( name: "S3Model", targets: ["S3Model"]), + .library( + name: "SchedulerClient", + targets: ["SchedulerClient"]), + .library( + name: "SchedulerModel", + targets: ["SchedulerModel"]), .library( name: "SecurityTokenClient", targets: ["SecurityTokenClient"]), @@ -241,6 +247,15 @@ let package = Package( name: "S3Model", dependencies: [ .product(name: "Logging", package: "swift-log"), ]), + .target( + name: "SchedulerClient", dependencies: [ + .target(name: "SchedulerModel"), + .target(name: "SmokeAWSHttp"), + ]), + .target( + name: "SchedulerModel", dependencies: [ + .product(name: "Logging", package: "swift-log"), + ]), .target( name: "SecurityTokenClient", dependencies: [ .target(name: "SecurityTokenModel"), diff --git a/Sources/AppConfigClient/AWSAppConfigClient.swift b/Sources/AppConfigClient/AWSAppConfigClient.swift index ada9e81..74e759e 100644 --- a/Sources/AppConfigClient/AWSAppConfigClient.swift +++ b/Sources/AppConfigClient/AWSAppConfigClient.swift @@ -173,7 +173,7 @@ public struct AWSAppConfigClient AppConfigModel.Application { @@ -243,7 +243,7 @@ public struct AWSAppConfigClient AppConfigModel.ConfigurationProfile { @@ -313,7 +313,7 @@ public struct AWSAppConfigClient AppConfigModel.DeploymentStrategy { @@ -383,7 +383,7 @@ public struct AWSAppConfigClient AppConfigModel.Environment { @@ -3154,7 +3154,7 @@ public struct AWSAppConfigClient AppConfigModel.Application { @@ -3190,7 +3190,7 @@ public struct AWSAppConfigClient AppConfigModel.ConfigurationProfile { @@ -3226,7 +3226,7 @@ public struct AWSAppConfigClient AppConfigModel.DeploymentStrategy { @@ -3262,7 +3262,7 @@ public struct AWSAppConfigClient AppConfigModel.Environment { diff --git a/Sources/AppConfigClient/AppConfigClientProtocol+async.swift b/Sources/AppConfigClient/AppConfigClientProtocol+async.swift index 337dbb8..7a077d5 100644 --- a/Sources/AppConfigClient/AppConfigClientProtocol+async.swift +++ b/Sources/AppConfigClient/AppConfigClientProtocol+async.swift @@ -37,7 +37,7 @@ public extension AppConfigClientProtocol { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ func createApplication(input: AppConfigModel.CreateApplicationRequest) async throws -> AppConfigModel.Application { @@ -64,7 +64,7 @@ public extension AppConfigClientProtocol { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createConfigurationProfile(input: AppConfigModel.CreateConfigurationProfileRequest) async throws -> AppConfigModel.ConfigurationProfile { @@ -91,7 +91,7 @@ public extension AppConfigClientProtocol { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ func createDeploymentStrategy(input: AppConfigModel.CreateDeploymentStrategyRequest) async throws -> AppConfigModel.DeploymentStrategy { @@ -118,7 +118,7 @@ public extension AppConfigClientProtocol { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createEnvironment(input: AppConfigModel.CreateEnvironmentRequest) async throws -> AppConfigModel.Environment { diff --git a/Sources/AppConfigClient/AppConfigClientProtocol.swift b/Sources/AppConfigClient/AppConfigClientProtocol.swift index b486d44..a16eb04 100644 --- a/Sources/AppConfigClient/AppConfigClientProtocol.swift +++ b/Sources/AppConfigClient/AppConfigClientProtocol.swift @@ -253,7 +253,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - completion: The Application object or an error will be passed to this callback when the operation is complete. The Application object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer. + The possible errors are: badRequest, internalServer, serviceQuotaExceeded. */ func createApplicationAsync( input: AppConfigModel.CreateApplicationRequest, @@ -266,7 +266,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ func createApplicationSync( input: AppConfigModel.CreateApplicationRequest) throws -> AppConfigModel.Application @@ -279,7 +279,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - completion: The ConfigurationProfile object or an error will be passed to this callback when the operation is complete. The ConfigurationProfile object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer, resourceNotFound. + The possible errors are: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createConfigurationProfileAsync( input: AppConfigModel.CreateConfigurationProfileRequest, @@ -292,7 +292,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createConfigurationProfileSync( input: AppConfigModel.CreateConfigurationProfileRequest) throws -> AppConfigModel.ConfigurationProfile @@ -305,7 +305,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - completion: The DeploymentStrategy object or an error will be passed to this callback when the operation is complete. The DeploymentStrategy object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer. + The possible errors are: badRequest, internalServer, serviceQuotaExceeded. */ func createDeploymentStrategyAsync( input: AppConfigModel.CreateDeploymentStrategyRequest, @@ -318,7 +318,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ func createDeploymentStrategySync( input: AppConfigModel.CreateDeploymentStrategyRequest) throws -> AppConfigModel.DeploymentStrategy @@ -331,7 +331,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - completion: The Environment object or an error will be passed to this callback when the operation is complete. The Environment object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer, resourceNotFound. + The possible errors are: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createEnvironmentAsync( input: AppConfigModel.CreateEnvironmentRequest, @@ -344,7 +344,7 @@ public protocol AppConfigClientProtocol: AppConfigClientProtocolV2 { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createEnvironmentSync( input: AppConfigModel.CreateEnvironmentRequest) throws -> AppConfigModel.Environment diff --git a/Sources/AppConfigClient/AppConfigClientProtocolV2.swift b/Sources/AppConfigClient/AppConfigClientProtocolV2.swift index 99bb3ad..bc5066a 100644 --- a/Sources/AppConfigClient/AppConfigClientProtocolV2.swift +++ b/Sources/AppConfigClient/AppConfigClientProtocolV2.swift @@ -124,7 +124,7 @@ public protocol AppConfigClientProtocolV2 { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ func createApplication( input: AppConfigModel.CreateApplicationRequest) async throws -> AppConfigModel.Application @@ -136,7 +136,7 @@ public protocol AppConfigClientProtocolV2 { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createConfigurationProfile( input: AppConfigModel.CreateConfigurationProfileRequest) async throws -> AppConfigModel.ConfigurationProfile @@ -148,7 +148,7 @@ public protocol AppConfigClientProtocolV2 { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ func createDeploymentStrategy( input: AppConfigModel.CreateDeploymentStrategyRequest) async throws -> AppConfigModel.DeploymentStrategy @@ -160,7 +160,7 @@ public protocol AppConfigClientProtocolV2 { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ func createEnvironment( input: AppConfigModel.CreateEnvironmentRequest) async throws -> AppConfigModel.Environment diff --git a/Sources/AppConfigClient/AppConfigOperationsClientOutput.swift b/Sources/AppConfigClient/AppConfigOperationsClientOutput.swift index 17ab5f8..96a6bc4 100644 --- a/Sources/AppConfigClient/AppConfigOperationsClientOutput.swift +++ b/Sources/AppConfigClient/AppConfigOperationsClientOutput.swift @@ -120,6 +120,7 @@ extension HostedConfigurationVersion: HTTPResponseOutputProtocol { content: body, contentType: headers.contentType, description: headers.description, + kmsKeyArn: headers.kmsKeyArn, versionLabel: headers.versionLabel, versionNumber: headers.versionNumber) } diff --git a/Sources/AppConfigClient/MockAppConfigClient.swift b/Sources/AppConfigClient/MockAppConfigClient.swift index 78d46de..d92f880 100644 --- a/Sources/AppConfigClient/MockAppConfigClient.swift +++ b/Sources/AppConfigClient/MockAppConfigClient.swift @@ -303,7 +303,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - completion: The Application object or an error will be passed to this callback when the operation is complete. The Application object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer. + The possible errors are: badRequest, internalServer, serviceQuotaExceeded. */ public func createApplicationAsync( input: AppConfigModel.CreateApplicationRequest, @@ -324,7 +324,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createApplicationSync( input: AppConfigModel.CreateApplicationRequest) throws -> AppConfigModel.Application { @@ -343,7 +343,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - completion: The ConfigurationProfile object or an error will be passed to this callback when the operation is complete. The ConfigurationProfile object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer, resourceNotFound. + The possible errors are: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createConfigurationProfileAsync( input: AppConfigModel.CreateConfigurationProfileRequest, @@ -364,7 +364,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createConfigurationProfileSync( input: AppConfigModel.CreateConfigurationProfileRequest) throws -> AppConfigModel.ConfigurationProfile { @@ -383,7 +383,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - completion: The DeploymentStrategy object or an error will be passed to this callback when the operation is complete. The DeploymentStrategy object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer. + The possible errors are: badRequest, internalServer, serviceQuotaExceeded. */ public func createDeploymentStrategyAsync( input: AppConfigModel.CreateDeploymentStrategyRequest, @@ -404,7 +404,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createDeploymentStrategySync( input: AppConfigModel.CreateDeploymentStrategyRequest) throws -> AppConfigModel.DeploymentStrategy { @@ -423,7 +423,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - completion: The Environment object or an error will be passed to this callback when the operation is complete. The Environment object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer, resourceNotFound. + The possible errors are: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createEnvironmentAsync( input: AppConfigModel.CreateEnvironmentRequest, @@ -444,7 +444,7 @@ public struct MockAppConfigClient: AppConfigClientProtocol { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createEnvironmentSync( input: AppConfigModel.CreateEnvironmentRequest) throws -> AppConfigModel.Environment { diff --git a/Sources/AppConfigClient/MockAppConfigClientV2.swift b/Sources/AppConfigClient/MockAppConfigClientV2.swift index 7f6267f..8b1a6ab 100644 --- a/Sources/AppConfigClient/MockAppConfigClientV2.swift +++ b/Sources/AppConfigClient/MockAppConfigClientV2.swift @@ -174,7 +174,7 @@ public struct MockAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createApplication( input: AppConfigModel.CreateApplicationRequest) async throws -> AppConfigModel.Application { @@ -192,7 +192,7 @@ public struct MockAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createConfigurationProfile( input: AppConfigModel.CreateConfigurationProfileRequest) async throws -> AppConfigModel.ConfigurationProfile { @@ -210,7 +210,7 @@ public struct MockAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createDeploymentStrategy( input: AppConfigModel.CreateDeploymentStrategyRequest) async throws -> AppConfigModel.DeploymentStrategy { @@ -228,7 +228,7 @@ public struct MockAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createEnvironment( input: AppConfigModel.CreateEnvironmentRequest) async throws -> AppConfigModel.Environment { diff --git a/Sources/AppConfigClient/ThrowingAppConfigClient.swift b/Sources/AppConfigClient/ThrowingAppConfigClient.swift index 0484824..03341b6 100644 --- a/Sources/AppConfigClient/ThrowingAppConfigClient.swift +++ b/Sources/AppConfigClient/ThrowingAppConfigClient.swift @@ -305,7 +305,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - completion: The Application object or an error will be passed to this callback when the operation is complete. The Application object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer. + The possible errors are: badRequest, internalServer, serviceQuotaExceeded. */ public func createApplicationAsync( input: AppConfigModel.CreateApplicationRequest, @@ -324,7 +324,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createApplicationSync( input: AppConfigModel.CreateApplicationRequest) throws -> AppConfigModel.Application { @@ -343,7 +343,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - completion: The ConfigurationProfile object or an error will be passed to this callback when the operation is complete. The ConfigurationProfile object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer, resourceNotFound. + The possible errors are: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createConfigurationProfileAsync( input: AppConfigModel.CreateConfigurationProfileRequest, @@ -362,7 +362,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createConfigurationProfileSync( input: AppConfigModel.CreateConfigurationProfileRequest) throws -> AppConfigModel.ConfigurationProfile { @@ -381,7 +381,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - completion: The DeploymentStrategy object or an error will be passed to this callback when the operation is complete. The DeploymentStrategy object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer. + The possible errors are: badRequest, internalServer, serviceQuotaExceeded. */ public func createDeploymentStrategyAsync( input: AppConfigModel.CreateDeploymentStrategyRequest, @@ -400,7 +400,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createDeploymentStrategySync( input: AppConfigModel.CreateDeploymentStrategyRequest) throws -> AppConfigModel.DeploymentStrategy { @@ -419,7 +419,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - completion: The Environment object or an error will be passed to this callback when the operation is complete. The Environment object will be validated before being returned to caller. - The possible errors are: badRequest, internalServer, resourceNotFound. + The possible errors are: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createEnvironmentAsync( input: AppConfigModel.CreateEnvironmentRequest, @@ -438,7 +438,7 @@ public struct ThrowingAppConfigClient: AppConfigClientProtocol { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createEnvironmentSync( input: AppConfigModel.CreateEnvironmentRequest) throws -> AppConfigModel.Environment { diff --git a/Sources/AppConfigClient/ThrowingAppConfigClientV2.swift b/Sources/AppConfigClient/ThrowingAppConfigClientV2.swift index e63a04c..d453e72 100644 --- a/Sources/AppConfigClient/ThrowingAppConfigClientV2.swift +++ b/Sources/AppConfigClient/ThrowingAppConfigClientV2.swift @@ -176,7 +176,7 @@ public struct ThrowingAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateApplicationRequest object being passed to this operation. - Returns: The Application object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createApplication( input: AppConfigModel.CreateApplicationRequest) async throws -> AppConfigModel.Application { @@ -194,7 +194,7 @@ public struct ThrowingAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateConfigurationProfileRequest object being passed to this operation. - Returns: The ConfigurationProfile object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createConfigurationProfile( input: AppConfigModel.CreateConfigurationProfileRequest) async throws -> AppConfigModel.ConfigurationProfile { @@ -212,7 +212,7 @@ public struct ThrowingAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateDeploymentStrategyRequest object being passed to this operation. - Returns: The DeploymentStrategy object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer. + - Throws: badRequest, internalServer, serviceQuotaExceeded. */ public func createDeploymentStrategy( input: AppConfigModel.CreateDeploymentStrategyRequest) async throws -> AppConfigModel.DeploymentStrategy { @@ -230,7 +230,7 @@ public struct ThrowingAppConfigClientV2: AppConfigClientProtocolV2 { - input: The validated CreateEnvironmentRequest object being passed to this operation. - Returns: The Environment object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: badRequest, internalServer, resourceNotFound. + - Throws: badRequest, internalServer, resourceNotFound, serviceQuotaExceeded. */ public func createEnvironment( input: AppConfigModel.CreateEnvironmentRequest) async throws -> AppConfigModel.Environment { diff --git a/Sources/AppConfigModel/AppConfigModelDefaultInstances.swift b/Sources/AppConfigModel/AppConfigModelDefaultInstances.swift index dc496ca..4497c91 100644 --- a/Sources/AppConfigModel/AppConfigModelDefaultInstances.swift +++ b/Sources/AppConfigModel/AppConfigModelDefaultInstances.swift @@ -150,6 +150,8 @@ public extension ConfigurationProfile { applicationId: nil, description: nil, id: nil, + kmsKeyArn: nil, + kmsKeyIdentifier: nil, locationUri: nil, name: nil, retrievalRoleArn: nil, @@ -224,6 +226,7 @@ public extension CreateConfigurationProfileRequest { let defaultInstance = AppConfigModel.CreateConfigurationProfileRequest( applicationId: "", description: nil, + kmsKeyIdentifier: nil, locationUri: "0", name: "0", retrievalRoleArn: nil, @@ -295,7 +298,7 @@ public extension CreateExtensionRequest { actions: [.onDeploymentBaking: [Action.__default]], description: nil, latestVersionNumber: nil, - name: "0", + name: "", parameters: nil, tags: nil) @@ -436,7 +439,8 @@ public extension Deployment { kmsKeyIdentifier: nil, percentageComplete: nil, startedAt: nil, - state: nil) + state: nil, + versionLabel: nil) return defaultInstance }() @@ -506,7 +510,8 @@ public extension DeploymentSummary { growthType: nil, percentageComplete: nil, startedAt: nil, - state: nil) + state: nil, + versionLabel: nil) return defaultInstance }() @@ -776,6 +781,7 @@ public extension HostedConfigurationVersion { content: nil, contentType: nil, description: nil, + kmsKeyArn: nil, versionLabel: nil, versionNumber: nil) @@ -793,6 +799,7 @@ public extension HostedConfigurationVersionSummary { configurationProfileId: nil, contentType: nil, description: nil, + kmsKeyArn: nil, versionLabel: nil, versionNumber: nil) @@ -1129,6 +1136,7 @@ public extension UpdateConfigurationProfileRequest { applicationId: "", configurationProfileId: "", description: nil, + kmsKeyIdentifier: nil, name: nil, retrievalRoleArn: nil, validators: nil) diff --git a/Sources/AppConfigModel/AppConfigModelOperations.swift b/Sources/AppConfigModel/AppConfigModelOperations.swift index d6ba4c0..486fd9b 100644 --- a/Sources/AppConfigModel/AppConfigModelOperations.swift +++ b/Sources/AppConfigModel/AppConfigModelOperations.swift @@ -199,6 +199,7 @@ public extension CreateConfigurationProfileRequest { */ public struct CreateConfigurationProfileOperationInputBody: Codable, Equatable { public var description: Description? + public var kmsKeyIdentifier: KmsKeyIdentifier? public var locationUri: Uri public var name: LongName public var retrievalRoleArn: RoleArn? @@ -207,6 +208,7 @@ public struct CreateConfigurationProfileOperationInputBody: Codable, Equatable { public var validators: ValidatorList? public init(description: Description? = nil, + kmsKeyIdentifier: KmsKeyIdentifier? = nil, locationUri: Uri, name: LongName, retrievalRoleArn: RoleArn? = nil, @@ -214,6 +216,7 @@ public struct CreateConfigurationProfileOperationInputBody: Codable, Equatable { type: ConfigurationProfileType? = nil, validators: ValidatorList? = nil) { self.description = description + self.kmsKeyIdentifier = kmsKeyIdentifier self.locationUri = locationUri self.name = name self.retrievalRoleArn = retrievalRoleArn @@ -224,6 +227,7 @@ public struct CreateConfigurationProfileOperationInputBody: Codable, Equatable { enum CodingKeys: String, CodingKey { case description = "Description" + case kmsKeyIdentifier = "KmsKeyIdentifier" case locationUri = "LocationUri" case name = "Name" case retrievalRoleArn = "RetrievalRoleArn" @@ -234,6 +238,7 @@ public struct CreateConfigurationProfileOperationInputBody: Codable, Equatable { public func validate() throws { try description?.validateAsDescription() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifier() try locationUri.validateAsUri() try name.validateAsLongName() try retrievalRoleArn?.validateAsRoleArn() @@ -246,6 +251,7 @@ public extension CreateConfigurationProfileRequest { func asAppConfigModelCreateConfigurationProfileOperationInputBody() -> CreateConfigurationProfileOperationInputBody { return CreateConfigurationProfileOperationInputBody( description: description, + kmsKeyIdentifier: kmsKeyIdentifier, locationUri: locationUri, name: name, retrievalRoleArn: retrievalRoleArn, @@ -333,13 +339,13 @@ public extension CreateEnvironmentRequest { public struct CreateExtensionOperationInputBody: Codable, Equatable { public var actions: ActionsMap public var description: Description? - public var name: Name + public var name: ExtensionOrParameterName public var parameters: ParameterMap? public var tags: TagMap? public init(actions: ActionsMap, description: Description? = nil, - name: Name, + name: ExtensionOrParameterName, parameters: ParameterMap? = nil, tags: TagMap? = nil) { self.actions = actions @@ -359,7 +365,7 @@ public struct CreateExtensionOperationInputBody: Codable, Equatable { public func validate() throws { try description?.validateAsDescription() - try name.validateAsName() + try name.validateAsExtensionOrParameterName() } } @@ -486,6 +492,7 @@ public struct CreateHostedConfigurationVersionOperationOutputHeaders: Codable, E public var configurationProfileId: Id? public var contentType: StringWithLengthBetween1And255? public var description: Description? + public var kmsKeyArn: Arn? public var versionLabel: VersionLabel? public var versionNumber: Integer? @@ -493,12 +500,14 @@ public struct CreateHostedConfigurationVersionOperationOutputHeaders: Codable, E configurationProfileId: Id? = nil, contentType: StringWithLengthBetween1And255? = nil, description: Description? = nil, + kmsKeyArn: Arn? = nil, versionLabel: VersionLabel? = nil, versionNumber: Integer? = nil) { self.applicationId = applicationId self.configurationProfileId = configurationProfileId self.contentType = contentType self.description = description + self.kmsKeyArn = kmsKeyArn self.versionLabel = versionLabel self.versionNumber = versionNumber } @@ -508,6 +517,7 @@ public struct CreateHostedConfigurationVersionOperationOutputHeaders: Codable, E case configurationProfileId = "Configuration-Profile-Id" case contentType = "Content-Type" case description = "Description" + case kmsKeyArn = "KmsKeyArn" case versionLabel = "VersionLabel" case versionNumber = "Version-Number" } @@ -517,6 +527,7 @@ public struct CreateHostedConfigurationVersionOperationOutputHeaders: Codable, E try configurationProfileId?.validateAsId() try contentType?.validateAsStringWithLengthBetween1And255() try description?.validateAsDescription() + try kmsKeyArn?.validateAsArn() try versionLabel?.validateAsVersionLabel() } } @@ -528,6 +539,7 @@ public extension HostedConfigurationVersion { configurationProfileId: configurationProfileId, contentType: contentType, description: description, + kmsKeyArn: kmsKeyArn, versionLabel: versionLabel, versionNumber: versionNumber) } @@ -1639,14 +1651,14 @@ public struct StartDeploymentOperationInputBody: Codable, Equatable { public var configurationVersion: Version public var deploymentStrategyId: DeploymentStrategyId public var description: Description? - public var kmsKeyIdentifier: Identifier? + public var kmsKeyIdentifier: KmsKeyIdentifier? public var tags: TagMap? public init(configurationProfileId: Id, configurationVersion: Version, deploymentStrategyId: DeploymentStrategyId, description: Description? = nil, - kmsKeyIdentifier: Identifier? = nil, + kmsKeyIdentifier: KmsKeyIdentifier? = nil, tags: TagMap? = nil) { self.configurationProfileId = configurationProfileId self.configurationVersion = configurationVersion @@ -1670,7 +1682,7 @@ public struct StartDeploymentOperationInputBody: Codable, Equatable { try configurationVersion.validateAsVersion() try deploymentStrategyId.validateAsDeploymentStrategyId() try description?.validateAsDescription() - try kmsKeyIdentifier?.validateAsIdentifier() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifier() } } @@ -1930,15 +1942,18 @@ public extension UpdateConfigurationProfileRequest { */ public struct UpdateConfigurationProfileOperationInputBody: Codable, Equatable { public var description: Description? + public var kmsKeyIdentifier: KmsKeyIdentifierOrEmpty? public var name: Name? public var retrievalRoleArn: RoleArn? public var validators: ValidatorList? public init(description: Description? = nil, + kmsKeyIdentifier: KmsKeyIdentifierOrEmpty? = nil, name: Name? = nil, retrievalRoleArn: RoleArn? = nil, validators: ValidatorList? = nil) { self.description = description + self.kmsKeyIdentifier = kmsKeyIdentifier self.name = name self.retrievalRoleArn = retrievalRoleArn self.validators = validators @@ -1946,6 +1961,7 @@ public struct UpdateConfigurationProfileOperationInputBody: Codable, Equatable { enum CodingKeys: String, CodingKey { case description = "Description" + case kmsKeyIdentifier = "KmsKeyIdentifier" case name = "Name" case retrievalRoleArn = "RetrievalRoleArn" case validators = "Validators" @@ -1953,6 +1969,7 @@ public struct UpdateConfigurationProfileOperationInputBody: Codable, Equatable { public func validate() throws { try description?.validateAsDescription() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifierOrEmpty() try name?.validateAsName() try retrievalRoleArn?.validateAsRoleArn() try validators?.validateAsValidatorList() @@ -1963,6 +1980,7 @@ public extension UpdateConfigurationProfileRequest { func asAppConfigModelUpdateConfigurationProfileOperationInputBody() -> UpdateConfigurationProfileOperationInputBody { return UpdateConfigurationProfileOperationInputBody( description: description, + kmsKeyIdentifier: kmsKeyIdentifier, name: name, retrievalRoleArn: retrievalRoleArn, validators: validators) diff --git a/Sources/AppConfigModel/AppConfigModelStructures.swift b/Sources/AppConfigModel/AppConfigModelStructures.swift index 2a8b241..bd6d7b3 100644 --- a/Sources/AppConfigModel/AppConfigModelStructures.swift +++ b/Sources/AppConfigModel/AppConfigModelStructures.swift @@ -239,6 +239,8 @@ public struct ConfigurationProfile: Codable, Equatable { public var applicationId: Id? public var description: Description? public var id: Id? + public var kmsKeyArn: Arn? + public var kmsKeyIdentifier: KmsKeyIdentifier? public var locationUri: Uri? public var name: LongName? public var retrievalRoleArn: RoleArn? @@ -248,6 +250,8 @@ public struct ConfigurationProfile: Codable, Equatable { public init(applicationId: Id? = nil, description: Description? = nil, id: Id? = nil, + kmsKeyArn: Arn? = nil, + kmsKeyIdentifier: KmsKeyIdentifier? = nil, locationUri: Uri? = nil, name: LongName? = nil, retrievalRoleArn: RoleArn? = nil, @@ -256,6 +260,8 @@ public struct ConfigurationProfile: Codable, Equatable { self.applicationId = applicationId self.description = description self.id = id + self.kmsKeyArn = kmsKeyArn + self.kmsKeyIdentifier = kmsKeyIdentifier self.locationUri = locationUri self.name = name self.retrievalRoleArn = retrievalRoleArn @@ -267,6 +273,8 @@ public struct ConfigurationProfile: Codable, Equatable { case applicationId = "ApplicationId" case description = "Description" case id = "Id" + case kmsKeyArn = "KmsKeyArn" + case kmsKeyIdentifier = "KmsKeyIdentifier" case locationUri = "LocationUri" case name = "Name" case retrievalRoleArn = "RetrievalRoleArn" @@ -278,6 +286,8 @@ public struct ConfigurationProfile: Codable, Equatable { try applicationId?.validateAsId() try description?.validateAsDescription() try id?.validateAsId() + try kmsKeyArn?.validateAsArn() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifier() try locationUri?.validateAsUri() try name?.validateAsLongName() try retrievalRoleArn?.validateAsRoleArn() @@ -390,6 +400,7 @@ public struct CreateApplicationRequest: Codable, Equatable { public struct CreateConfigurationProfileRequest: Codable, Equatable { public var applicationId: Id public var description: Description? + public var kmsKeyIdentifier: KmsKeyIdentifier? public var locationUri: Uri public var name: LongName public var retrievalRoleArn: RoleArn? @@ -399,6 +410,7 @@ public struct CreateConfigurationProfileRequest: Codable, Equatable { public init(applicationId: Id, description: Description? = nil, + kmsKeyIdentifier: KmsKeyIdentifier? = nil, locationUri: Uri, name: LongName, retrievalRoleArn: RoleArn? = nil, @@ -407,6 +419,7 @@ public struct CreateConfigurationProfileRequest: Codable, Equatable { validators: ValidatorList? = nil) { self.applicationId = applicationId self.description = description + self.kmsKeyIdentifier = kmsKeyIdentifier self.locationUri = locationUri self.name = name self.retrievalRoleArn = retrievalRoleArn @@ -418,6 +431,7 @@ public struct CreateConfigurationProfileRequest: Codable, Equatable { enum CodingKeys: String, CodingKey { case applicationId = "ApplicationId" case description = "Description" + case kmsKeyIdentifier = "KmsKeyIdentifier" case locationUri = "LocationUri" case name = "Name" case retrievalRoleArn = "RetrievalRoleArn" @@ -429,6 +443,7 @@ public struct CreateConfigurationProfileRequest: Codable, Equatable { public func validate() throws { try applicationId.validateAsId() try description?.validateAsDescription() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifier() try locationUri.validateAsUri() try name.validateAsLongName() try retrievalRoleArn?.validateAsRoleArn() @@ -557,14 +572,14 @@ public struct CreateExtensionRequest: Codable, Equatable { public var actions: ActionsMap public var description: Description? public var latestVersionNumber: Integer? - public var name: Name + public var name: ExtensionOrParameterName public var parameters: ParameterMap? public var tags: TagMap? public init(actions: ActionsMap, description: Description? = nil, latestVersionNumber: Integer? = nil, - name: Name, + name: ExtensionOrParameterName, parameters: ParameterMap? = nil, tags: TagMap? = nil) { self.actions = actions @@ -586,7 +601,7 @@ public struct CreateExtensionRequest: Codable, Equatable { public func validate() throws { try description?.validateAsDescription() - try name.validateAsName() + try name.validateAsExtensionOrParameterName() } } @@ -787,10 +802,11 @@ public struct Deployment: Codable, Equatable { public var growthFactor: Percentage? public var growthType: GrowthType? public var kmsKeyArn: Arn? - public var kmsKeyIdentifier: Identifier? + public var kmsKeyIdentifier: KmsKeyIdentifier? public var percentageComplete: Percentage? public var startedAt: Iso8601DateTime? public var state: DeploymentState? + public var versionLabel: VersionLabel? public init(applicationId: Id? = nil, appliedExtensions: AppliedExtensions? = nil, @@ -809,10 +825,11 @@ public struct Deployment: Codable, Equatable { growthFactor: Percentage? = nil, growthType: GrowthType? = nil, kmsKeyArn: Arn? = nil, - kmsKeyIdentifier: Identifier? = nil, + kmsKeyIdentifier: KmsKeyIdentifier? = nil, percentageComplete: Percentage? = nil, startedAt: Iso8601DateTime? = nil, - state: DeploymentState? = nil) { + state: DeploymentState? = nil, + versionLabel: VersionLabel? = nil) { self.applicationId = applicationId self.appliedExtensions = appliedExtensions self.completedAt = completedAt @@ -834,6 +851,7 @@ public struct Deployment: Codable, Equatable { self.percentageComplete = percentageComplete self.startedAt = startedAt self.state = state + self.versionLabel = versionLabel } enum CodingKeys: String, CodingKey { @@ -858,6 +876,7 @@ public struct Deployment: Codable, Equatable { case percentageComplete = "PercentageComplete" case startedAt = "StartedAt" case state = "State" + case versionLabel = "VersionLabel" } public func validate() throws { @@ -873,8 +892,9 @@ public struct Deployment: Codable, Equatable { try finalBakeTimeInMinutes?.validateAsMinutesBetween0And24Hours() try growthFactor?.validateAsPercentage() try kmsKeyArn?.validateAsArn() - try kmsKeyIdentifier?.validateAsIdentifier() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifier() try percentageComplete?.validateAsPercentage() + try versionLabel?.validateAsVersionLabel() } } @@ -991,6 +1011,7 @@ public struct DeploymentSummary: Codable, Equatable { public var percentageComplete: Percentage? public var startedAt: Iso8601DateTime? public var state: DeploymentState? + public var versionLabel: VersionLabel? public init(completedAt: Iso8601DateTime? = nil, configurationName: Name? = nil, @@ -1002,7 +1023,8 @@ public struct DeploymentSummary: Codable, Equatable { growthType: GrowthType? = nil, percentageComplete: Percentage? = nil, startedAt: Iso8601DateTime? = nil, - state: DeploymentState? = nil) { + state: DeploymentState? = nil, + versionLabel: VersionLabel? = nil) { self.completedAt = completedAt self.configurationName = configurationName self.configurationVersion = configurationVersion @@ -1014,6 +1036,7 @@ public struct DeploymentSummary: Codable, Equatable { self.percentageComplete = percentageComplete self.startedAt = startedAt self.state = state + self.versionLabel = versionLabel } enum CodingKeys: String, CodingKey { @@ -1028,6 +1051,7 @@ public struct DeploymentSummary: Codable, Equatable { case percentageComplete = "PercentageComplete" case startedAt = "StartedAt" case state = "State" + case versionLabel = "VersionLabel" } public func validate() throws { @@ -1037,6 +1061,7 @@ public struct DeploymentSummary: Codable, Equatable { try finalBakeTimeInMinutes?.validateAsMinutesBetween0And24Hours() try growthFactor?.validateAsPercentage() try percentageComplete?.validateAsPercentage() + try versionLabel?.validateAsVersionLabel() } } @@ -1505,6 +1530,7 @@ public struct HostedConfigurationVersion: Codable, Equatable { public var content: Blob? public var contentType: StringWithLengthBetween1And255? public var description: Description? + public var kmsKeyArn: Arn? public var versionLabel: VersionLabel? public var versionNumber: Integer? @@ -1513,6 +1539,7 @@ public struct HostedConfigurationVersion: Codable, Equatable { content: Blob? = nil, contentType: StringWithLengthBetween1And255? = nil, description: Description? = nil, + kmsKeyArn: Arn? = nil, versionLabel: VersionLabel? = nil, versionNumber: Integer? = nil) { self.applicationId = applicationId @@ -1520,6 +1547,7 @@ public struct HostedConfigurationVersion: Codable, Equatable { self.content = content self.contentType = contentType self.description = description + self.kmsKeyArn = kmsKeyArn self.versionLabel = versionLabel self.versionNumber = versionNumber } @@ -1530,6 +1558,7 @@ public struct HostedConfigurationVersion: Codable, Equatable { case content = "Content" case contentType = "Content-Type" case description = "Description" + case kmsKeyArn = "KmsKeyArn" case versionLabel = "VersionLabel" case versionNumber = "Version-Number" } @@ -1539,6 +1568,7 @@ public struct HostedConfigurationVersion: Codable, Equatable { try configurationProfileId?.validateAsId() try contentType?.validateAsStringWithLengthBetween1And255() try description?.validateAsDescription() + try kmsKeyArn?.validateAsArn() try versionLabel?.validateAsVersionLabel() } } @@ -1548,6 +1578,7 @@ public struct HostedConfigurationVersionSummary: Codable, Equatable { public var configurationProfileId: Id? public var contentType: StringWithLengthBetween1And255? public var description: Description? + public var kmsKeyArn: Arn? public var versionLabel: VersionLabel? public var versionNumber: Integer? @@ -1555,12 +1586,14 @@ public struct HostedConfigurationVersionSummary: Codable, Equatable { configurationProfileId: Id? = nil, contentType: StringWithLengthBetween1And255? = nil, description: Description? = nil, + kmsKeyArn: Arn? = nil, versionLabel: VersionLabel? = nil, versionNumber: Integer? = nil) { self.applicationId = applicationId self.configurationProfileId = configurationProfileId self.contentType = contentType self.description = description + self.kmsKeyArn = kmsKeyArn self.versionLabel = versionLabel self.versionNumber = versionNumber } @@ -1570,6 +1603,7 @@ public struct HostedConfigurationVersionSummary: Codable, Equatable { case configurationProfileId = "ConfigurationProfileId" case contentType = "ContentType" case description = "Description" + case kmsKeyArn = "KmsKeyArn" case versionLabel = "VersionLabel" case versionNumber = "VersionNumber" } @@ -1579,6 +1613,7 @@ public struct HostedConfigurationVersionSummary: Codable, Equatable { try configurationProfileId?.validateAsId() try contentType?.validateAsStringWithLengthBetween1And255() try description?.validateAsDescription() + try kmsKeyArn?.validateAsArn() try versionLabel?.validateAsVersionLabel() } } @@ -2016,7 +2051,7 @@ public struct StartDeploymentRequest: Codable, Equatable { public var deploymentStrategyId: DeploymentStrategyId public var description: Description? public var environmentId: Id - public var kmsKeyIdentifier: Identifier? + public var kmsKeyIdentifier: KmsKeyIdentifier? public var tags: TagMap? public init(applicationId: Id, @@ -2025,7 +2060,7 @@ public struct StartDeploymentRequest: Codable, Equatable { deploymentStrategyId: DeploymentStrategyId, description: Description? = nil, environmentId: Id, - kmsKeyIdentifier: Identifier? = nil, + kmsKeyIdentifier: KmsKeyIdentifier? = nil, tags: TagMap? = nil) { self.applicationId = applicationId self.configurationProfileId = configurationProfileId @@ -2055,7 +2090,7 @@ public struct StartDeploymentRequest: Codable, Equatable { try deploymentStrategyId.validateAsDeploymentStrategyId() try description?.validateAsDescription() try environmentId.validateAsId() - try kmsKeyIdentifier?.validateAsIdentifier() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifier() } } @@ -2155,6 +2190,7 @@ public struct UpdateConfigurationProfileRequest: Codable, Equatable { public var applicationId: Id public var configurationProfileId: Id public var description: Description? + public var kmsKeyIdentifier: KmsKeyIdentifierOrEmpty? public var name: Name? public var retrievalRoleArn: RoleArn? public var validators: ValidatorList? @@ -2162,12 +2198,14 @@ public struct UpdateConfigurationProfileRequest: Codable, Equatable { public init(applicationId: Id, configurationProfileId: Id, description: Description? = nil, + kmsKeyIdentifier: KmsKeyIdentifierOrEmpty? = nil, name: Name? = nil, retrievalRoleArn: RoleArn? = nil, validators: ValidatorList? = nil) { self.applicationId = applicationId self.configurationProfileId = configurationProfileId self.description = description + self.kmsKeyIdentifier = kmsKeyIdentifier self.name = name self.retrievalRoleArn = retrievalRoleArn self.validators = validators @@ -2177,6 +2215,7 @@ public struct UpdateConfigurationProfileRequest: Codable, Equatable { case applicationId = "ApplicationId" case configurationProfileId = "ConfigurationProfileId" case description = "Description" + case kmsKeyIdentifier = "KmsKeyIdentifier" case name = "Name" case retrievalRoleArn = "RetrievalRoleArn" case validators = "Validators" @@ -2186,6 +2225,7 @@ public struct UpdateConfigurationProfileRequest: Codable, Equatable { try applicationId.validateAsId() try configurationProfileId.validateAsId() try description?.validateAsDescription() + try kmsKeyIdentifier?.validateAsKmsKeyIdentifierOrEmpty() try name?.validateAsName() try retrievalRoleArn?.validateAsRoleArn() try validators?.validateAsValidatorList() diff --git a/Sources/AppConfigModel/AppConfigModelTypes.swift b/Sources/AppConfigModel/AppConfigModelTypes.swift index 6bbc7b2..38b716d 100644 --- a/Sources/AppConfigModel/AppConfigModelTypes.swift +++ b/Sources/AppConfigModel/AppConfigModelTypes.swift @@ -204,6 +204,11 @@ public enum EnvironmentState: String, Codable, CustomStringConvertible { */ public typealias ExtensionAssociationSummaries = [ExtensionAssociationSummary] +/** + Type definition for the ExtensionOrParameterName field. + */ +public typealias ExtensionOrParameterName = String + /** Type definition for the ExtensionSummaries field. */ @@ -263,6 +268,16 @@ public typealias InvalidConfigurationDetailList = [InvalidConfigurationDetail] */ public typealias Iso8601DateTime = String +/** + Type definition for the KmsKeyIdentifier field. + */ +public typealias KmsKeyIdentifier = String + +/** + Type definition for the KmsKeyIdentifierOrEmpty field. + */ +public typealias KmsKeyIdentifierOrEmpty = String + /** Type definition for the LongName field. */ @@ -296,12 +311,12 @@ public typealias NextToken = String /** Type definition for the ParameterMap field. */ -public typealias ParameterMap = [Name: Parameter] +public typealias ParameterMap = [ExtensionOrParameterName: Parameter] /** Type definition for the ParameterValueMap field. */ -public typealias ParameterValueMap = [Name: StringWithLengthBetween1And2048] +public typealias ParameterValueMap = [ExtensionOrParameterName: StringWithLengthBetween1And2048] /** Type definition for the Percentage field. @@ -504,6 +519,19 @@ extension AppConfigModel.Description { } } +/** + Validation for the ExtensionOrParameterName field. +*/ +extension AppConfigModel.ExtensionOrParameterName { + public func validateAsExtensionOrParameterName() throws { + guard let matchingRange = self.range(of: "^[^\\/#:\\n]{1,64}$", options: .regularExpression), + matchingRange == startIndex.. 2048 { + throw AppConfigError.validationError(reason: "The provided value to KmsKeyIdentifier violated the maximum length constraint.") + } + } +} + +/** + Validation for the KmsKeyIdentifierOrEmpty field. +*/ +extension AppConfigModel.KmsKeyIdentifierOrEmpty { + public func validateAsKmsKeyIdentifierOrEmpty() throws { + if self.count < 0 { + throw AppConfigError.validationError(reason: "The provided value to KmsKeyIdentifierOrEmpty violated the minimum length constraint.") + } + + if self.count > 2048 { + throw AppConfigError.validationError(reason: "The provided value to KmsKeyIdentifierOrEmpty violated the maximum length constraint.") + } + } +} + /** Validation for the LongName field. */ diff --git a/Sources/CloudformationClient/AWSCloudformationClient.swift b/Sources/CloudformationClient/AWSCloudformationClient.swift index 5ef5e07..c3b9a69 100644 --- a/Sources/CloudformationClient/AWSCloudformationClient.swift +++ b/Sources/CloudformationClient/AWSCloudformationClient.swift @@ -3570,6 +3570,84 @@ public struct AWSCloudformationClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listStackInstanceResourceDrifts, + handlerDelegate: handlerDelegate) + let wrappedInput = ListStackInstanceResourceDriftsOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: CloudformationModelOperations.listStackInstanceResourceDrifts.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the ListStackInstanceResourceDrifts operation waiting for the response before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDriftsSync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listStackInstanceResourceDrifts, + handlerDelegate: handlerDelegate) + let wrappedInput = ListStackInstanceResourceDriftsOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: CloudformationModelOperations.listStackInstanceResourceDrifts.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: CloudformationError = error.asTypedError() + throw typedError + } + } + /** Invokes the ListStackInstances operation returning immediately and passing the response to a callback. @@ -7244,6 +7322,46 @@ public struct AWSCloudformationClient CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listStackInstanceResourceDrifts, + handlerDelegate: handlerDelegate) + let wrappedInput = ListStackInstanceResourceDriftsOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: CloudformationModelOperations.listStackInstanceResourceDrifts.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: CloudformationError = error.asTypedError() + throw typedError + } + } + /** Invokes the ListStackInstances operation suspending until the response is available before returning. diff --git a/Sources/CloudformationClient/CloudformationClientProtocol+async.swift b/Sources/CloudformationClient/CloudformationClientProtocol+async.swift index c9febcf..51eda42 100644 --- a/Sources/CloudformationClient/CloudformationClientProtocol+async.swift +++ b/Sources/CloudformationClient/CloudformationClientProtocol+async.swift @@ -1196,6 +1196,33 @@ public extension CloudformationClientProtocol { } } + /** + Invokes the ListStackInstanceResourceDrifts operation and asynchronously returning the response. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + func listStackInstanceResourceDrifts(input: CloudformationModel.ListStackInstanceResourceDriftsInput) async throws + -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + return try await withCheckedThrowingContinuation { cont in + do { + try listStackInstanceResourceDriftsAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the ListStackInstances operation and asynchronously returning the response. diff --git a/Sources/CloudformationClient/CloudformationClientProtocol.swift b/Sources/CloudformationClient/CloudformationClientProtocol.swift index 7878889..7aeaa45 100644 --- a/Sources/CloudformationClient/CloudformationClientProtocol.swift +++ b/Sources/CloudformationClient/CloudformationClientProtocol.swift @@ -249,6 +249,11 @@ public protocol CloudformationClientProtocol: CloudformationClientProtocolV2 { typealias ListImportsAsyncType = ( _ input: CloudformationModel.ListImportsInput, _ completion: @escaping (Result) -> ()) throws -> () + typealias ListStackInstanceResourceDriftsSyncType = ( + _ input: CloudformationModel.ListStackInstanceResourceDriftsInput) throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts + typealias ListStackInstanceResourceDriftsAsyncType = ( + _ input: CloudformationModel.ListStackInstanceResourceDriftsInput, + _ completion: @escaping (Result) -> ()) throws -> () typealias ListStackInstancesSyncType = ( _ input: CloudformationModel.ListStackInstancesInput) throws -> CloudformationModel.ListStackInstancesOutputForListStackInstances typealias ListStackInstancesAsyncType = ( @@ -1485,6 +1490,32 @@ public protocol CloudformationClientProtocol: CloudformationClientProtocolV2 { func listImportsSync( input: CloudformationModel.ListImportsInput) throws -> CloudformationModel.ListImportsOutputForListImports + /** + Invokes the ListStackInstanceResourceDrifts operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - completion: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object or an error will be passed to this + callback when the operation is complete. The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts + object will be validated before being returned to caller. + The possible errors are: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + func listStackInstanceResourceDriftsAsync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the ListStackInstanceResourceDrifts operation waiting for the response before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + func listStackInstanceResourceDriftsSync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts + /** Invokes the ListStackInstances operation returning immediately and passing the response to a callback. diff --git a/Sources/CloudformationClient/CloudformationClientProtocolV2.swift b/Sources/CloudformationClient/CloudformationClientProtocolV2.swift index ae3fede..74d3b54 100644 --- a/Sources/CloudformationClient/CloudformationClientProtocolV2.swift +++ b/Sources/CloudformationClient/CloudformationClientProtocolV2.swift @@ -118,6 +118,8 @@ public protocol CloudformationClientProtocolV2 { _ input: CloudformationModel.ListExportsInput) async throws -> CloudformationModel.ListExportsOutputForListExports typealias ListImportsFunctionType = ( _ input: CloudformationModel.ListImportsInput) async throws -> CloudformationModel.ListImportsOutputForListImports + typealias ListStackInstanceResourceDriftsFunctionType = ( + _ input: CloudformationModel.ListStackInstanceResourceDriftsInput) async throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts typealias ListStackInstancesFunctionType = ( _ input: CloudformationModel.ListStackInstancesInput) async throws -> CloudformationModel.ListStackInstancesOutputForListStackInstances typealias ListStackResourcesFunctionType = ( @@ -679,6 +681,18 @@ public protocol CloudformationClientProtocolV2 { func listImports( input: CloudformationModel.ListImportsInput) async throws -> CloudformationModel.ListImportsOutputForListImports + /** + Invokes the ListStackInstanceResourceDrifts operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + func listStackInstanceResourceDrifts( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) async throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts + /** Invokes the ListStackInstances operation suspending until the response is available before returning. diff --git a/Sources/CloudformationClient/CloudformationInvocationsReporting.swift b/Sources/CloudformationClient/CloudformationInvocationsReporting.swift index 507756f..92c728e 100644 --- a/Sources/CloudformationClient/CloudformationInvocationsReporting.swift +++ b/Sources/CloudformationClient/CloudformationInvocationsReporting.swift @@ -73,6 +73,7 @@ public struct CloudformationInvocationsReporting public let listExports: SmokeAWSHTTPClientInvocationReporting public let listImports: SmokeAWSHTTPClientInvocationReporting + public let listStackInstanceResourceDrifts: SmokeAWSHTTPClientInvocationReporting public let listStackInstances: SmokeAWSHTTPClientInvocationReporting public let listStackResources: SmokeAWSHTTPClientInvocationReporting public let listStackSetOperationResults: SmokeAWSHTTPClientInvocationReporting @@ -188,6 +189,8 @@ public struct CloudformationInvocationsReporting BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the ListStackInstances operation in a HTTP client. */ diff --git a/Sources/CloudformationClient/CloudformationOperationsReporting.swift b/Sources/CloudformationClient/CloudformationOperationsReporting.swift index 90b2fa0..4f713b3 100644 --- a/Sources/CloudformationClient/CloudformationOperationsReporting.swift +++ b/Sources/CloudformationClient/CloudformationOperationsReporting.swift @@ -72,6 +72,7 @@ public struct CloudformationOperationsReporting { public let listChangeSets: StandardSmokeAWSOperationReporting public let listExports: StandardSmokeAWSOperationReporting public let listImports: StandardSmokeAWSOperationReporting + public let listStackInstanceResourceDrifts: StandardSmokeAWSOperationReporting public let listStackInstances: StandardSmokeAWSOperationReporting public let listStackResources: StandardSmokeAWSOperationReporting public let listStackSetOperationResults: StandardSmokeAWSOperationReporting @@ -187,6 +188,8 @@ public struct CloudformationOperationsReporting { clientName: clientName, operation: .listExports, configuration: reportingConfiguration) self.listImports = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .listImports, configuration: reportingConfiguration) + self.listStackInstanceResourceDrifts = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .listStackInstanceResourceDrifts, configuration: reportingConfiguration) self.listStackInstances = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .listStackInstances, configuration: reportingConfiguration) self.listStackResources = StandardSmokeAWSOperationReporting( diff --git a/Sources/CloudformationClient/MockCloudformationClient.swift b/Sources/CloudformationClient/MockCloudformationClient.swift index f6b5010..f5f49a2 100644 --- a/Sources/CloudformationClient/MockCloudformationClient.swift +++ b/Sources/CloudformationClient/MockCloudformationClient.swift @@ -117,6 +117,8 @@ public struct MockCloudformationClient: CloudformationClientProtocol { let listExportsSyncOverride: ListExportsSyncType? let listImportsAsyncOverride: ListImportsAsyncType? let listImportsSyncOverride: ListImportsSyncType? + let listStackInstanceResourceDriftsAsyncOverride: ListStackInstanceResourceDriftsAsyncType? + let listStackInstanceResourceDriftsSyncOverride: ListStackInstanceResourceDriftsSyncType? let listStackInstancesAsyncOverride: ListStackInstancesAsyncType? let listStackInstancesSyncOverride: ListStackInstancesSyncType? let listStackResourcesAsyncOverride: ListStackResourcesAsyncType? @@ -261,6 +263,8 @@ public struct MockCloudformationClient: CloudformationClientProtocol { listExportsSync: ListExportsSyncType? = nil, listImportsAsync: ListImportsAsyncType? = nil, listImportsSync: ListImportsSyncType? = nil, + listStackInstanceResourceDriftsAsync: ListStackInstanceResourceDriftsAsyncType? = nil, + listStackInstanceResourceDriftsSync: ListStackInstanceResourceDriftsSyncType? = nil, listStackInstancesAsync: ListStackInstancesAsyncType? = nil, listStackInstancesSync: ListStackInstancesSyncType? = nil, listStackResourcesAsync: ListStackResourcesAsyncType? = nil, @@ -399,6 +403,8 @@ public struct MockCloudformationClient: CloudformationClientProtocol { self.listExportsSyncOverride = listExportsSync self.listImportsAsyncOverride = listImportsAsync self.listImportsSyncOverride = listImportsSync + self.listStackInstanceResourceDriftsAsyncOverride = listStackInstanceResourceDriftsAsync + self.listStackInstanceResourceDriftsSyncOverride = listStackInstanceResourceDriftsSync self.listStackInstancesAsyncOverride = listStackInstancesAsync self.listStackInstancesSyncOverride = listStackInstancesSync self.listStackResourcesAsyncOverride = listStackResourcesAsync @@ -2171,6 +2177,46 @@ public struct MockCloudformationClient: CloudformationClientProtocol { return ListImportsOutputForListImports.__default } + /** + Invokes the ListStackInstanceResourceDrifts operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - completion: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object or an error will be passed to this + callback when the operation is complete. The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts + object will be validated before being returned to caller. + The possible errors are: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDriftsAsync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput, + completion: @escaping (Result) -> ()) throws { + if let listStackInstanceResourceDriftsAsyncOverride = listStackInstanceResourceDriftsAsyncOverride { + return try listStackInstanceResourceDriftsAsyncOverride(input, completion) + } + + let result = ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts.__default + + completion(.success(result)) + } + + /** + Invokes the ListStackInstanceResourceDrifts operation waiting for the response before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDriftsSync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + if let listStackInstanceResourceDriftsSyncOverride = listStackInstanceResourceDriftsSyncOverride { + return try listStackInstanceResourceDriftsSyncOverride(input) + } + + return ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts.__default + } + /** Invokes the ListStackInstances operation returning immediately and passing the response to a callback. diff --git a/Sources/CloudformationClient/MockCloudformationClientV2.swift b/Sources/CloudformationClient/MockCloudformationClientV2.swift index 026e116..2fe93f9 100644 --- a/Sources/CloudformationClient/MockCloudformationClientV2.swift +++ b/Sources/CloudformationClient/MockCloudformationClientV2.swift @@ -74,6 +74,7 @@ public struct MockCloudformationClientV2: CloudformationClientProtocolV2 { let listChangeSetsOverride: ListChangeSetsFunctionType? let listExportsOverride: ListExportsFunctionType? let listImportsOverride: ListImportsFunctionType? + let listStackInstanceResourceDriftsOverride: ListStackInstanceResourceDriftsFunctionType? let listStackInstancesOverride: ListStackInstancesFunctionType? let listStackResourcesOverride: ListStackResourcesFunctionType? let listStackSetOperationResultsOverride: ListStackSetOperationResultsFunctionType? @@ -149,6 +150,7 @@ public struct MockCloudformationClientV2: CloudformationClientProtocolV2 { listChangeSets: ListChangeSetsFunctionType? = nil, listExports: ListExportsFunctionType? = nil, listImports: ListImportsFunctionType? = nil, + listStackInstanceResourceDrifts: ListStackInstanceResourceDriftsFunctionType? = nil, listStackInstances: ListStackInstancesFunctionType? = nil, listStackResources: ListStackResourcesFunctionType? = nil, listStackSetOperationResults: ListStackSetOperationResultsFunctionType? = nil, @@ -218,6 +220,7 @@ public struct MockCloudformationClientV2: CloudformationClientProtocolV2 { self.listChangeSetsOverride = listChangeSets self.listExportsOverride = listExports self.listImportsOverride = listImports + self.listStackInstanceResourceDriftsOverride = listStackInstanceResourceDrifts self.listStackInstancesOverride = listStackInstances self.listStackResourcesOverride = listStackResources self.listStackSetOperationResultsOverride = listStackSetOperationResults @@ -1017,6 +1020,24 @@ public struct MockCloudformationClientV2: CloudformationClientProtocolV2 { return ListImportsOutputForListImports.__default } + /** + Invokes the ListStackInstanceResourceDrifts operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDrifts( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) async throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + if let listStackInstanceResourceDriftsOverride = listStackInstanceResourceDriftsOverride { + return try await listStackInstanceResourceDriftsOverride(input) + } + + return ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts.__default + } + /** Invokes the ListStackInstances operation suspending until the response is available before returning. diff --git a/Sources/CloudformationClient/ThrowingCloudformationClient.swift b/Sources/CloudformationClient/ThrowingCloudformationClient.swift index d25d51c..133f939 100644 --- a/Sources/CloudformationClient/ThrowingCloudformationClient.swift +++ b/Sources/CloudformationClient/ThrowingCloudformationClient.swift @@ -118,6 +118,8 @@ public struct ThrowingCloudformationClient: CloudformationClientProtocol { let listExportsSyncOverride: ListExportsSyncType? let listImportsAsyncOverride: ListImportsAsyncType? let listImportsSyncOverride: ListImportsSyncType? + let listStackInstanceResourceDriftsAsyncOverride: ListStackInstanceResourceDriftsAsyncType? + let listStackInstanceResourceDriftsSyncOverride: ListStackInstanceResourceDriftsSyncType? let listStackInstancesAsyncOverride: ListStackInstancesAsyncType? let listStackInstancesSyncOverride: ListStackInstancesSyncType? let listStackResourcesAsyncOverride: ListStackResourcesAsyncType? @@ -262,6 +264,8 @@ public struct ThrowingCloudformationClient: CloudformationClientProtocol { listExportsSync: ListExportsSyncType? = nil, listImportsAsync: ListImportsAsyncType? = nil, listImportsSync: ListImportsSyncType? = nil, + listStackInstanceResourceDriftsAsync: ListStackInstanceResourceDriftsAsyncType? = nil, + listStackInstanceResourceDriftsSync: ListStackInstanceResourceDriftsSyncType? = nil, listStackInstancesAsync: ListStackInstancesAsyncType? = nil, listStackInstancesSync: ListStackInstancesSyncType? = nil, listStackResourcesAsync: ListStackResourcesAsyncType? = nil, @@ -401,6 +405,8 @@ public struct ThrowingCloudformationClient: CloudformationClientProtocol { self.listExportsSyncOverride = listExportsSync self.listImportsAsyncOverride = listImportsAsync self.listImportsSyncOverride = listImportsSync + self.listStackInstanceResourceDriftsAsyncOverride = listStackInstanceResourceDriftsAsync + self.listStackInstanceResourceDriftsSyncOverride = listStackInstanceResourceDriftsSync self.listStackInstancesAsyncOverride = listStackInstancesAsync self.listStackInstancesSyncOverride = listStackInstancesSync self.listStackResourcesAsyncOverride = listStackResourcesAsync @@ -2091,6 +2097,44 @@ public struct ThrowingCloudformationClient: CloudformationClientProtocol { throw error } + /** + Invokes the ListStackInstanceResourceDrifts operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - completion: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object or an error will be passed to this + callback when the operation is complete. The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts + object will be validated before being returned to caller. + The possible errors are: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDriftsAsync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput, + completion: @escaping (Result) -> ()) throws { + if let listStackInstanceResourceDriftsAsyncOverride = listStackInstanceResourceDriftsAsyncOverride { + return try listStackInstanceResourceDriftsAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the ListStackInstanceResourceDrifts operation waiting for the response before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDriftsSync( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + if let listStackInstanceResourceDriftsSyncOverride = listStackInstanceResourceDriftsSyncOverride { + return try listStackInstanceResourceDriftsSyncOverride(input) + } + + throw error + } + /** Invokes the ListStackInstances operation returning immediately and passing the response to a callback. diff --git a/Sources/CloudformationClient/ThrowingCloudformationClientV2.swift b/Sources/CloudformationClient/ThrowingCloudformationClientV2.swift index 2515831..6ebb318 100644 --- a/Sources/CloudformationClient/ThrowingCloudformationClientV2.swift +++ b/Sources/CloudformationClient/ThrowingCloudformationClientV2.swift @@ -75,6 +75,7 @@ public struct ThrowingCloudformationClientV2: CloudformationClientProtocolV2 { let listChangeSetsOverride: ListChangeSetsFunctionType? let listExportsOverride: ListExportsFunctionType? let listImportsOverride: ListImportsFunctionType? + let listStackInstanceResourceDriftsOverride: ListStackInstanceResourceDriftsFunctionType? let listStackInstancesOverride: ListStackInstancesFunctionType? let listStackResourcesOverride: ListStackResourcesFunctionType? let listStackSetOperationResultsOverride: ListStackSetOperationResultsFunctionType? @@ -150,6 +151,7 @@ public struct ThrowingCloudformationClientV2: CloudformationClientProtocolV2 { listChangeSets: ListChangeSetsFunctionType? = nil, listExports: ListExportsFunctionType? = nil, listImports: ListImportsFunctionType? = nil, + listStackInstanceResourceDrifts: ListStackInstanceResourceDriftsFunctionType? = nil, listStackInstances: ListStackInstancesFunctionType? = nil, listStackResources: ListStackResourcesFunctionType? = nil, listStackSetOperationResults: ListStackSetOperationResultsFunctionType? = nil, @@ -220,6 +222,7 @@ public struct ThrowingCloudformationClientV2: CloudformationClientProtocolV2 { self.listChangeSetsOverride = listChangeSets self.listExportsOverride = listExports self.listImportsOverride = listImports + self.listStackInstanceResourceDriftsOverride = listStackInstanceResourceDrifts self.listStackInstancesOverride = listStackInstances self.listStackResourcesOverride = listStackResources self.listStackSetOperationResultsOverride = listStackSetOperationResults @@ -1021,6 +1024,24 @@ public struct ThrowingCloudformationClientV2: CloudformationClientProtocolV2 { throw error } + /** + Invokes the ListStackInstanceResourceDrifts operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListStackInstanceResourceDriftsInput object being passed to this operation. + - Returns: The ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: operationNotFound, stackInstanceNotFound, stackSetNotFound. + */ + public func listStackInstanceResourceDrifts( + input: CloudformationModel.ListStackInstanceResourceDriftsInput) async throws -> CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + if let listStackInstanceResourceDriftsOverride = listStackInstanceResourceDriftsOverride { + return try await listStackInstanceResourceDriftsOverride(input) + } + + throw error + } + /** Invokes the ListStackInstances operation suspending until the response is available before returning. diff --git a/Sources/CloudformationModel/CloudformationModelDefaultInstances.swift b/Sources/CloudformationModel/CloudformationModelDefaultInstances.swift index 3deb8b9..a4a60ab 100644 --- a/Sources/CloudformationModel/CloudformationModelDefaultInstances.swift +++ b/Sources/CloudformationModel/CloudformationModelDefaultInstances.swift @@ -426,6 +426,7 @@ public extension CreateStackInput { onFailure: nil, parameters: nil, resourceTypes: nil, + retainExceptOnCreate: nil, roleARN: nil, rollbackConfiguration: nil, stackName: "value", @@ -1649,6 +1650,7 @@ public extension ExecuteChangeSetInput { changeSetName: "0", clientRequestToken: nil, disableRollback: nil, + retainExceptOnCreate: nil, stackName: nil) return defaultInstance @@ -1777,6 +1779,7 @@ public extension GetTemplateSummaryInput { stackName: nil, stackSetName: nil, templateBody: nil, + templateSummaryConfig: nil, templateURL: nil) return defaultInstance @@ -1797,7 +1800,8 @@ public extension GetTemplateSummaryOutput { parameters: nil, resourceIdentifierSummaries: nil, resourceTypes: nil, - version: nil) + version: nil, + warnings: nil) return defaultInstance }() @@ -2025,6 +2029,50 @@ public extension ListImportsOutputForListImports { }() } +public extension ListStackInstanceResourceDriftsInput { + /** + Default instance of the ListStackInstanceResourceDriftsInput structure. + */ + static let __default: CloudformationModel.ListStackInstanceResourceDriftsInput = { + let defaultInstance = CloudformationModel.ListStackInstanceResourceDriftsInput( + callAs: nil, + maxResults: nil, + nextToken: nil, + operationId: "0", + stackInstanceAccount: "", + stackInstanceRegion: "", + stackInstanceResourceDriftStatuses: nil, + stackSetName: "") + + return defaultInstance + }() +} + +public extension ListStackInstanceResourceDriftsOutput { + /** + Default instance of the ListStackInstanceResourceDriftsOutput structure. + */ + static let __default: CloudformationModel.ListStackInstanceResourceDriftsOutput = { + let defaultInstance = CloudformationModel.ListStackInstanceResourceDriftsOutput( + nextToken: nil, + summaries: nil) + + return defaultInstance + }() +} + +public extension ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts { + /** + Default instance of the ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts structure. + */ + static let __default: CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts = { + let defaultInstance = CloudformationModel.ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts( + listStackInstanceResourceDriftsResult: ListStackInstanceResourceDriftsOutput.__default) + + return defaultInstance + }() +} + public extension ListStackInstancesInput { /** Default instance of the ListStackInstancesInput structure. @@ -2857,6 +2905,7 @@ public extension RollbackStackInput { static let __default: CloudformationModel.RollbackStackInput = { let defaultInstance = CloudformationModel.RollbackStackInput( clientRequestToken: nil, + retainExceptOnCreate: nil, roleARN: nil, stackName: "0") @@ -3027,6 +3076,7 @@ public extension Stack { outputs: nil, parameters: nil, parentId: nil, + retainExceptOnCreate: nil, roleARN: nil, rollbackConfiguration: nil, rootId: nil, @@ -3153,6 +3203,25 @@ public extension StackInstanceNotFoundException { }() } +public extension StackInstanceResourceDriftsSummary { + /** + Default instance of the StackInstanceResourceDriftsSummary structure. + */ + static let __default: CloudformationModel.StackInstanceResourceDriftsSummary = { + let defaultInstance = CloudformationModel.StackInstanceResourceDriftsSummary( + logicalResourceId: "value", + physicalResourceId: nil, + physicalResourceIdContext: nil, + propertyDifferences: nil, + resourceType: "0", + stackId: "value", + stackResourceDriftStatus: .__default, + timestamp: "2013-02-18T17:00:00Z") + + return defaultInstance + }() +} + public extension StackInstanceSummary { /** Default instance of the StackInstanceSummary structure. @@ -3575,6 +3644,18 @@ public extension TemplateParameter { }() } +public extension TemplateSummaryConfig { + /** + Default instance of the TemplateSummaryConfig structure. + */ + static let __default: CloudformationModel.TemplateSummaryConfig = { + let defaultInstance = CloudformationModel.TemplateSummaryConfig( + treatUnrecognizedResourceTypesAsWarnings: nil) + + return defaultInstance + }() +} + public extension TestTypeInput { /** Default instance of the TestTypeInput structure. @@ -3751,6 +3832,7 @@ public extension UpdateStackInput { notificationARNs: nil, parameters: nil, resourceTypes: nil, + retainExceptOnCreate: nil, roleARN: nil, rollbackConfiguration: nil, stackName: "value", @@ -3965,3 +4047,15 @@ public extension ValidateTemplateOutputForValidateTemplate { return defaultInstance }() } + +public extension Warnings { + /** + Default instance of the Warnings structure. + */ + static let __default: CloudformationModel.Warnings = { + let defaultInstance = CloudformationModel.Warnings( + unrecognizedResourceTypes: nil) + + return defaultInstance + }() +} diff --git a/Sources/CloudformationModel/CloudformationModelOperations.swift b/Sources/CloudformationModel/CloudformationModelOperations.swift index 5beb553..51c01a9 100644 --- a/Sources/CloudformationModel/CloudformationModelOperations.swift +++ b/Sources/CloudformationModel/CloudformationModelOperations.swift @@ -70,6 +70,7 @@ public enum CloudformationModelOperations: String, Hashable, CustomStringConvert case listChangeSets = "ListChangeSets" case listExports = "ListExports" case listImports = "ListImports" + case listStackInstanceResourceDrifts = "ListStackInstanceResourceDrifts" case listStackInstances = "ListStackInstances" case listStackResources = "ListStackResources" case listStackSetOperationResults = "ListStackSetOperationResults" @@ -190,6 +191,8 @@ public enum CloudformationModelOperations: String, Hashable, CustomStringConvert return "/" case .listImports: return "/" + case .listStackInstanceResourceDrifts: + return "/" case .listStackInstances: return "/" case .listStackResources: diff --git a/Sources/CloudformationModel/CloudformationModelStructures.swift b/Sources/CloudformationModel/CloudformationModelStructures.swift index 200cd9a..a768e14 100644 --- a/Sources/CloudformationModel/CloudformationModelStructures.swift +++ b/Sources/CloudformationModel/CloudformationModelStructures.swift @@ -704,6 +704,7 @@ public struct CreateStackInput: Codable, Equatable { public var onFailure: OnFailure? public var parameters: Parameters? public var resourceTypes: ResourceTypes? + public var retainExceptOnCreate: RetainExceptOnCreate? public var roleARN: RoleARN? public var rollbackConfiguration: RollbackConfiguration? public var stackName: StackName @@ -722,6 +723,7 @@ public struct CreateStackInput: Codable, Equatable { onFailure: OnFailure? = nil, parameters: Parameters? = nil, resourceTypes: ResourceTypes? = nil, + retainExceptOnCreate: RetainExceptOnCreate? = nil, roleARN: RoleARN? = nil, rollbackConfiguration: RollbackConfiguration? = nil, stackName: StackName, @@ -739,6 +741,7 @@ public struct CreateStackInput: Codable, Equatable { self.onFailure = onFailure self.parameters = parameters self.resourceTypes = resourceTypes + self.retainExceptOnCreate = retainExceptOnCreate self.roleARN = roleARN self.rollbackConfiguration = rollbackConfiguration self.stackName = stackName @@ -759,6 +762,7 @@ public struct CreateStackInput: Codable, Equatable { case onFailure = "OnFailure" case parameters = "Parameters" case resourceTypes = "ResourceTypes" + case retainExceptOnCreate = "RetainExceptOnCreate" case roleARN = "RoleARN" case rollbackConfiguration = "RollbackConfiguration" case stackName = "StackName" @@ -2770,15 +2774,18 @@ public struct ExecuteChangeSetInput: Codable, Equatable { public var changeSetName: ChangeSetNameOrId public var clientRequestToken: ClientRequestToken? public var disableRollback: DisableRollback? + public var retainExceptOnCreate: RetainExceptOnCreate? public var stackName: StackNameOrId? public init(changeSetName: ChangeSetNameOrId, clientRequestToken: ClientRequestToken? = nil, disableRollback: DisableRollback? = nil, + retainExceptOnCreate: RetainExceptOnCreate? = nil, stackName: StackNameOrId? = nil) { self.changeSetName = changeSetName self.clientRequestToken = clientRequestToken self.disableRollback = disableRollback + self.retainExceptOnCreate = retainExceptOnCreate self.stackName = stackName } @@ -2786,6 +2793,7 @@ public struct ExecuteChangeSetInput: Codable, Equatable { case changeSetName = "ChangeSetName" case clientRequestToken = "ClientRequestToken" case disableRollback = "DisableRollback" + case retainExceptOnCreate = "RetainExceptOnCreate" case stackName = "StackName" } @@ -2956,17 +2964,20 @@ public struct GetTemplateSummaryInput: Codable, Equatable { public var stackName: StackNameOrId? public var stackSetName: StackSetNameOrId? public var templateBody: TemplateBody? + public var templateSummaryConfig: TemplateSummaryConfig? public var templateURL: TemplateURL? public init(callAs: CallAs? = nil, stackName: StackNameOrId? = nil, stackSetName: StackSetNameOrId? = nil, templateBody: TemplateBody? = nil, + templateSummaryConfig: TemplateSummaryConfig? = nil, templateURL: TemplateURL? = nil) { self.callAs = callAs self.stackName = stackName self.stackSetName = stackSetName self.templateBody = templateBody + self.templateSummaryConfig = templateSummaryConfig self.templateURL = templateURL } @@ -2975,6 +2986,7 @@ public struct GetTemplateSummaryInput: Codable, Equatable { case stackName = "StackName" case stackSetName = "StackSetName" case templateBody = "TemplateBody" + case templateSummaryConfig = "TemplateSummaryConfig" case templateURL = "TemplateURL" } @@ -2982,6 +2994,7 @@ public struct GetTemplateSummaryInput: Codable, Equatable { try stackName?.validateAsStackNameOrId() try stackSetName?.validateAsStackSetNameOrId() try templateBody?.validateAsTemplateBody() + try templateSummaryConfig?.validate() try templateURL?.validateAsTemplateURL() } } @@ -2996,6 +3009,7 @@ public struct GetTemplateSummaryOutput: Codable, Equatable { public var resourceIdentifierSummaries: ResourceIdentifierSummaries? public var resourceTypes: ResourceTypes? public var version: Version? + public var warnings: Warnings? public init(capabilities: Capabilities? = nil, capabilitiesReason: CapabilitiesReason? = nil, @@ -3005,7 +3019,8 @@ public struct GetTemplateSummaryOutput: Codable, Equatable { parameters: ParameterDeclarations? = nil, resourceIdentifierSummaries: ResourceIdentifierSummaries? = nil, resourceTypes: ResourceTypes? = nil, - version: Version? = nil) { + version: Version? = nil, + warnings: Warnings? = nil) { self.capabilities = capabilities self.capabilitiesReason = capabilitiesReason self.declaredTransforms = declaredTransforms @@ -3015,6 +3030,7 @@ public struct GetTemplateSummaryOutput: Codable, Equatable { self.resourceIdentifierSummaries = resourceIdentifierSummaries self.resourceTypes = resourceTypes self.version = version + self.warnings = warnings } enum CodingKeys: String, CodingKey { @@ -3027,10 +3043,12 @@ public struct GetTemplateSummaryOutput: Codable, Equatable { case resourceIdentifierSummaries = "ResourceIdentifierSummaries" case resourceTypes = "ResourceTypes" case version = "Version" + case warnings = "Warnings" } public func validate() throws { try description?.validateAsDescription() + try warnings?.validate() } } @@ -3335,6 +3353,92 @@ public struct ListImportsOutputForListImports: Codable, Equatable { } } +public struct ListStackInstanceResourceDriftsInput: Codable, Equatable { + public var callAs: CallAs? + public var maxResults: MaxResults? + public var nextToken: NextToken? + public var operationId: ClientRequestToken + public var stackInstanceAccount: Account + public var stackInstanceRegion: Region + public var stackInstanceResourceDriftStatuses: StackResourceDriftStatusFilters? + public var stackSetName: StackSetNameOrId + + public init(callAs: CallAs? = nil, + maxResults: MaxResults? = nil, + nextToken: NextToken? = nil, + operationId: ClientRequestToken, + stackInstanceAccount: Account, + stackInstanceRegion: Region, + stackInstanceResourceDriftStatuses: StackResourceDriftStatusFilters? = nil, + stackSetName: StackSetNameOrId) { + self.callAs = callAs + self.maxResults = maxResults + self.nextToken = nextToken + self.operationId = operationId + self.stackInstanceAccount = stackInstanceAccount + self.stackInstanceRegion = stackInstanceRegion + self.stackInstanceResourceDriftStatuses = stackInstanceResourceDriftStatuses + self.stackSetName = stackSetName + } + + enum CodingKeys: String, CodingKey { + case callAs = "CallAs" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case operationId = "OperationId" + case stackInstanceAccount = "StackInstanceAccount" + case stackInstanceRegion = "StackInstanceRegion" + case stackInstanceResourceDriftStatuses = "StackInstanceResourceDriftStatuses" + case stackSetName = "StackSetName" + } + + public func validate() throws { + try maxResults?.validateAsMaxResults() + try nextToken?.validateAsNextToken() + try operationId.validateAsClientRequestToken() + try stackInstanceAccount.validateAsAccount() + try stackInstanceRegion.validateAsRegion() + try stackInstanceResourceDriftStatuses?.validateAsStackResourceDriftStatusFilters() + try stackSetName.validateAsStackSetNameOrId() + } +} + +public struct ListStackInstanceResourceDriftsOutput: Codable, Equatable { + public var nextToken: NextToken? + public var summaries: StackInstanceResourceDriftsSummaries? + + public init(nextToken: NextToken? = nil, + summaries: StackInstanceResourceDriftsSummaries? = nil) { + self.nextToken = nextToken + self.summaries = summaries + } + + enum CodingKeys: String, CodingKey { + case nextToken = "NextToken" + case summaries = "Summaries" + } + + public func validate() throws { + try nextToken?.validateAsNextToken() + } +} + +public struct ListStackInstanceResourceDriftsOutputForListStackInstanceResourceDrifts: Codable, Equatable { + public var listStackInstanceResourceDriftsResult: ListStackInstanceResourceDriftsOutput + + public init(listStackInstanceResourceDriftsResult: ListStackInstanceResourceDriftsOutput) { + self.listStackInstanceResourceDriftsResult = listStackInstanceResourceDriftsResult + } + + enum CodingKeys: String, CodingKey { + case listStackInstanceResourceDriftsResult = "ListStackInstanceResourceDriftsResult" + } + + public func validate() throws { + try listStackInstanceResourceDriftsResult.validate() + } +} + public struct ListStackInstancesInput: Codable, Equatable { public var callAs: CallAs? public var filters: StackInstanceFilters? @@ -4695,19 +4799,23 @@ public struct RollbackConfiguration: Codable, Equatable { public struct RollbackStackInput: Codable, Equatable { public var clientRequestToken: ClientRequestToken? + public var retainExceptOnCreate: RetainExceptOnCreate? public var roleARN: RoleARN? public var stackName: StackNameOrId public init(clientRequestToken: ClientRequestToken? = nil, + retainExceptOnCreate: RetainExceptOnCreate? = nil, roleARN: RoleARN? = nil, stackName: StackNameOrId) { self.clientRequestToken = clientRequestToken + self.retainExceptOnCreate = retainExceptOnCreate self.roleARN = roleARN self.stackName = stackName } enum CodingKeys: String, CodingKey { case clientRequestToken = "ClientRequestToken" + case retainExceptOnCreate = "RetainExceptOnCreate" case roleARN = "RoleARN" case stackName = "StackName" } @@ -4959,6 +5067,7 @@ public struct Stack: Codable, Equatable { public var outputs: Outputs? public var parameters: Parameters? public var parentId: StackId? + public var retainExceptOnCreate: RetainExceptOnCreate? public var roleARN: RoleARN? public var rollbackConfiguration: RollbackConfiguration? public var rootId: StackId? @@ -4982,6 +5091,7 @@ public struct Stack: Codable, Equatable { outputs: Outputs? = nil, parameters: Parameters? = nil, parentId: StackId? = nil, + retainExceptOnCreate: RetainExceptOnCreate? = nil, roleARN: RoleARN? = nil, rollbackConfiguration: RollbackConfiguration? = nil, rootId: StackId? = nil, @@ -5004,6 +5114,7 @@ public struct Stack: Codable, Equatable { self.outputs = outputs self.parameters = parameters self.parentId = parentId + self.retainExceptOnCreate = retainExceptOnCreate self.roleARN = roleARN self.rollbackConfiguration = rollbackConfiguration self.rootId = rootId @@ -5029,6 +5140,7 @@ public struct Stack: Codable, Equatable { case outputs = "Outputs" case parameters = "Parameters" case parentId = "ParentId" + case retainExceptOnCreate = "RetainExceptOnCreate" case roleARN = "RoleARN" case rollbackConfiguration = "RollbackConfiguration" case rootId = "RootId" @@ -5277,6 +5389,51 @@ public struct StackInstanceNotFoundException: Codable, Equatable { } } +public struct StackInstanceResourceDriftsSummary: Codable, Equatable { + public var logicalResourceId: LogicalResourceId + public var physicalResourceId: PhysicalResourceId? + public var physicalResourceIdContext: PhysicalResourceIdContext? + public var propertyDifferences: PropertyDifferences? + public var resourceType: ResourceType + public var stackId: StackId + public var stackResourceDriftStatus: StackResourceDriftStatus + public var timestamp: Timestamp + + public init(logicalResourceId: LogicalResourceId, + physicalResourceId: PhysicalResourceId? = nil, + physicalResourceIdContext: PhysicalResourceIdContext? = nil, + propertyDifferences: PropertyDifferences? = nil, + resourceType: ResourceType, + stackId: StackId, + stackResourceDriftStatus: StackResourceDriftStatus, + timestamp: Timestamp) { + self.logicalResourceId = logicalResourceId + self.physicalResourceId = physicalResourceId + self.physicalResourceIdContext = physicalResourceIdContext + self.propertyDifferences = propertyDifferences + self.resourceType = resourceType + self.stackId = stackId + self.stackResourceDriftStatus = stackResourceDriftStatus + self.timestamp = timestamp + } + + enum CodingKeys: String, CodingKey { + case logicalResourceId = "LogicalResourceId" + case physicalResourceId = "PhysicalResourceId" + case physicalResourceIdContext = "PhysicalResourceIdContext" + case propertyDifferences = "PropertyDifferences" + case resourceType = "ResourceType" + case stackId = "StackId" + case stackResourceDriftStatus = "StackResourceDriftStatus" + case timestamp = "Timestamp" + } + + public func validate() throws { + try physicalResourceIdContext?.validateAsPhysicalResourceIdContext() + try resourceType.validateAsResourceType() + } +} + public struct StackInstanceSummary: Codable, Equatable { public var account: Account? public var driftStatus: StackDriftStatus? @@ -6190,6 +6347,21 @@ public struct TemplateParameter: Codable, Equatable { } } +public struct TemplateSummaryConfig: Codable, Equatable { + public var treatUnrecognizedResourceTypesAsWarnings: TreatUnrecognizedResourceTypesAsWarnings? + + public init(treatUnrecognizedResourceTypesAsWarnings: TreatUnrecognizedResourceTypesAsWarnings? = nil) { + self.treatUnrecognizedResourceTypesAsWarnings = treatUnrecognizedResourceTypesAsWarnings + } + + enum CodingKeys: String, CodingKey { + case treatUnrecognizedResourceTypesAsWarnings = "TreatUnrecognizedResourceTypesAsWarnings" + } + + public func validate() throws { + } +} + public struct TestTypeInput: Codable, Equatable { public var arn: TypeArn? public var logDeliveryBucket: S3Bucket? @@ -6515,6 +6687,7 @@ public struct UpdateStackInput: Codable, Equatable { public var notificationARNs: NotificationARNs? public var parameters: Parameters? public var resourceTypes: ResourceTypes? + public var retainExceptOnCreate: RetainExceptOnCreate? public var roleARN: RoleARN? public var rollbackConfiguration: RollbackConfiguration? public var stackName: StackName @@ -6533,6 +6706,7 @@ public struct UpdateStackInput: Codable, Equatable { notificationARNs: NotificationARNs? = nil, parameters: Parameters? = nil, resourceTypes: ResourceTypes? = nil, + retainExceptOnCreate: RetainExceptOnCreate? = nil, roleARN: RoleARN? = nil, rollbackConfiguration: RollbackConfiguration? = nil, stackName: StackName, @@ -6550,6 +6724,7 @@ public struct UpdateStackInput: Codable, Equatable { self.notificationARNs = notificationARNs self.parameters = parameters self.resourceTypes = resourceTypes + self.retainExceptOnCreate = retainExceptOnCreate self.roleARN = roleARN self.rollbackConfiguration = rollbackConfiguration self.stackName = stackName @@ -6570,6 +6745,7 @@ public struct UpdateStackInput: Codable, Equatable { case notificationARNs = "NotificationARNs" case parameters = "Parameters" case resourceTypes = "ResourceTypes" + case retainExceptOnCreate = "RetainExceptOnCreate" case roleARN = "RoleARN" case rollbackConfiguration = "RollbackConfiguration" case stackName = "StackName" @@ -6957,3 +7133,18 @@ public struct ValidateTemplateOutputForValidateTemplate: Codable, Equatable { try validateTemplateResult.validate() } } + +public struct Warnings: Codable, Equatable { + public var unrecognizedResourceTypes: ResourceTypes? + + public init(unrecognizedResourceTypes: ResourceTypes? = nil) { + self.unrecognizedResourceTypes = unrecognizedResourceTypes + } + + enum CodingKeys: String, CodingKey { + case unrecognizedResourceTypes = "UnrecognizedResourceTypes" + } + + public func validate() throws { + } +} diff --git a/Sources/CloudformationModel/CloudformationModelTypes.swift b/Sources/CloudformationModel/CloudformationModelTypes.swift index ee5b37a..7433d04 100644 --- a/Sources/CloudformationModel/CloudformationModelTypes.swift +++ b/Sources/CloudformationModel/CloudformationModelTypes.swift @@ -1104,6 +1104,7 @@ public enum ResourceAttribute: String, Codable, CustomStringConvertible { case properties = "Properties" case tags = "Tags" case updatePolicy = "UpdatePolicy" + case updateReplacePolicy = "UpdateReplacePolicy" public var description: String { return rawValue @@ -1235,6 +1236,11 @@ public typealias ResourcesToImport = [ResourceToImport] */ public typealias ResourcesToSkip = [ResourceToSkip] +/** + Type definition for the RetainExceptOnCreate field. + */ +public typealias RetainExceptOnCreate = Bool + /** Type definition for the RetainResources field. */ @@ -1370,6 +1376,7 @@ public enum StackInstanceDetailedStatus: String, Codable, CustomStringConvertibl */ public enum StackInstanceFilterName: String, Codable, CustomStringConvertible { case detailedStatus = "DETAILED_STATUS" + case driftStatus = "DRIFT_STATUS" case lastOperationId = "LAST_OPERATION_ID" public var description: String { @@ -1389,6 +1396,11 @@ public typealias StackInstanceFilterValues = String */ public typealias StackInstanceFilters = [StackInstanceFilter] +/** + Type definition for the StackInstanceResourceDriftsSummaries field. + */ +public typealias StackInstanceResourceDriftsSummaries = [StackInstanceResourceDriftsSummary] + /** Enumeration restricting the values of the StackInstanceStatus field. */ @@ -1781,6 +1793,11 @@ public typealias TransformName = String */ public typealias TransformsList = [TransformName] +/** + Type definition for the TreatUnrecognizedResourceTypesAsWarnings field. + */ +public typealias TreatUnrecognizedResourceTypesAsWarnings = Bool + /** Type definition for the Type field. */ @@ -2984,7 +3001,7 @@ extension CloudformationModel.StackInstanceFilterValues { extension Array where Element == CloudformationModel.StackInstanceFilter { public func validateAsStackInstanceFilters() throws { - if self.count > 2 { + if self.count > 3 { throw CloudformationError.validationError(reason: "The provided value to StackInstanceFilters violated the maximum length constraint.") } } diff --git a/Sources/CodePipelineModel/CodePipelineModelDefaultInstances.swift b/Sources/CodePipelineModel/CodePipelineModelDefaultInstances.swift index b3b51ad..fe3e1fc 100644 --- a/Sources/CodePipelineModel/CodePipelineModelDefaultInstances.swift +++ b/Sources/CodePipelineModel/CodePipelineModelDefaultInstances.swift @@ -1031,6 +1031,44 @@ public extension GetThirdPartyJobDetailsOutput { }() } +public extension GitConfiguration { + /** + Default instance of the GitConfiguration structure. + */ + static let __default: CodePipelineModel.GitConfiguration = { + let defaultInstance = CodePipelineModel.GitConfiguration( + push: nil, + sourceActionName: "0") + + return defaultInstance + }() +} + +public extension GitPushFilter { + /** + Default instance of the GitPushFilter structure. + */ + static let __default: CodePipelineModel.GitPushFilter = { + let defaultInstance = CodePipelineModel.GitPushFilter( + tags: nil) + + return defaultInstance + }() +} + +public extension GitTagFilterCriteria { + /** + Default instance of the GitTagFilterCriteria structure. + */ + static let __default: CodePipelineModel.GitTagFilterCriteria = { + let defaultInstance = CodePipelineModel.GitTagFilterCriteria( + excludes: nil, + includes: nil) + + return defaultInstance + }() +} + public extension InputArtifact { /** Default instance of the InputArtifact structure. @@ -1533,8 +1571,11 @@ public extension PipelineDeclaration { artifactStore: nil, artifactStores: nil, name: "0", + pipelineType: nil, roleArn: "", stages: [], + triggers: nil, + variables: nil, version: nil) return defaultInstance @@ -1552,7 +1593,9 @@ public extension PipelineExecution { pipelineName: nil, pipelineVersion: nil, status: nil, - statusSummary: nil) + statusSummary: nil, + trigger: nil, + variables: nil) return defaultInstance }() @@ -1644,6 +1687,7 @@ public extension PipelineSummary { let defaultInstance = CodePipelineModel.PipelineSummary( created: nil, name: nil, + pipelineType: nil, updated: nil, version: nil) @@ -1651,6 +1695,46 @@ public extension PipelineSummary { }() } +public extension PipelineTriggerDeclaration { + /** + Default instance of the PipelineTriggerDeclaration structure. + */ + static let __default: CodePipelineModel.PipelineTriggerDeclaration = { + let defaultInstance = CodePipelineModel.PipelineTriggerDeclaration( + gitConfiguration: GitConfiguration.__default, + providerType: .__default) + + return defaultInstance + }() +} + +public extension PipelineVariable { + /** + Default instance of the PipelineVariable structure. + */ + static let __default: CodePipelineModel.PipelineVariable = { + let defaultInstance = CodePipelineModel.PipelineVariable( + name: "0", + value: "0") + + return defaultInstance + }() +} + +public extension PipelineVariableDeclaration { + /** + Default instance of the PipelineVariableDeclaration structure. + */ + static let __default: CodePipelineModel.PipelineVariableDeclaration = { + let defaultInstance = CodePipelineModel.PipelineVariableDeclaration( + defaultValue: nil, + description: nil, + name: "0") + + return defaultInstance + }() +} + public extension PipelineVersionNotFoundException { /** Default instance of the PipelineVersionNotFoundException structure. @@ -1888,6 +1972,19 @@ public extension RequestFailedException { }() } +public extension ResolvedPipelineVariable { + /** + Default instance of the ResolvedPipelineVariable structure. + */ + static let __default: CodePipelineModel.ResolvedPipelineVariable = { + let defaultInstance = CodePipelineModel.ResolvedPipelineVariable( + name: nil, + resolvedValue: nil) + + return defaultInstance + }() +} + public extension ResourceNotFoundException { /** Default instance of the ResourceNotFoundException structure. @@ -2051,7 +2148,8 @@ public extension StartPipelineExecutionInput { static let __default: CodePipelineModel.StartPipelineExecutionInput = { let defaultInstance = CodePipelineModel.StartPipelineExecutionInput( clientRequestToken: nil, - name: "0") + name: "0", + variables: nil) return defaultInstance }() diff --git a/Sources/CodePipelineModel/CodePipelineModelStructures.swift b/Sources/CodePipelineModel/CodePipelineModelStructures.swift index a246764..2152ea0 100644 --- a/Sources/CodePipelineModel/CodePipelineModelStructures.swift +++ b/Sources/CodePipelineModel/CodePipelineModelStructures.swift @@ -1781,6 +1781,64 @@ public struct GetThirdPartyJobDetailsOutput: Codable, Equatable { } } +public struct GitConfiguration: Codable, Equatable { + public var push: GitPushFilterList? + public var sourceActionName: ActionName + + public init(push: GitPushFilterList? = nil, + sourceActionName: ActionName) { + self.push = push + self.sourceActionName = sourceActionName + } + + enum CodingKeys: String, CodingKey { + case push + case sourceActionName + } + + public func validate() throws { + try push?.validateAsGitPushFilterList() + try sourceActionName.validateAsActionName() + } +} + +public struct GitPushFilter: Codable, Equatable { + public var tags: GitTagFilterCriteria? + + public init(tags: GitTagFilterCriteria? = nil) { + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case tags + } + + public func validate() throws { + try tags?.validate() + } +} + +public struct GitTagFilterCriteria: Codable, Equatable { + public var excludes: GitTagPatternList? + public var includes: GitTagPatternList? + + public init(excludes: GitTagPatternList? = nil, + includes: GitTagPatternList? = nil) { + self.excludes = excludes + self.includes = includes + } + + enum CodingKeys: String, CodingKey { + case excludes + case includes + } + + public func validate() throws { + try excludes?.validateAsGitTagPatternList() + try includes?.validateAsGitTagPatternList() + } +} + public struct InputArtifact: Codable, Equatable { public var name: ArtifactName @@ -2490,21 +2548,30 @@ public struct PipelineDeclaration: Codable, Equatable { public var artifactStore: ArtifactStore? public var artifactStores: ArtifactStoreMap? public var name: PipelineName + public var pipelineType: PipelineType? public var roleArn: RoleArn public var stages: PipelineStageDeclarationList + public var triggers: PipelineTriggerDeclarationList? + public var variables: PipelineVariableDeclarationList? public var version: PipelineVersion? public init(artifactStore: ArtifactStore? = nil, artifactStores: ArtifactStoreMap? = nil, name: PipelineName, + pipelineType: PipelineType? = nil, roleArn: RoleArn, stages: PipelineStageDeclarationList, + triggers: PipelineTriggerDeclarationList? = nil, + variables: PipelineVariableDeclarationList? = nil, version: PipelineVersion? = nil) { self.artifactStore = artifactStore self.artifactStores = artifactStores self.name = name + self.pipelineType = pipelineType self.roleArn = roleArn self.stages = stages + self.triggers = triggers + self.variables = variables self.version = version } @@ -2512,8 +2579,11 @@ public struct PipelineDeclaration: Codable, Equatable { case artifactStore case artifactStores case name + case pipelineType case roleArn case stages + case triggers + case variables case version } @@ -2521,6 +2591,8 @@ public struct PipelineDeclaration: Codable, Equatable { try artifactStore?.validate() try name.validateAsPipelineName() try roleArn.validateAsRoleArn() + try triggers?.validateAsPipelineTriggerDeclarationList() + try variables?.validateAsPipelineVariableDeclarationList() try version?.validateAsPipelineVersion() } } @@ -2532,19 +2604,25 @@ public struct PipelineExecution: Codable, Equatable { public var pipelineVersion: PipelineVersion? public var status: PipelineExecutionStatus? public var statusSummary: PipelineExecutionStatusSummary? + public var trigger: ExecutionTrigger? + public var variables: ResolvedPipelineVariableList? public init(artifactRevisions: ArtifactRevisionList? = nil, pipelineExecutionId: PipelineExecutionId? = nil, pipelineName: PipelineName? = nil, pipelineVersion: PipelineVersion? = nil, status: PipelineExecutionStatus? = nil, - statusSummary: PipelineExecutionStatusSummary? = nil) { + statusSummary: PipelineExecutionStatusSummary? = nil, + trigger: ExecutionTrigger? = nil, + variables: ResolvedPipelineVariableList? = nil) { self.artifactRevisions = artifactRevisions self.pipelineExecutionId = pipelineExecutionId self.pipelineName = pipelineName self.pipelineVersion = pipelineVersion self.status = status self.statusSummary = statusSummary + self.trigger = trigger + self.variables = variables } enum CodingKeys: String, CodingKey { @@ -2554,12 +2632,15 @@ public struct PipelineExecution: Codable, Equatable { case pipelineVersion case status case statusSummary + case trigger + case variables } public func validate() throws { try pipelineExecutionId?.validateAsPipelineExecutionId() try pipelineName?.validateAsPipelineName() try pipelineVersion?.validateAsPipelineVersion() + try trigger?.validate() } } @@ -2679,15 +2760,18 @@ public struct PipelineNotFoundException: Codable, Equatable { public struct PipelineSummary: Codable, Equatable { public var created: Timestamp? public var name: PipelineName? + public var pipelineType: PipelineType? public var updated: Timestamp? public var version: PipelineVersion? public init(created: Timestamp? = nil, name: PipelineName? = nil, + pipelineType: PipelineType? = nil, updated: Timestamp? = nil, version: PipelineVersion? = nil) { self.created = created self.name = name + self.pipelineType = pipelineType self.updated = updated self.version = version } @@ -2695,6 +2779,7 @@ public struct PipelineSummary: Codable, Equatable { enum CodingKeys: String, CodingKey { case created case name + case pipelineType case updated case version } @@ -2705,6 +2790,73 @@ public struct PipelineSummary: Codable, Equatable { } } +public struct PipelineTriggerDeclaration: Codable, Equatable { + public var gitConfiguration: GitConfiguration + public var providerType: PipelineTriggerProviderType + + public init(gitConfiguration: GitConfiguration, + providerType: PipelineTriggerProviderType) { + self.gitConfiguration = gitConfiguration + self.providerType = providerType + } + + enum CodingKeys: String, CodingKey { + case gitConfiguration + case providerType + } + + public func validate() throws { + try gitConfiguration.validate() + } +} + +public struct PipelineVariable: Codable, Equatable { + public var name: PipelineVariableName + public var value: PipelineVariableValue + + public init(name: PipelineVariableName, + value: PipelineVariableValue) { + self.name = name + self.value = value + } + + enum CodingKeys: String, CodingKey { + case name + case value + } + + public func validate() throws { + try name.validateAsPipelineVariableName() + try value.validateAsPipelineVariableValue() + } +} + +public struct PipelineVariableDeclaration: Codable, Equatable { + public var defaultValue: PipelineVariableValue? + public var description: PipelineVariableDescription? + public var name: PipelineVariableName + + public init(defaultValue: PipelineVariableValue? = nil, + description: PipelineVariableDescription? = nil, + name: PipelineVariableName) { + self.defaultValue = defaultValue + self.description = description + self.name = name + } + + enum CodingKeys: String, CodingKey { + case defaultValue + case description + case name + } + + public func validate() throws { + try defaultValue?.validateAsPipelineVariableValue() + try description?.validateAsPipelineVariableDescription() + try name.validateAsPipelineVariableName() + } +} + public struct PipelineVersionNotFoundException: Codable, Equatable { public init() { @@ -3087,6 +3239,25 @@ public struct RequestFailedException: Codable, Equatable { } } +public struct ResolvedPipelineVariable: Codable, Equatable { + public var name: String? + public var resolvedValue: String? + + public init(name: String? = nil, + resolvedValue: String? = nil) { + self.name = name + self.resolvedValue = resolvedValue + } + + enum CodingKeys: String, CodingKey { + case name + case resolvedValue + } + + public func validate() throws { + } +} + public struct ResourceNotFoundException: Codable, Equatable { public init() { @@ -3329,21 +3500,26 @@ public struct StageState: Codable, Equatable { public struct StartPipelineExecutionInput: Codable, Equatable { public var clientRequestToken: ClientRequestToken? public var name: PipelineName + public var variables: PipelineVariableList? public init(clientRequestToken: ClientRequestToken? = nil, - name: PipelineName) { + name: PipelineName, + variables: PipelineVariableList? = nil) { self.clientRequestToken = clientRequestToken self.name = name + self.variables = variables } enum CodingKeys: String, CodingKey { case clientRequestToken case name + case variables } public func validate() throws { try clientRequestToken?.validateAsClientRequestToken() try name.validateAsPipelineName() + try variables?.validateAsPipelineVariableList() } } diff --git a/Sources/CodePipelineModel/CodePipelineModelTypes.swift b/Sources/CodePipelineModel/CodePipelineModelTypes.swift index 4c84811..dbf8a4d 100644 --- a/Sources/CodePipelineModel/CodePipelineModelTypes.swift +++ b/Sources/CodePipelineModel/CodePipelineModelTypes.swift @@ -409,6 +409,21 @@ public enum FailureType: String, Codable, CustomStringConvertible { public static let __default: FailureType = .configurationError } +/** + Type definition for the GitPushFilterList field. + */ +public typealias GitPushFilterList = [GitPushFilter] + +/** + Type definition for the GitTagNamePattern field. + */ +public typealias GitTagNamePattern = String + +/** + Type definition for the GitTagPatternList field. + */ +public typealias GitTagPatternList = [GitTagNamePattern] + /** Type definition for the InputArtifactList field. */ @@ -607,6 +622,63 @@ public typealias PipelineName = String */ public typealias PipelineStageDeclarationList = [StageDeclaration] +/** + Type definition for the PipelineTriggerDeclarationList field. + */ +public typealias PipelineTriggerDeclarationList = [PipelineTriggerDeclaration] + +/** + Enumeration restricting the values of the PipelineTriggerProviderType field. + */ +public enum PipelineTriggerProviderType: String, Codable, CustomStringConvertible { + case codestarsourceconnection = "CodeStarSourceConnection" + + public var description: String { + return rawValue + } + + public static let __default: PipelineTriggerProviderType = .codestarsourceconnection +} + +/** + Enumeration restricting the values of the PipelineType field. + */ +public enum PipelineType: String, Codable, CustomStringConvertible { + case v1 = "V1" + case v2 = "V2" + + public var description: String { + return rawValue + } + + public static let __default: PipelineType = .v1 +} + +/** + Type definition for the PipelineVariableDeclarationList field. + */ +public typealias PipelineVariableDeclarationList = [PipelineVariableDeclaration] + +/** + Type definition for the PipelineVariableDescription field. + */ +public typealias PipelineVariableDescription = String + +/** + Type definition for the PipelineVariableList field. + */ +public typealias PipelineVariableList = [PipelineVariable] + +/** + Type definition for the PipelineVariableName field. + */ +public typealias PipelineVariableName = String + +/** + Type definition for the PipelineVariableValue field. + */ +public typealias PipelineVariableValue = String + /** Type definition for the PipelineVersion field. */ @@ -642,6 +714,11 @@ public typealias QueryParamMap = [ActionConfigurationKey: ActionConfigurationQue */ public typealias ResolvedActionConfigurationMap = [String: String] +/** + Type definition for the ResolvedPipelineVariableList field. + */ +public typealias ResolvedPipelineVariableList = [ResolvedPipelineVariable] + /** Type definition for the ResourceArn field. */ @@ -744,13 +821,14 @@ public typealias StageName = String Enumeration restricting the values of the StageRetryMode field. */ public enum StageRetryMode: String, Codable, CustomStringConvertible { + case allActions = "ALL_ACTIONS" case failedActions = "FAILED_ACTIONS" public var description: String { return rawValue } - public static let __default: StageRetryMode = .failedActions + public static let __default: StageRetryMode = .allActions } /** @@ -832,6 +910,7 @@ public enum TriggerType: String, Codable, CustomStringConvertible { case putActionRevision = "PutActionRevision" case startPipelineExecution = "StartPipelineExecution" case webhook = "Webhook" + case webhookV2 = "WebhookV2" public var description: String { return rawValue @@ -1387,6 +1466,51 @@ extension CodePipelineModel.ExecutionSummary { } } +/** + Validation for the GitPushFilterList field. +*/ +extension Array where Element == CodePipelineModel.GitPushFilter { + public func validateAsGitPushFilterList() throws { + if self.count < 1 { + throw CodePipelineError.validationError(reason: "The provided value to GitPushFilterList violated the minimum length constraint.") + } + + if self.count > 1 { + throw CodePipelineError.validationError(reason: "The provided value to GitPushFilterList violated the maximum length constraint.") + } + } +} + +/** + Validation for the GitTagNamePattern field. +*/ +extension CodePipelineModel.GitTagNamePattern { + public func validateAsGitTagNamePattern() throws { + if self.count < 1 { + throw CodePipelineError.validationError(reason: "The provided value to GitTagNamePattern violated the minimum length constraint.") + } + + if self.count > 255 { + throw CodePipelineError.validationError(reason: "The provided value to GitTagNamePattern violated the maximum length constraint.") + } + } +} + +/** + Validation for the GitTagPatternList field. +*/ +extension Array where Element == CodePipelineModel.GitTagNamePattern { + public func validateAsGitTagPatternList() throws { + if self.count < 1 { + throw CodePipelineError.validationError(reason: "The provided value to GitTagPatternList violated the minimum length constraint.") + } + + if self.count > 8 { + throw CodePipelineError.validationError(reason: "The provided value to GitTagPatternList violated the maximum length constraint.") + } + } +} + /** Validation for the JobId field. */ @@ -1688,6 +1812,108 @@ extension CodePipelineModel.PipelineName { } } +/** + Validation for the PipelineTriggerDeclarationList field. +*/ +extension Array where Element == CodePipelineModel.PipelineTriggerDeclaration { + public func validateAsPipelineTriggerDeclarationList() throws { + + if self.count > 20 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineTriggerDeclarationList violated the maximum length constraint.") + } + } +} + +/** + Validation for the PipelineVariableDeclarationList field. +*/ +extension Array where Element == CodePipelineModel.PipelineVariableDeclaration { + public func validateAsPipelineVariableDeclarationList() throws { + + if self.count > 50 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableDeclarationList violated the maximum length constraint.") + } + } +} + +/** + Validation for the PipelineVariableDescription field. +*/ +extension CodePipelineModel.PipelineVariableDescription { + public func validateAsPipelineVariableDescription() throws { + if self.count < 0 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableDescription violated the minimum length constraint.") + } + + if self.count > 200 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableDescription violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: ".*", options: .regularExpression), + matchingRange == startIndex.. 50 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableList violated the maximum length constraint.") + } + } +} + +/** + Validation for the PipelineVariableName field. +*/ +extension CodePipelineModel.PipelineVariableName { + public func validateAsPipelineVariableName() throws { + if self.count < 1 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableName violated the minimum length constraint.") + } + + if self.count > 128 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableName violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "[A-Za-z0-9@\\-_]+", options: .regularExpression), + matchingRange == startIndex.. 1000 { + throw CodePipelineError.validationError(reason: "The provided value to PipelineVariableValue violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: ".*", options: .regularExpression), + matchingRange == startIndex.. ECRModel.DeleteLifecyclePolicyResponse { @@ -1556,7 +1556,7 @@ public struct AWSECRClient ECRModel.GetLifecyclePolicyResponse { @@ -1626,7 +1626,7 @@ public struct AWSECRClient ECRModel.GetLifecyclePolicyPreviewResponse { @@ -2326,7 +2326,7 @@ public struct AWSECRClient ECRModel.PutLifecyclePolicyResponse { @@ -2746,7 +2746,7 @@ public struct AWSECRClient ECRModel.StartLifecyclePolicyPreviewResponse { @@ -3279,7 +3279,7 @@ public struct AWSECRClient ECRModel.DeleteLifecyclePolicyResponse { @@ -3747,7 +3747,7 @@ public struct AWSECRClient ECRModel.GetLifecyclePolicyResponse { @@ -3783,7 +3783,7 @@ public struct AWSECRClient ECRModel.GetLifecyclePolicyPreviewResponse { @@ -4143,7 +4143,7 @@ public struct AWSECRClient ECRModel.PutLifecyclePolicyResponse { @@ -4359,7 +4359,7 @@ public struct AWSECRClient ECRModel.StartLifecyclePolicyPreviewResponse { diff --git a/Sources/ECRClient/ECRClientProtocol+async.swift b/Sources/ECRClient/ECRClientProtocol+async.swift index 8bb17da..c4289ad 100644 --- a/Sources/ECRClient/ECRClientProtocol+async.swift +++ b/Sources/ECRClient/ECRClientProtocol+async.swift @@ -226,7 +226,7 @@ public extension ECRClientProtocol { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func deleteLifecyclePolicy(input: ECRModel.DeleteLifecyclePolicyRequest) async throws -> ECRModel.DeleteLifecyclePolicyResponse { @@ -577,7 +577,7 @@ public extension ECRClientProtocol { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicy(input: ECRModel.GetLifecyclePolicyRequest) async throws -> ECRModel.GetLifecyclePolicyResponse { @@ -604,7 +604,7 @@ public extension ECRClientProtocol { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicyPreview(input: ECRModel.GetLifecyclePolicyPreviewRequest) async throws -> ECRModel.GetLifecyclePolicyPreviewResponse { @@ -874,7 +874,7 @@ public extension ECRClientProtocol { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ func putLifecyclePolicy(input: ECRModel.PutLifecyclePolicyRequest) async throws -> ECRModel.PutLifecyclePolicyResponse { @@ -1036,7 +1036,7 @@ public extension ECRClientProtocol { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ func startLifecyclePolicyPreview(input: ECRModel.StartLifecyclePolicyPreviewRequest) async throws -> ECRModel.StartLifecyclePolicyPreviewResponse { diff --git a/Sources/ECRClient/ECRClientProtocol.swift b/Sources/ECRClient/ECRClientProtocol.swift index a2b3b46..0a07bc6 100644 --- a/Sources/ECRClient/ECRClientProtocol.swift +++ b/Sources/ECRClient/ECRClientProtocol.swift @@ -425,7 +425,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - completion: The DeleteLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The DeleteLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func deleteLifecyclePolicyAsync( input: ECRModel.DeleteLifecyclePolicyRequest, @@ -438,7 +438,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func deleteLifecyclePolicySync( input: ECRModel.DeleteLifecyclePolicyRequest) throws -> ECRModel.DeleteLifecyclePolicyResponse @@ -763,7 +763,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - completion: The GetLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The GetLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicyAsync( input: ECRModel.GetLifecyclePolicyRequest, @@ -776,7 +776,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicySync( input: ECRModel.GetLifecyclePolicyRequest) throws -> ECRModel.GetLifecyclePolicyResponse @@ -789,7 +789,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - completion: The GetLifecyclePolicyPreviewResponse object or an error will be passed to this callback when the operation is complete. The GetLifecyclePolicyPreviewResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicyPreviewAsync( input: ECRModel.GetLifecyclePolicyPreviewRequest, @@ -802,7 +802,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicyPreviewSync( input: ECRModel.GetLifecyclePolicyPreviewRequest) throws -> ECRModel.GetLifecyclePolicyPreviewResponse @@ -1049,7 +1049,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - completion: The PutLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The PutLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, repositoryNotFound, server. + The possible errors are: invalidParameter, repositoryNotFound, server, validation. */ func putLifecyclePolicyAsync( input: ECRModel.PutLifecyclePolicyRequest, @@ -1062,7 +1062,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ func putLifecyclePolicySync( input: ECRModel.PutLifecyclePolicyRequest) throws -> ECRModel.PutLifecyclePolicyResponse @@ -1205,7 +1205,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - completion: The StartLifecyclePolicyPreviewResponse object or an error will be passed to this callback when the operation is complete. The StartLifecyclePolicyPreviewResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ func startLifecyclePolicyPreviewAsync( input: ECRModel.StartLifecyclePolicyPreviewRequest, @@ -1218,7 +1218,7 @@ public protocol ECRClientProtocol: ECRClientProtocolV2 { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ func startLifecyclePolicyPreviewSync( input: ECRModel.StartLifecyclePolicyPreviewRequest) throws -> ECRModel.StartLifecyclePolicyPreviewResponse diff --git a/Sources/ECRClient/ECRClientProtocolV2.swift b/Sources/ECRClient/ECRClientProtocolV2.swift index 32c1d7d..7a6d54d 100644 --- a/Sources/ECRClient/ECRClientProtocolV2.swift +++ b/Sources/ECRClient/ECRClientProtocolV2.swift @@ -204,7 +204,7 @@ public protocol ECRClientProtocolV2 { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func deleteLifecyclePolicy( input: ECRModel.DeleteLifecyclePolicyRequest) async throws -> ECRModel.DeleteLifecyclePolicyResponse @@ -360,7 +360,7 @@ public protocol ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicy( input: ECRModel.GetLifecyclePolicyRequest) async throws -> ECRModel.GetLifecyclePolicyResponse @@ -372,7 +372,7 @@ public protocol ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ func getLifecyclePolicyPreview( input: ECRModel.GetLifecyclePolicyPreviewRequest) async throws -> ECRModel.GetLifecyclePolicyPreviewResponse @@ -492,7 +492,7 @@ public protocol ECRClientProtocolV2 { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ func putLifecyclePolicy( input: ECRModel.PutLifecyclePolicyRequest) async throws -> ECRModel.PutLifecyclePolicyResponse @@ -564,7 +564,7 @@ public protocol ECRClientProtocolV2 { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ func startLifecyclePolicyPreview( input: ECRModel.StartLifecyclePolicyPreviewRequest) async throws -> ECRModel.StartLifecyclePolicyPreviewResponse diff --git a/Sources/ECRClient/MockECRClient.swift b/Sources/ECRClient/MockECRClient.swift index 1a36652..6843288 100644 --- a/Sources/ECRClient/MockECRClient.swift +++ b/Sources/ECRClient/MockECRClient.swift @@ -571,7 +571,7 @@ public struct MockECRClient: ECRClientProtocol { - completion: The DeleteLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The DeleteLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func deleteLifecyclePolicyAsync( input: ECRModel.DeleteLifecyclePolicyRequest, @@ -592,7 +592,7 @@ public struct MockECRClient: ECRClientProtocol { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func deleteLifecyclePolicySync( input: ECRModel.DeleteLifecyclePolicyRequest) throws -> ECRModel.DeleteLifecyclePolicyResponse { @@ -1091,7 +1091,7 @@ public struct MockECRClient: ECRClientProtocol { - completion: The GetLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The GetLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyAsync( input: ECRModel.GetLifecyclePolicyRequest, @@ -1112,7 +1112,7 @@ public struct MockECRClient: ECRClientProtocol { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicySync( input: ECRModel.GetLifecyclePolicyRequest) throws -> ECRModel.GetLifecyclePolicyResponse { @@ -1131,7 +1131,7 @@ public struct MockECRClient: ECRClientProtocol { - completion: The GetLifecyclePolicyPreviewResponse object or an error will be passed to this callback when the operation is complete. The GetLifecyclePolicyPreviewResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyPreviewAsync( input: ECRModel.GetLifecyclePolicyPreviewRequest, @@ -1152,7 +1152,7 @@ public struct MockECRClient: ECRClientProtocol { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyPreviewSync( input: ECRModel.GetLifecyclePolicyPreviewRequest) throws -> ECRModel.GetLifecyclePolicyPreviewResponse { @@ -1531,7 +1531,7 @@ public struct MockECRClient: ECRClientProtocol { - completion: The PutLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The PutLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, repositoryNotFound, server. + The possible errors are: invalidParameter, repositoryNotFound, server, validation. */ public func putLifecyclePolicyAsync( input: ECRModel.PutLifecyclePolicyRequest, @@ -1552,7 +1552,7 @@ public struct MockECRClient: ECRClientProtocol { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ public func putLifecyclePolicySync( input: ECRModel.PutLifecyclePolicyRequest) throws -> ECRModel.PutLifecyclePolicyResponse { @@ -1771,7 +1771,7 @@ public struct MockECRClient: ECRClientProtocol { - completion: The StartLifecyclePolicyPreviewResponse object or an error will be passed to this callback when the operation is complete. The StartLifecyclePolicyPreviewResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ public func startLifecyclePolicyPreviewAsync( input: ECRModel.StartLifecyclePolicyPreviewRequest, @@ -1792,7 +1792,7 @@ public struct MockECRClient: ECRClientProtocol { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ public func startLifecyclePolicyPreviewSync( input: ECRModel.StartLifecyclePolicyPreviewRequest) throws -> ECRModel.StartLifecyclePolicyPreviewResponse { diff --git a/Sources/ECRClient/MockECRClientV2.swift b/Sources/ECRClient/MockECRClientV2.swift index 04787ba..3e020d5 100644 --- a/Sources/ECRClient/MockECRClientV2.swift +++ b/Sources/ECRClient/MockECRClientV2.swift @@ -294,7 +294,7 @@ public struct MockECRClientV2: ECRClientProtocolV2 { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func deleteLifecyclePolicy( input: ECRModel.DeleteLifecyclePolicyRequest) async throws -> ECRModel.DeleteLifecyclePolicyResponse { @@ -528,7 +528,7 @@ public struct MockECRClientV2: ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicy( input: ECRModel.GetLifecyclePolicyRequest) async throws -> ECRModel.GetLifecyclePolicyResponse { @@ -546,7 +546,7 @@ public struct MockECRClientV2: ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyPreview( input: ECRModel.GetLifecyclePolicyPreviewRequest) async throws -> ECRModel.GetLifecyclePolicyPreviewResponse { @@ -726,7 +726,7 @@ public struct MockECRClientV2: ECRClientProtocolV2 { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ public func putLifecyclePolicy( input: ECRModel.PutLifecyclePolicyRequest) async throws -> ECRModel.PutLifecyclePolicyResponse { @@ -834,7 +834,7 @@ public struct MockECRClientV2: ECRClientProtocolV2 { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ public func startLifecyclePolicyPreview( input: ECRModel.StartLifecyclePolicyPreviewRequest) async throws -> ECRModel.StartLifecyclePolicyPreviewResponse { diff --git a/Sources/ECRClient/ThrowingECRClient.swift b/Sources/ECRClient/ThrowingECRClient.swift index 2e574e1..e683360 100644 --- a/Sources/ECRClient/ThrowingECRClient.swift +++ b/Sources/ECRClient/ThrowingECRClient.swift @@ -559,7 +559,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - completion: The DeleteLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The DeleteLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func deleteLifecyclePolicyAsync( input: ECRModel.DeleteLifecyclePolicyRequest, @@ -578,7 +578,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func deleteLifecyclePolicySync( input: ECRModel.DeleteLifecyclePolicyRequest) throws -> ECRModel.DeleteLifecyclePolicyResponse { @@ -1053,7 +1053,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - completion: The GetLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The GetLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyAsync( input: ECRModel.GetLifecyclePolicyRequest, @@ -1072,7 +1072,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicySync( input: ECRModel.GetLifecyclePolicyRequest) throws -> ECRModel.GetLifecyclePolicyResponse { @@ -1091,7 +1091,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - completion: The GetLifecyclePolicyPreviewResponse object or an error will be passed to this callback when the operation is complete. The GetLifecyclePolicyPreviewResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyPreviewAsync( input: ECRModel.GetLifecyclePolicyPreviewRequest, @@ -1110,7 +1110,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyPreviewSync( input: ECRModel.GetLifecyclePolicyPreviewRequest) throws -> ECRModel.GetLifecyclePolicyPreviewResponse { @@ -1471,7 +1471,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - completion: The PutLifecyclePolicyResponse object or an error will be passed to this callback when the operation is complete. The PutLifecyclePolicyResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, repositoryNotFound, server. + The possible errors are: invalidParameter, repositoryNotFound, server, validation. */ public func putLifecyclePolicyAsync( input: ECRModel.PutLifecyclePolicyRequest, @@ -1490,7 +1490,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ public func putLifecyclePolicySync( input: ECRModel.PutLifecyclePolicyRequest) throws -> ECRModel.PutLifecyclePolicyResponse { @@ -1699,7 +1699,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - completion: The StartLifecyclePolicyPreviewResponse object or an error will be passed to this callback when the operation is complete. The StartLifecyclePolicyPreviewResponse object will be validated before being returned to caller. - The possible errors are: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + The possible errors are: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ public func startLifecyclePolicyPreviewAsync( input: ECRModel.StartLifecyclePolicyPreviewRequest, @@ -1718,7 +1718,7 @@ public struct ThrowingECRClient: ECRClientProtocol { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ public func startLifecyclePolicyPreviewSync( input: ECRModel.StartLifecyclePolicyPreviewRequest) throws -> ECRModel.StartLifecyclePolicyPreviewResponse { diff --git a/Sources/ECRClient/ThrowingECRClientV2.swift b/Sources/ECRClient/ThrowingECRClientV2.swift index 3950b67..3971192 100644 --- a/Sources/ECRClient/ThrowingECRClientV2.swift +++ b/Sources/ECRClient/ThrowingECRClientV2.swift @@ -296,7 +296,7 @@ public struct ThrowingECRClientV2: ECRClientProtocolV2 { - input: The validated DeleteLifecyclePolicyRequest object being passed to this operation. - Returns: The DeleteLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func deleteLifecyclePolicy( input: ECRModel.DeleteLifecyclePolicyRequest) async throws -> ECRModel.DeleteLifecyclePolicyResponse { @@ -530,7 +530,7 @@ public struct ThrowingECRClientV2: ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyRequest object being passed to this operation. - Returns: The GetLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicy( input: ECRModel.GetLifecyclePolicyRequest) async throws -> ECRModel.GetLifecyclePolicyResponse { @@ -548,7 +548,7 @@ public struct ThrowingECRClientV2: ECRClientProtocolV2 { - input: The validated GetLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The GetLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyPreviewNotFound, repositoryNotFound, server, validation. */ public func getLifecyclePolicyPreview( input: ECRModel.GetLifecyclePolicyPreviewRequest) async throws -> ECRModel.GetLifecyclePolicyPreviewResponse { @@ -728,7 +728,7 @@ public struct ThrowingECRClientV2: ECRClientProtocolV2 { - input: The validated PutLifecyclePolicyRequest object being passed to this operation. - Returns: The PutLifecyclePolicyResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, repositoryNotFound, server. + - Throws: invalidParameter, repositoryNotFound, server, validation. */ public func putLifecyclePolicy( input: ECRModel.PutLifecyclePolicyRequest) async throws -> ECRModel.PutLifecyclePolicyResponse { @@ -836,7 +836,7 @@ public struct ThrowingECRClientV2: ECRClientProtocolV2 { - input: The validated StartLifecyclePolicyPreviewRequest object being passed to this operation. - Returns: The StartLifecyclePolicyPreviewResponse object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server. + - Throws: invalidParameter, lifecyclePolicyNotFound, lifecyclePolicyPreviewInProgress, repositoryNotFound, server, validation. */ public func startLifecyclePolicyPreview( input: ECRModel.StartLifecyclePolicyPreviewRequest) async throws -> ECRModel.StartLifecyclePolicyPreviewResponse { diff --git a/Sources/ECRModel/ECRModelDefaultInstances.swift b/Sources/ECRModel/ECRModelDefaultInstances.swift index 9d8bd1f..113b90e 100644 --- a/Sources/ECRModel/ECRModelDefaultInstances.swift +++ b/Sources/ECRModel/ECRModelDefaultInstances.swift @@ -2033,8 +2033,8 @@ public extension Tag { */ static let __default: ECRModel.Tag = { let defaultInstance = ECRModel.Tag( - key: nil, - value: nil) + key: "value", + value: "value") return defaultInstance }() diff --git a/Sources/ECRModel/ECRModelStructures.swift b/Sources/ECRModel/ECRModelStructures.swift index 8b48cef..b37cf0f 100644 --- a/Sources/ECRModel/ECRModelStructures.swift +++ b/Sources/ECRModel/ECRModelStructures.swift @@ -3394,11 +3394,11 @@ public struct StartLifecyclePolicyPreviewResponse: Codable, Equatable { } public struct Tag: Codable, Equatable { - public var key: TagKey? - public var value: TagValue? + public var key: TagKey + public var value: TagValue - public init(key: TagKey? = nil, - value: TagValue? = nil) { + public init(key: TagKey, + value: TagValue) { self.key = key self.value = value } diff --git a/Sources/ElasticComputeCloudClient/AWSElasticComputeCloudClient.swift b/Sources/ElasticComputeCloudClient/AWSElasticComputeCloudClient.swift index 084a5da..8ac5c61 100644 --- a/Sources/ElasticComputeCloudClient/AWSElasticComputeCloudClient.swift +++ b/Sources/ElasticComputeCloudClient/AWSElasticComputeCloudClient.swift @@ -11832,12 +11832,13 @@ public struct AWSElasticComputeCloudClient ()) throws { + completion: @escaping (Result) -> ()) throws { let handlerDelegate = AWSClientInvocationDelegate( credentialsProvider: credentialsProvider, awsRegion: awsRegion, @@ -11853,7 +11854,7 @@ public struct AWSElasticComputeCloudClient ElasticComputeCloudModel.DeleteKeyPairResult { let handlerDelegate = AWSClientInvocationDelegate( credentialsProvider: credentialsProvider, awsRegion: awsRegion, @@ -11887,7 +11890,7 @@ public struct AWSElasticComputeCloudClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.disableImage, + handlerDelegate: handlerDelegate) + let wrappedInput = DisableImageOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.disableImage.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the DisableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageSync( + input: ElasticComputeCloudModel.DisableImageRequest) throws -> ElasticComputeCloudModel.DisableImageResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.disableImage, + handlerDelegate: handlerDelegate) + let wrappedInput = DisableImageOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.disableImage.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the DisableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The DisableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The DisableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.disableImageBlockPublicAccess, + handlerDelegate: handlerDelegate) + let wrappedInput = DisableImageBlockPublicAccessOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.disableImageBlockPublicAccess.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the DisableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.disableImageBlockPublicAccess, + handlerDelegate: handlerDelegate) + let wrappedInput = DisableImageBlockPublicAccessOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.disableImageBlockPublicAccess.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the DisableImageDeprecation operation returning immediately and passing the response to a callback. @@ -30375,6 +30530,158 @@ public struct AWSElasticComputeCloudClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.enableImage, + handlerDelegate: handlerDelegate) + let wrappedInput = EnableImageOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.enableImage.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the EnableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageSync( + input: ElasticComputeCloudModel.EnableImageRequest) throws -> ElasticComputeCloudModel.EnableImageResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.enableImage, + handlerDelegate: handlerDelegate) + let wrappedInput = EnableImageOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.enableImage.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the EnableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The EnableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The EnableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.enableImageBlockPublicAccess, + handlerDelegate: handlerDelegate) + let wrappedInput = EnableImageBlockPublicAccessOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.enableImageBlockPublicAccess.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the EnableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.enableImageBlockPublicAccess, + handlerDelegate: handlerDelegate) + let wrappedInput = EnableImageBlockPublicAccessOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.enableImageBlockPublicAccess.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the EnableImageDeprecation operation returning immediately and passing the response to a callback. @@ -32345,6 +32652,82 @@ public struct AWSElasticComputeCloudClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getImageBlockPublicAccessState, + handlerDelegate: handlerDelegate) + let wrappedInput = GetImageBlockPublicAccessStateOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.getImageBlockPublicAccessState.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the GetImageBlockPublicAccessState operation waiting for the response before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessStateSync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getImageBlockPublicAccessState, + handlerDelegate: handlerDelegate) + let wrappedInput = GetImageBlockPublicAccessStateOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.getImageBlockPublicAccessState.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation returning immediately and passing the response to a callback. @@ -33485,6 +33868,82 @@ public struct AWSElasticComputeCloudClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getSecurityGroupsForVpc, + handlerDelegate: handlerDelegate) + let wrappedInput = GetSecurityGroupsForVpcOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.getSecurityGroupsForVpc.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the GetSecurityGroupsForVpc operation waiting for the response before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpcSync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getSecurityGroupsForVpc, + handlerDelegate: handlerDelegate) + let wrappedInput = GetSecurityGroupsForVpcOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.getSecurityGroupsForVpc.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the GetSerialConsoleAccessStatus operation returning immediately and passing the response to a callback. @@ -51122,9 +51581,11 @@ public struct AWSElasticComputeCloudClient ElasticComputeCloudModel.DeleteKeyPairResult { let handlerDelegate = AWSClientInvocationDelegate( credentialsProvider: credentialsProvider, awsRegion: awsRegion, @@ -51141,7 +51602,7 @@ public struct AWSElasticComputeCloudClient ElasticComputeCloudModel.DisableImageResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.disableImage, + handlerDelegate: handlerDelegate) + let wrappedInput = DisableImageOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.disableImage.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the DisableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccess( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.disableImageBlockPublicAccess, + handlerDelegate: handlerDelegate) + let wrappedInput = DisableImageBlockPublicAccessOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.disableImageBlockPublicAccess.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the DisableImageDeprecation operation suspending until the response is available before returning. @@ -60624,6 +61163,84 @@ public struct AWSElasticComputeCloudClient ElasticComputeCloudModel.EnableImageResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.enableImage, + handlerDelegate: handlerDelegate) + let wrappedInput = EnableImageOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.enableImage.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the EnableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccess( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.enableImageBlockPublicAccess, + handlerDelegate: handlerDelegate) + let wrappedInput = EnableImageBlockPublicAccessOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.enableImageBlockPublicAccess.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the EnableImageDeprecation operation suspending until the response is available before returning. @@ -61634,6 +62251,45 @@ public struct AWSElasticComputeCloudClient ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getImageBlockPublicAccessState, + handlerDelegate: handlerDelegate) + let wrappedInput = GetImageBlockPublicAccessStateOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.getImageBlockPublicAccessState.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation suspending until the response is available before returning. @@ -62219,6 +62875,45 @@ public struct AWSElasticComputeCloudClient ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getSecurityGroupsForVpc, + handlerDelegate: handlerDelegate) + let wrappedInput = GetSecurityGroupsForVpcOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: ElasticComputeCloudModelOperations.getSecurityGroupsForVpc.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: ElasticComputeCloudError = error.asTypedError() + throw typedError + } + } + /** Invokes the GetSerialConsoleAccessStatus operation suspending until the response is available before returning. diff --git a/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol+async.swift b/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol+async.swift index a2576a1..5a42b8c 100644 --- a/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol+async.swift +++ b/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol+async.swift @@ -3999,15 +3999,19 @@ public extension ElasticComputeCloudClientProtocol { - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ - func deleteKeyPair(input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws { + func deleteKeyPair(input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws + -> ElasticComputeCloudModel.DeleteKeyPairResult { return try await withCheckedThrowingContinuation { cont in do { - try deleteKeyPairAsync(input: input) { error in - if let error = error { + try deleteKeyPairAsync(input: input) { result in + switch result { + case .failure(let error): cont.resume(throwing: error) - } else { - cont.resume(returning: ()) + case .success(let response): + cont.resume(returning: response) } } } catch { @@ -9604,6 +9608,58 @@ public extension ElasticComputeCloudClientProtocol { } } + /** + Invokes the DisableImage operation and asynchronously returning the response. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func disableImage(input: ElasticComputeCloudModel.DisableImageRequest) async throws + -> ElasticComputeCloudModel.DisableImageResult { + return try await withCheckedThrowingContinuation { cont in + do { + try disableImageAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the DisableImageBlockPublicAccess operation and asynchronously returning the response. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func disableImageBlockPublicAccess(input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) async throws + -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + return try await withCheckedThrowingContinuation { cont in + do { + try disableImageBlockPublicAccessAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the DisableImageDeprecation operation and asynchronously returning the response. @@ -10268,6 +10324,58 @@ public extension ElasticComputeCloudClientProtocol { } } + /** + Invokes the EnableImage operation and asynchronously returning the response. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func enableImage(input: ElasticComputeCloudModel.EnableImageRequest) async throws + -> ElasticComputeCloudModel.EnableImageResult { + return try await withCheckedThrowingContinuation { cont in + do { + try enableImageAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the EnableImageBlockPublicAccess operation and asynchronously returning the response. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func enableImageBlockPublicAccess(input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) async throws + -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + return try await withCheckedThrowingContinuation { cont in + do { + try enableImageBlockPublicAccessAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the EnableImageDeprecation operation and asynchronously returning the response. @@ -10936,6 +11044,32 @@ public extension ElasticComputeCloudClientProtocol { } } + /** + Invokes the GetImageBlockPublicAccessState operation and asynchronously returning the response. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func getImageBlockPublicAccessState(input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) async throws + -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + return try await withCheckedThrowingContinuation { cont in + do { + try getImageBlockPublicAccessStateAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation and asynchronously returning the response. @@ -11326,6 +11460,32 @@ public extension ElasticComputeCloudClientProtocol { } } + /** + Invokes the GetSecurityGroupsForVpc operation and asynchronously returning the response. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func getSecurityGroupsForVpc(input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) async throws + -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + return try await withCheckedThrowingContinuation { cont in + do { + try getSecurityGroupsForVpcAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the GetSerialConsoleAccessStatus operation and asynchronously returning the response. diff --git a/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol.swift b/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol.swift index c70c859..ea2ee43 100644 --- a/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol.swift +++ b/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocol.swift @@ -800,10 +800,10 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt _ input: ElasticComputeCloudModel.DeleteIpamScopeRequest, _ completion: @escaping (Result) -> ()) throws -> () typealias DeleteKeyPairSyncType = ( - _ input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws -> () + _ input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws -> ElasticComputeCloudModel.DeleteKeyPairResult typealias DeleteKeyPairAsyncType = ( _ input: ElasticComputeCloudModel.DeleteKeyPairRequest, - _ completion: @escaping (ElasticComputeCloudError?) -> ()) throws -> () + _ completion: @escaping (Result) -> ()) throws -> () typealias DeleteLaunchTemplateSyncType = ( _ input: ElasticComputeCloudModel.DeleteLaunchTemplateRequest) throws -> ElasticComputeCloudModel.DeleteLaunchTemplateResult typealias DeleteLaunchTemplateAsyncType = ( @@ -1894,6 +1894,16 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt typealias DisableFastSnapshotRestoresAsyncType = ( _ input: ElasticComputeCloudModel.DisableFastSnapshotRestoresRequest, _ completion: @escaping (Result) -> ()) throws -> () + typealias DisableImageSyncType = ( + _ input: ElasticComputeCloudModel.DisableImageRequest) throws -> ElasticComputeCloudModel.DisableImageResult + typealias DisableImageAsyncType = ( + _ input: ElasticComputeCloudModel.DisableImageRequest, + _ completion: @escaping (Result) -> ()) throws -> () + typealias DisableImageBlockPublicAccessSyncType = ( + _ input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult + typealias DisableImageBlockPublicAccessAsyncType = ( + _ input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest, + _ completion: @escaping (Result) -> ()) throws -> () typealias DisableImageDeprecationSyncType = ( _ input: ElasticComputeCloudModel.DisableImageDeprecationRequest) throws -> ElasticComputeCloudModel.DisableImageDeprecationResult typealias DisableImageDeprecationAsyncType = ( @@ -2024,6 +2034,16 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt typealias EnableFastSnapshotRestoresAsyncType = ( _ input: ElasticComputeCloudModel.EnableFastSnapshotRestoresRequest, _ completion: @escaping (Result) -> ()) throws -> () + typealias EnableImageSyncType = ( + _ input: ElasticComputeCloudModel.EnableImageRequest) throws -> ElasticComputeCloudModel.EnableImageResult + typealias EnableImageAsyncType = ( + _ input: ElasticComputeCloudModel.EnableImageRequest, + _ completion: @escaping (Result) -> ()) throws -> () + typealias EnableImageBlockPublicAccessSyncType = ( + _ input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult + typealias EnableImageBlockPublicAccessAsyncType = ( + _ input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest, + _ completion: @escaping (Result) -> ()) throws -> () typealias EnableImageDeprecationSyncType = ( _ input: ElasticComputeCloudModel.EnableImageDeprecationRequest) throws -> ElasticComputeCloudModel.EnableImageDeprecationResult typealias EnableImageDeprecationAsyncType = ( @@ -2154,6 +2174,11 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt typealias GetHostReservationPurchasePreviewAsyncType = ( _ input: ElasticComputeCloudModel.GetHostReservationPurchasePreviewRequest, _ completion: @escaping (Result) -> ()) throws -> () + typealias GetImageBlockPublicAccessStateSyncType = ( + _ input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult + typealias GetImageBlockPublicAccessStateAsyncType = ( + _ input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest, + _ completion: @escaping (Result) -> ()) throws -> () typealias GetInstanceTypesFromInstanceRequirementsSyncType = ( _ input: ElasticComputeCloudModel.GetInstanceTypesFromInstanceRequirementsRequest) throws -> ElasticComputeCloudModel.GetInstanceTypesFromInstanceRequirementsResult typealias GetInstanceTypesFromInstanceRequirementsAsyncType = ( @@ -2229,6 +2254,11 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt typealias GetReservedInstancesExchangeQuoteAsyncType = ( _ input: ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteRequest, _ completion: @escaping (Result) -> ()) throws -> () + typealias GetSecurityGroupsForVpcSyncType = ( + _ input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult + typealias GetSecurityGroupsForVpcAsyncType = ( + _ input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest, + _ completion: @escaping (Result) -> ()) throws -> () typealias GetSerialConsoleAccessStatusSyncType = ( _ input: ElasticComputeCloudModel.GetSerialConsoleAccessStatusRequest) throws -> ElasticComputeCloudModel.GetSerialConsoleAccessStatusResult typealias GetSerialConsoleAccessStatusAsyncType = ( @@ -6671,21 +6701,24 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. - - completion: Nil or an error will be passed to this callback when the operation - is complete. + - completion: The DeleteKeyPairResult object or an error will be passed to this + callback when the operation is complete. The DeleteKeyPairResult + object will be validated before being returned to caller. */ func deleteKeyPairAsync( input: ElasticComputeCloudModel.DeleteKeyPairRequest, - completion: @escaping (ElasticComputeCloudError?) -> ()) throws + completion: @escaping (Result) -> ()) throws /** Invokes the DeleteKeyPair operation waiting for the response before returning. - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ func deleteKeyPairSync( - input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws + input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws -> ElasticComputeCloudModel.DeleteKeyPairResult /** Invokes the DeleteLaunchTemplate operation returning immediately and passing the response to a callback. @@ -11859,6 +11892,54 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt func disableFastSnapshotRestoresSync( input: ElasticComputeCloudModel.DisableFastSnapshotRestoresRequest) throws -> ElasticComputeCloudModel.DisableFastSnapshotRestoresResult + /** + Invokes the DisableImage operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - completion: The DisableImageResult object or an error will be passed to this + callback when the operation is complete. The DisableImageResult + object will be validated before being returned to caller. + */ + func disableImageAsync( + input: ElasticComputeCloudModel.DisableImageRequest, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the DisableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func disableImageSync( + input: ElasticComputeCloudModel.DisableImageRequest) throws -> ElasticComputeCloudModel.DisableImageResult + + /** + Invokes the DisableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The DisableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The DisableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + func disableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the DisableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func disableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult + /** Invokes the DisableImageDeprecation operation returning immediately and passing the response to a callback. @@ -12474,6 +12555,54 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt func enableFastSnapshotRestoresSync( input: ElasticComputeCloudModel.EnableFastSnapshotRestoresRequest) throws -> ElasticComputeCloudModel.EnableFastSnapshotRestoresResult + /** + Invokes the EnableImage operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - completion: The EnableImageResult object or an error will be passed to this + callback when the operation is complete. The EnableImageResult + object will be validated before being returned to caller. + */ + func enableImageAsync( + input: ElasticComputeCloudModel.EnableImageRequest, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the EnableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func enableImageSync( + input: ElasticComputeCloudModel.EnableImageRequest) throws -> ElasticComputeCloudModel.EnableImageResult + + /** + Invokes the EnableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The EnableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The EnableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + func enableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the EnableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func enableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult + /** Invokes the EnableImageDeprecation operation returning immediately and passing the response to a callback. @@ -13092,6 +13221,30 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt func getHostReservationPurchasePreviewSync( input: ElasticComputeCloudModel.GetHostReservationPurchasePreviewRequest) throws -> ElasticComputeCloudModel.GetHostReservationPurchasePreviewResult + /** + Invokes the GetImageBlockPublicAccessState operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - completion: The GetImageBlockPublicAccessStateResult object or an error will be passed to this + callback when the operation is complete. The GetImageBlockPublicAccessStateResult + object will be validated before being returned to caller. + */ + func getImageBlockPublicAccessStateAsync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the GetImageBlockPublicAccessState operation waiting for the response before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func getImageBlockPublicAccessStateSync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult + /** Invokes the GetInstanceTypesFromInstanceRequirements operation returning immediately and passing the response to a callback. @@ -13452,6 +13605,30 @@ public protocol ElasticComputeCloudClientProtocol: ElasticComputeCloudClientProt func getReservedInstancesExchangeQuoteSync( input: ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteRequest) throws -> ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteResult + /** + Invokes the GetSecurityGroupsForVpc operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - completion: The GetSecurityGroupsForVpcResult object or an error will be passed to this + callback when the operation is complete. The GetSecurityGroupsForVpcResult + object will be validated before being returned to caller. + */ + func getSecurityGroupsForVpcAsync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the GetSecurityGroupsForVpc operation waiting for the response before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func getSecurityGroupsForVpcSync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult + /** Invokes the GetSerialConsoleAccessStatus operation returning immediately and passing the response to a callback. diff --git a/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocolV2.swift b/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocolV2.swift index 0aff2d2..03c9798 100644 --- a/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocolV2.swift +++ b/Sources/ElasticComputeCloudClient/ElasticComputeCloudClientProtocolV2.swift @@ -339,7 +339,7 @@ public protocol ElasticComputeCloudClientProtocolV2 { typealias DeleteIpamScopeFunctionType = ( _ input: ElasticComputeCloudModel.DeleteIpamScopeRequest) async throws -> ElasticComputeCloudModel.DeleteIpamScopeResult typealias DeleteKeyPairFunctionType = ( - _ input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws -> () + _ input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws -> ElasticComputeCloudModel.DeleteKeyPairResult typealias DeleteLaunchTemplateFunctionType = ( _ input: ElasticComputeCloudModel.DeleteLaunchTemplateRequest) async throws -> ElasticComputeCloudModel.DeleteLaunchTemplateResult typealias DeleteLaunchTemplateVersionsFunctionType = ( @@ -776,6 +776,10 @@ public protocol ElasticComputeCloudClientProtocolV2 { _ input: ElasticComputeCloudModel.DisableFastLaunchRequest) async throws -> ElasticComputeCloudModel.DisableFastLaunchResult typealias DisableFastSnapshotRestoresFunctionType = ( _ input: ElasticComputeCloudModel.DisableFastSnapshotRestoresRequest) async throws -> ElasticComputeCloudModel.DisableFastSnapshotRestoresResult + typealias DisableImageFunctionType = ( + _ input: ElasticComputeCloudModel.DisableImageRequest) async throws -> ElasticComputeCloudModel.DisableImageResult + typealias DisableImageBlockPublicAccessFunctionType = ( + _ input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult typealias DisableImageDeprecationFunctionType = ( _ input: ElasticComputeCloudModel.DisableImageDeprecationRequest) async throws -> ElasticComputeCloudModel.DisableImageDeprecationResult typealias DisableIpamOrganizationAdminAccountFunctionType = ( @@ -828,6 +832,10 @@ public protocol ElasticComputeCloudClientProtocolV2 { _ input: ElasticComputeCloudModel.EnableFastLaunchRequest) async throws -> ElasticComputeCloudModel.EnableFastLaunchResult typealias EnableFastSnapshotRestoresFunctionType = ( _ input: ElasticComputeCloudModel.EnableFastSnapshotRestoresRequest) async throws -> ElasticComputeCloudModel.EnableFastSnapshotRestoresResult + typealias EnableImageFunctionType = ( + _ input: ElasticComputeCloudModel.EnableImageRequest) async throws -> ElasticComputeCloudModel.EnableImageResult + typealias EnableImageBlockPublicAccessFunctionType = ( + _ input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult typealias EnableImageDeprecationFunctionType = ( _ input: ElasticComputeCloudModel.EnableImageDeprecationRequest) async throws -> ElasticComputeCloudModel.EnableImageDeprecationResult typealias EnableIpamOrganizationAdminAccountFunctionType = ( @@ -880,6 +888,8 @@ public protocol ElasticComputeCloudClientProtocolV2 { _ input: ElasticComputeCloudModel.GetGroupsForCapacityReservationRequest) async throws -> ElasticComputeCloudModel.GetGroupsForCapacityReservationResult typealias GetHostReservationPurchasePreviewFunctionType = ( _ input: ElasticComputeCloudModel.GetHostReservationPurchasePreviewRequest) async throws -> ElasticComputeCloudModel.GetHostReservationPurchasePreviewResult + typealias GetImageBlockPublicAccessStateFunctionType = ( + _ input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) async throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult typealias GetInstanceTypesFromInstanceRequirementsFunctionType = ( _ input: ElasticComputeCloudModel.GetInstanceTypesFromInstanceRequirementsRequest) async throws -> ElasticComputeCloudModel.GetInstanceTypesFromInstanceRequirementsResult typealias GetInstanceUefiDataFunctionType = ( @@ -910,6 +920,8 @@ public protocol ElasticComputeCloudClientProtocolV2 { _ input: ElasticComputeCloudModel.GetPasswordDataRequest) async throws -> ElasticComputeCloudModel.GetPasswordDataResult typealias GetReservedInstancesExchangeQuoteFunctionType = ( _ input: ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteRequest) async throws -> ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteResult + typealias GetSecurityGroupsForVpcFunctionType = ( + _ input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) async throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult typealias GetSerialConsoleAccessStatusFunctionType = ( _ input: ElasticComputeCloudModel.GetSerialConsoleAccessStatusRequest) async throws -> ElasticComputeCloudModel.GetSerialConsoleAccessStatusResult typealias GetSpotPlacementScoresFunctionType = ( @@ -2898,9 +2910,11 @@ public protocol ElasticComputeCloudClientProtocolV2 { - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ func deleteKeyPair( - input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws + input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws -> ElasticComputeCloudModel.DeleteKeyPairResult /** Invokes the DeleteLaunchTemplate operation suspending until the response is available before returning. @@ -5260,6 +5274,28 @@ public protocol ElasticComputeCloudClientProtocolV2 { func disableFastSnapshotRestores( input: ElasticComputeCloudModel.DisableFastSnapshotRestoresRequest) async throws -> ElasticComputeCloudModel.DisableFastSnapshotRestoresResult + /** + Invokes the DisableImage operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func disableImage( + input: ElasticComputeCloudModel.DisableImageRequest) async throws -> ElasticComputeCloudModel.DisableImageResult + + /** + Invokes the DisableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func disableImageBlockPublicAccess( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult + /** Invokes the DisableImageDeprecation operation suspending until the response is available before returning. @@ -5540,6 +5576,28 @@ public protocol ElasticComputeCloudClientProtocolV2 { func enableFastSnapshotRestores( input: ElasticComputeCloudModel.EnableFastSnapshotRestoresRequest) async throws -> ElasticComputeCloudModel.EnableFastSnapshotRestoresResult + /** + Invokes the EnableImage operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func enableImage( + input: ElasticComputeCloudModel.EnableImageRequest) async throws -> ElasticComputeCloudModel.EnableImageResult + + /** + Invokes the EnableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func enableImageBlockPublicAccess( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult + /** Invokes the EnableImageDeprecation operation suspending until the response is available before returning. @@ -5822,6 +5880,17 @@ public protocol ElasticComputeCloudClientProtocolV2 { func getHostReservationPurchasePreview( input: ElasticComputeCloudModel.GetHostReservationPurchasePreviewRequest) async throws -> ElasticComputeCloudModel.GetHostReservationPurchasePreviewResult + /** + Invokes the GetImageBlockPublicAccessState operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func getImageBlockPublicAccessState( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) async throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult + /** Invokes the GetInstanceTypesFromInstanceRequirements operation suspending until the response is available before returning. @@ -5987,6 +6056,17 @@ public protocol ElasticComputeCloudClientProtocolV2 { func getReservedInstancesExchangeQuote( input: ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteRequest) async throws -> ElasticComputeCloudModel.GetReservedInstancesExchangeQuoteResult + /** + Invokes the GetSecurityGroupsForVpc operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + func getSecurityGroupsForVpc( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) async throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult + /** Invokes the GetSerialConsoleAccessStatus operation suspending until the response is available before returning. diff --git a/Sources/ElasticComputeCloudClient/ElasticComputeCloudInvocationsReporting.swift b/Sources/ElasticComputeCloudClient/ElasticComputeCloudInvocationsReporting.swift index 4156216..e779be1 100644 --- a/Sources/ElasticComputeCloudClient/ElasticComputeCloudInvocationsReporting.swift +++ b/Sources/ElasticComputeCloudClient/ElasticComputeCloudInvocationsReporting.swift @@ -402,6 +402,8 @@ public struct ElasticComputeCloudInvocationsReporting public let disableFastLaunch: SmokeAWSHTTPClientInvocationReporting public let disableFastSnapshotRestores: SmokeAWSHTTPClientInvocationReporting + public let disableImage: SmokeAWSHTTPClientInvocationReporting + public let disableImageBlockPublicAccess: SmokeAWSHTTPClientInvocationReporting public let disableImageDeprecation: SmokeAWSHTTPClientInvocationReporting public let disableIpamOrganizationAdminAccount: SmokeAWSHTTPClientInvocationReporting public let disableSerialConsoleAccess: SmokeAWSHTTPClientInvocationReporting @@ -428,6 +430,8 @@ public struct ElasticComputeCloudInvocationsReporting public let enableFastLaunch: SmokeAWSHTTPClientInvocationReporting public let enableFastSnapshotRestores: SmokeAWSHTTPClientInvocationReporting + public let enableImage: SmokeAWSHTTPClientInvocationReporting + public let enableImageBlockPublicAccess: SmokeAWSHTTPClientInvocationReporting public let enableImageDeprecation: SmokeAWSHTTPClientInvocationReporting public let enableIpamOrganizationAdminAccount: SmokeAWSHTTPClientInvocationReporting public let enableReachabilityAnalyzerOrganizationSharing: SmokeAWSHTTPClientInvocationReporting @@ -454,6 +458,7 @@ public struct ElasticComputeCloudInvocationsReporting public let getGroupsForCapacityReservation: SmokeAWSHTTPClientInvocationReporting public let getHostReservationPurchasePreview: SmokeAWSHTTPClientInvocationReporting + public let getImageBlockPublicAccessState: SmokeAWSHTTPClientInvocationReporting public let getInstanceTypesFromInstanceRequirements: SmokeAWSHTTPClientInvocationReporting public let getInstanceUefiData: SmokeAWSHTTPClientInvocationReporting public let getIpamAddressHistory: SmokeAWSHTTPClientInvocationReporting @@ -469,6 +474,7 @@ public struct ElasticComputeCloudInvocationsReporting public let getPasswordData: SmokeAWSHTTPClientInvocationReporting public let getReservedInstancesExchangeQuote: SmokeAWSHTTPClientInvocationReporting + public let getSecurityGroupsForVpc: SmokeAWSHTTPClientInvocationReporting public let getSerialConsoleAccessStatus: SmokeAWSHTTPClientInvocationReporting public let getSpotPlacementScores: SmokeAWSHTTPClientInvocationReporting public let getSubnetCidrReservations: SmokeAWSHTTPClientInvocationReporting @@ -1371,6 +1377,10 @@ public struct ElasticComputeCloudInvocationsReporting BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DeleteKeyPairResult { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the DeleteLaunchTemplate operation in a HTTP client. */ @@ -4457,6 +4470,32 @@ extension DisableFastSnapshotRestoresResult: HTTPResponseOutputProtocol { } } +/** + Type to handle the output from the DisableImage operation in a HTTP client. + */ +extension DisableImageResult: HTTPResponseOutputProtocol { + public typealias BodyType = DisableImageResult + public typealias HeadersType = DisableImageResult + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DisableImageResult { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the DisableImageBlockPublicAccess operation in a HTTP client. + */ +extension DisableImageBlockPublicAccessResult: HTTPResponseOutputProtocol { + public typealias BodyType = DisableImageBlockPublicAccessResult + public typealias HeadersType = DisableImageBlockPublicAccessResult + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DisableImageBlockPublicAccessResult { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the DisableImageDeprecation operation in a HTTP client. */ @@ -4756,6 +4795,32 @@ extension EnableFastSnapshotRestoresResult: HTTPResponseOutputProtocol { } } +/** + Type to handle the output from the EnableImage operation in a HTTP client. + */ +extension EnableImageResult: HTTPResponseOutputProtocol { + public typealias BodyType = EnableImageResult + public typealias HeadersType = EnableImageResult + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> EnableImageResult { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the EnableImageBlockPublicAccess operation in a HTTP client. + */ +extension EnableImageBlockPublicAccessResult: HTTPResponseOutputProtocol { + public typealias BodyType = EnableImageBlockPublicAccessResult + public typealias HeadersType = EnableImageBlockPublicAccessResult + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> EnableImageBlockPublicAccessResult { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the EnableImageDeprecation operation in a HTTP client. */ @@ -5068,6 +5133,19 @@ extension GetHostReservationPurchasePreviewResult: HTTPResponseOutputProtocol { } } +/** + Type to handle the output from the GetImageBlockPublicAccessState operation in a HTTP client. + */ +extension GetImageBlockPublicAccessStateResult: HTTPResponseOutputProtocol { + public typealias BodyType = GetImageBlockPublicAccessStateResult + public typealias HeadersType = GetImageBlockPublicAccessStateResult + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> GetImageBlockPublicAccessStateResult { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the GetInstanceTypesFromInstanceRequirements operation in a HTTP client. */ @@ -5263,6 +5341,19 @@ extension GetReservedInstancesExchangeQuoteResult: HTTPResponseOutputProtocol { } } +/** + Type to handle the output from the GetSecurityGroupsForVpc operation in a HTTP client. + */ +extension GetSecurityGroupsForVpcResult: HTTPResponseOutputProtocol { + public typealias BodyType = GetSecurityGroupsForVpcResult + public typealias HeadersType = GetSecurityGroupsForVpcResult + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> GetSecurityGroupsForVpcResult { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the GetSerialConsoleAccessStatus operation in a HTTP client. */ diff --git a/Sources/ElasticComputeCloudClient/ElasticComputeCloudOperationsReporting.swift b/Sources/ElasticComputeCloudClient/ElasticComputeCloudOperationsReporting.swift index 0d7d8c3..2e99fe6 100644 --- a/Sources/ElasticComputeCloudClient/ElasticComputeCloudOperationsReporting.swift +++ b/Sources/ElasticComputeCloudClient/ElasticComputeCloudOperationsReporting.swift @@ -401,6 +401,8 @@ public struct ElasticComputeCloudOperationsReporting { public let disableEbsEncryptionByDefault: StandardSmokeAWSOperationReporting public let disableFastLaunch: StandardSmokeAWSOperationReporting public let disableFastSnapshotRestores: StandardSmokeAWSOperationReporting + public let disableImage: StandardSmokeAWSOperationReporting + public let disableImageBlockPublicAccess: StandardSmokeAWSOperationReporting public let disableImageDeprecation: StandardSmokeAWSOperationReporting public let disableIpamOrganizationAdminAccount: StandardSmokeAWSOperationReporting public let disableSerialConsoleAccess: StandardSmokeAWSOperationReporting @@ -427,6 +429,8 @@ public struct ElasticComputeCloudOperationsReporting { public let enableEbsEncryptionByDefault: StandardSmokeAWSOperationReporting public let enableFastLaunch: StandardSmokeAWSOperationReporting public let enableFastSnapshotRestores: StandardSmokeAWSOperationReporting + public let enableImage: StandardSmokeAWSOperationReporting + public let enableImageBlockPublicAccess: StandardSmokeAWSOperationReporting public let enableImageDeprecation: StandardSmokeAWSOperationReporting public let enableIpamOrganizationAdminAccount: StandardSmokeAWSOperationReporting public let enableReachabilityAnalyzerOrganizationSharing: StandardSmokeAWSOperationReporting @@ -453,6 +457,7 @@ public struct ElasticComputeCloudOperationsReporting { public let getFlowLogsIntegrationTemplate: StandardSmokeAWSOperationReporting public let getGroupsForCapacityReservation: StandardSmokeAWSOperationReporting public let getHostReservationPurchasePreview: StandardSmokeAWSOperationReporting + public let getImageBlockPublicAccessState: StandardSmokeAWSOperationReporting public let getInstanceTypesFromInstanceRequirements: StandardSmokeAWSOperationReporting public let getInstanceUefiData: StandardSmokeAWSOperationReporting public let getIpamAddressHistory: StandardSmokeAWSOperationReporting @@ -468,6 +473,7 @@ public struct ElasticComputeCloudOperationsReporting { public let getNetworkInsightsAccessScopeContent: StandardSmokeAWSOperationReporting public let getPasswordData: StandardSmokeAWSOperationReporting public let getReservedInstancesExchangeQuote: StandardSmokeAWSOperationReporting + public let getSecurityGroupsForVpc: StandardSmokeAWSOperationReporting public let getSerialConsoleAccessStatus: StandardSmokeAWSOperationReporting public let getSpotPlacementScores: StandardSmokeAWSOperationReporting public let getSubnetCidrReservations: StandardSmokeAWSOperationReporting @@ -1370,6 +1376,10 @@ public struct ElasticComputeCloudOperationsReporting { clientName: clientName, operation: .disableFastLaunch, configuration: reportingConfiguration) self.disableFastSnapshotRestores = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .disableFastSnapshotRestores, configuration: reportingConfiguration) + self.disableImage = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .disableImage, configuration: reportingConfiguration) + self.disableImageBlockPublicAccess = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .disableImageBlockPublicAccess, configuration: reportingConfiguration) self.disableImageDeprecation = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .disableImageDeprecation, configuration: reportingConfiguration) self.disableIpamOrganizationAdminAccount = StandardSmokeAWSOperationReporting( @@ -1422,6 +1432,10 @@ public struct ElasticComputeCloudOperationsReporting { clientName: clientName, operation: .enableFastLaunch, configuration: reportingConfiguration) self.enableFastSnapshotRestores = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .enableFastSnapshotRestores, configuration: reportingConfiguration) + self.enableImage = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .enableImage, configuration: reportingConfiguration) + self.enableImageBlockPublicAccess = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .enableImageBlockPublicAccess, configuration: reportingConfiguration) self.enableImageDeprecation = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .enableImageDeprecation, configuration: reportingConfiguration) self.enableIpamOrganizationAdminAccount = StandardSmokeAWSOperationReporting( @@ -1474,6 +1488,8 @@ public struct ElasticComputeCloudOperationsReporting { clientName: clientName, operation: .getGroupsForCapacityReservation, configuration: reportingConfiguration) self.getHostReservationPurchasePreview = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .getHostReservationPurchasePreview, configuration: reportingConfiguration) + self.getImageBlockPublicAccessState = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .getImageBlockPublicAccessState, configuration: reportingConfiguration) self.getInstanceTypesFromInstanceRequirements = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .getInstanceTypesFromInstanceRequirements, configuration: reportingConfiguration) self.getInstanceUefiData = StandardSmokeAWSOperationReporting( @@ -1504,6 +1520,8 @@ public struct ElasticComputeCloudOperationsReporting { clientName: clientName, operation: .getPasswordData, configuration: reportingConfiguration) self.getReservedInstancesExchangeQuote = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .getReservedInstancesExchangeQuote, configuration: reportingConfiguration) + self.getSecurityGroupsForVpc = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .getSecurityGroupsForVpc, configuration: reportingConfiguration) self.getSerialConsoleAccessStatus = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .getSerialConsoleAccessStatus, configuration: reportingConfiguration) self.getSpotPlacementScores = StandardSmokeAWSOperationReporting( diff --git a/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClient.swift b/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClient.swift index f0bff22..92c1553 100644 --- a/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClient.swift +++ b/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClient.swift @@ -775,6 +775,10 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { let disableFastLaunchSyncOverride: DisableFastLaunchSyncType? let disableFastSnapshotRestoresAsyncOverride: DisableFastSnapshotRestoresAsyncType? let disableFastSnapshotRestoresSyncOverride: DisableFastSnapshotRestoresSyncType? + let disableImageAsyncOverride: DisableImageAsyncType? + let disableImageSyncOverride: DisableImageSyncType? + let disableImageBlockPublicAccessAsyncOverride: DisableImageBlockPublicAccessAsyncType? + let disableImageBlockPublicAccessSyncOverride: DisableImageBlockPublicAccessSyncType? let disableImageDeprecationAsyncOverride: DisableImageDeprecationAsyncType? let disableImageDeprecationSyncOverride: DisableImageDeprecationSyncType? let disableIpamOrganizationAdminAccountAsyncOverride: DisableIpamOrganizationAdminAccountAsyncType? @@ -827,6 +831,10 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { let enableFastLaunchSyncOverride: EnableFastLaunchSyncType? let enableFastSnapshotRestoresAsyncOverride: EnableFastSnapshotRestoresAsyncType? let enableFastSnapshotRestoresSyncOverride: EnableFastSnapshotRestoresSyncType? + let enableImageAsyncOverride: EnableImageAsyncType? + let enableImageSyncOverride: EnableImageSyncType? + let enableImageBlockPublicAccessAsyncOverride: EnableImageBlockPublicAccessAsyncType? + let enableImageBlockPublicAccessSyncOverride: EnableImageBlockPublicAccessSyncType? let enableImageDeprecationAsyncOverride: EnableImageDeprecationAsyncType? let enableImageDeprecationSyncOverride: EnableImageDeprecationSyncType? let enableIpamOrganizationAdminAccountAsyncOverride: EnableIpamOrganizationAdminAccountAsyncType? @@ -879,6 +887,8 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { let getGroupsForCapacityReservationSyncOverride: GetGroupsForCapacityReservationSyncType? let getHostReservationPurchasePreviewAsyncOverride: GetHostReservationPurchasePreviewAsyncType? let getHostReservationPurchasePreviewSyncOverride: GetHostReservationPurchasePreviewSyncType? + let getImageBlockPublicAccessStateAsyncOverride: GetImageBlockPublicAccessStateAsyncType? + let getImageBlockPublicAccessStateSyncOverride: GetImageBlockPublicAccessStateSyncType? let getInstanceTypesFromInstanceRequirementsAsyncOverride: GetInstanceTypesFromInstanceRequirementsAsyncType? let getInstanceTypesFromInstanceRequirementsSyncOverride: GetInstanceTypesFromInstanceRequirementsSyncType? let getInstanceUefiDataAsyncOverride: GetInstanceUefiDataAsyncType? @@ -909,6 +919,8 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { let getPasswordDataSyncOverride: GetPasswordDataSyncType? let getReservedInstancesExchangeQuoteAsyncOverride: GetReservedInstancesExchangeQuoteAsyncType? let getReservedInstancesExchangeQuoteSyncOverride: GetReservedInstancesExchangeQuoteSyncType? + let getSecurityGroupsForVpcAsyncOverride: GetSecurityGroupsForVpcAsyncType? + let getSecurityGroupsForVpcSyncOverride: GetSecurityGroupsForVpcSyncType? let getSerialConsoleAccessStatusAsyncOverride: GetSerialConsoleAccessStatusAsyncType? let getSerialConsoleAccessStatusSyncOverride: GetSerialConsoleAccessStatusSyncType? let getSpotPlacementScoresAsyncOverride: GetSpotPlacementScoresAsyncType? @@ -1969,6 +1981,10 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { disableFastLaunchSync: DisableFastLaunchSyncType? = nil, disableFastSnapshotRestoresAsync: DisableFastSnapshotRestoresAsyncType? = nil, disableFastSnapshotRestoresSync: DisableFastSnapshotRestoresSyncType? = nil, + disableImageAsync: DisableImageAsyncType? = nil, + disableImageSync: DisableImageSyncType? = nil, + disableImageBlockPublicAccessAsync: DisableImageBlockPublicAccessAsyncType? = nil, + disableImageBlockPublicAccessSync: DisableImageBlockPublicAccessSyncType? = nil, disableImageDeprecationAsync: DisableImageDeprecationAsyncType? = nil, disableImageDeprecationSync: DisableImageDeprecationSyncType? = nil, disableIpamOrganizationAdminAccountAsync: DisableIpamOrganizationAdminAccountAsyncType? = nil, @@ -2021,6 +2037,10 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { enableFastLaunchSync: EnableFastLaunchSyncType? = nil, enableFastSnapshotRestoresAsync: EnableFastSnapshotRestoresAsyncType? = nil, enableFastSnapshotRestoresSync: EnableFastSnapshotRestoresSyncType? = nil, + enableImageAsync: EnableImageAsyncType? = nil, + enableImageSync: EnableImageSyncType? = nil, + enableImageBlockPublicAccessAsync: EnableImageBlockPublicAccessAsyncType? = nil, + enableImageBlockPublicAccessSync: EnableImageBlockPublicAccessSyncType? = nil, enableImageDeprecationAsync: EnableImageDeprecationAsyncType? = nil, enableImageDeprecationSync: EnableImageDeprecationSyncType? = nil, enableIpamOrganizationAdminAccountAsync: EnableIpamOrganizationAdminAccountAsyncType? = nil, @@ -2073,6 +2093,8 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { getGroupsForCapacityReservationSync: GetGroupsForCapacityReservationSyncType? = nil, getHostReservationPurchasePreviewAsync: GetHostReservationPurchasePreviewAsyncType? = nil, getHostReservationPurchasePreviewSync: GetHostReservationPurchasePreviewSyncType? = nil, + getImageBlockPublicAccessStateAsync: GetImageBlockPublicAccessStateAsyncType? = nil, + getImageBlockPublicAccessStateSync: GetImageBlockPublicAccessStateSyncType? = nil, getInstanceTypesFromInstanceRequirementsAsync: GetInstanceTypesFromInstanceRequirementsAsyncType? = nil, getInstanceTypesFromInstanceRequirementsSync: GetInstanceTypesFromInstanceRequirementsSyncType? = nil, getInstanceUefiDataAsync: GetInstanceUefiDataAsyncType? = nil, @@ -2103,6 +2125,8 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { getPasswordDataSync: GetPasswordDataSyncType? = nil, getReservedInstancesExchangeQuoteAsync: GetReservedInstancesExchangeQuoteAsyncType? = nil, getReservedInstancesExchangeQuoteSync: GetReservedInstancesExchangeQuoteSyncType? = nil, + getSecurityGroupsForVpcAsync: GetSecurityGroupsForVpcAsyncType? = nil, + getSecurityGroupsForVpcSync: GetSecurityGroupsForVpcSyncType? = nil, getSerialConsoleAccessStatusAsync: GetSerialConsoleAccessStatusAsyncType? = nil, getSerialConsoleAccessStatusSync: GetSerialConsoleAccessStatusSyncType? = nil, getSpotPlacementScoresAsync: GetSpotPlacementScoresAsyncType? = nil, @@ -3157,6 +3181,10 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { self.disableFastLaunchSyncOverride = disableFastLaunchSync self.disableFastSnapshotRestoresAsyncOverride = disableFastSnapshotRestoresAsync self.disableFastSnapshotRestoresSyncOverride = disableFastSnapshotRestoresSync + self.disableImageAsyncOverride = disableImageAsync + self.disableImageSyncOverride = disableImageSync + self.disableImageBlockPublicAccessAsyncOverride = disableImageBlockPublicAccessAsync + self.disableImageBlockPublicAccessSyncOverride = disableImageBlockPublicAccessSync self.disableImageDeprecationAsyncOverride = disableImageDeprecationAsync self.disableImageDeprecationSyncOverride = disableImageDeprecationSync self.disableIpamOrganizationAdminAccountAsyncOverride = disableIpamOrganizationAdminAccountAsync @@ -3209,6 +3237,10 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { self.enableFastLaunchSyncOverride = enableFastLaunchSync self.enableFastSnapshotRestoresAsyncOverride = enableFastSnapshotRestoresAsync self.enableFastSnapshotRestoresSyncOverride = enableFastSnapshotRestoresSync + self.enableImageAsyncOverride = enableImageAsync + self.enableImageSyncOverride = enableImageSync + self.enableImageBlockPublicAccessAsyncOverride = enableImageBlockPublicAccessAsync + self.enableImageBlockPublicAccessSyncOverride = enableImageBlockPublicAccessSync self.enableImageDeprecationAsyncOverride = enableImageDeprecationAsync self.enableImageDeprecationSyncOverride = enableImageDeprecationSync self.enableIpamOrganizationAdminAccountAsyncOverride = enableIpamOrganizationAdminAccountAsync @@ -3261,6 +3293,8 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { self.getGroupsForCapacityReservationSyncOverride = getGroupsForCapacityReservationSync self.getHostReservationPurchasePreviewAsyncOverride = getHostReservationPurchasePreviewAsync self.getHostReservationPurchasePreviewSyncOverride = getHostReservationPurchasePreviewSync + self.getImageBlockPublicAccessStateAsyncOverride = getImageBlockPublicAccessStateAsync + self.getImageBlockPublicAccessStateSyncOverride = getImageBlockPublicAccessStateSync self.getInstanceTypesFromInstanceRequirementsAsyncOverride = getInstanceTypesFromInstanceRequirementsAsync self.getInstanceTypesFromInstanceRequirementsSyncOverride = getInstanceTypesFromInstanceRequirementsSync self.getInstanceUefiDataAsyncOverride = getInstanceUefiDataAsync @@ -3291,6 +3325,8 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { self.getPasswordDataSyncOverride = getPasswordDataSync self.getReservedInstancesExchangeQuoteAsyncOverride = getReservedInstancesExchangeQuoteAsync self.getReservedInstancesExchangeQuoteSyncOverride = getReservedInstancesExchangeQuoteSync + self.getSecurityGroupsForVpcAsyncOverride = getSecurityGroupsForVpcAsync + self.getSecurityGroupsForVpcSyncOverride = getSecurityGroupsForVpcSync self.getSerialConsoleAccessStatusAsyncOverride = getSerialConsoleAccessStatusAsync self.getSerialConsoleAccessStatusSyncOverride = getSerialConsoleAccessStatusSync self.getSpotPlacementScoresAsyncOverride = getSpotPlacementScoresAsync @@ -9398,17 +9434,20 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. - - completion: Nil or an error will be passed to this callback when the operation - is complete. + - completion: The DeleteKeyPairResult object or an error will be passed to this + callback when the operation is complete. The DeleteKeyPairResult + object will be validated before being returned to caller. */ public func deleteKeyPairAsync( input: ElasticComputeCloudModel.DeleteKeyPairRequest, - completion: @escaping (ElasticComputeCloudError?) -> ()) throws { + completion: @escaping (Result) -> ()) throws { if let deleteKeyPairAsyncOverride = deleteKeyPairAsyncOverride { return try deleteKeyPairAsyncOverride(input, completion) } - completion(nil) + let result = DeleteKeyPairResult.__default + + completion(.success(result)) } /** @@ -9416,13 +9455,16 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ public func deleteKeyPairSync( - input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws { + input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws -> ElasticComputeCloudModel.DeleteKeyPairResult { if let deleteKeyPairSyncOverride = deleteKeyPairSyncOverride { return try deleteKeyPairSyncOverride(input) } + return DeleteKeyPairResult.__default } /** @@ -17589,6 +17631,82 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { return DisableFastSnapshotRestoresResult.__default } + /** + Invokes the DisableImage operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - completion: The DisableImageResult object or an error will be passed to this + callback when the operation is complete. The DisableImageResult + object will be validated before being returned to caller. + */ + public func disableImageAsync( + input: ElasticComputeCloudModel.DisableImageRequest, + completion: @escaping (Result) -> ()) throws { + if let disableImageAsyncOverride = disableImageAsyncOverride { + return try disableImageAsyncOverride(input, completion) + } + + let result = DisableImageResult.__default + + completion(.success(result)) + } + + /** + Invokes the DisableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageSync( + input: ElasticComputeCloudModel.DisableImageRequest) throws -> ElasticComputeCloudModel.DisableImageResult { + if let disableImageSyncOverride = disableImageSyncOverride { + return try disableImageSyncOverride(input) + } + + return DisableImageResult.__default + } + + /** + Invokes the DisableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The DisableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The DisableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws { + if let disableImageBlockPublicAccessAsyncOverride = disableImageBlockPublicAccessAsyncOverride { + return try disableImageBlockPublicAccessAsyncOverride(input, completion) + } + + let result = DisableImageBlockPublicAccessResult.__default + + completion(.success(result)) + } + + /** + Invokes the DisableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + if let disableImageBlockPublicAccessSyncOverride = disableImageBlockPublicAccessSyncOverride { + return try disableImageBlockPublicAccessSyncOverride(input) + } + + return DisableImageBlockPublicAccessResult.__default + } + /** Invokes the DisableImageDeprecation operation returning immediately and passing the response to a callback. @@ -18559,6 +18677,82 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { return EnableFastSnapshotRestoresResult.__default } + /** + Invokes the EnableImage operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - completion: The EnableImageResult object or an error will be passed to this + callback when the operation is complete. The EnableImageResult + object will be validated before being returned to caller. + */ + public func enableImageAsync( + input: ElasticComputeCloudModel.EnableImageRequest, + completion: @escaping (Result) -> ()) throws { + if let enableImageAsyncOverride = enableImageAsyncOverride { + return try enableImageAsyncOverride(input, completion) + } + + let result = EnableImageResult.__default + + completion(.success(result)) + } + + /** + Invokes the EnableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageSync( + input: ElasticComputeCloudModel.EnableImageRequest) throws -> ElasticComputeCloudModel.EnableImageResult { + if let enableImageSyncOverride = enableImageSyncOverride { + return try enableImageSyncOverride(input) + } + + return EnableImageResult.__default + } + + /** + Invokes the EnableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The EnableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The EnableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws { + if let enableImageBlockPublicAccessAsyncOverride = enableImageBlockPublicAccessAsyncOverride { + return try enableImageBlockPublicAccessAsyncOverride(input, completion) + } + + let result = EnableImageBlockPublicAccessResult.__default + + completion(.success(result)) + } + + /** + Invokes the EnableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + if let enableImageBlockPublicAccessSyncOverride = enableImageBlockPublicAccessSyncOverride { + return try enableImageBlockPublicAccessSyncOverride(input) + } + + return EnableImageBlockPublicAccessResult.__default + } + /** Invokes the EnableImageDeprecation operation returning immediately and passing the response to a callback. @@ -19535,6 +19729,44 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { return GetHostReservationPurchasePreviewResult.__default } + /** + Invokes the GetImageBlockPublicAccessState operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - completion: The GetImageBlockPublicAccessStateResult object or an error will be passed to this + callback when the operation is complete. The GetImageBlockPublicAccessStateResult + object will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessStateAsync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest, + completion: @escaping (Result) -> ()) throws { + if let getImageBlockPublicAccessStateAsyncOverride = getImageBlockPublicAccessStateAsyncOverride { + return try getImageBlockPublicAccessStateAsyncOverride(input, completion) + } + + let result = GetImageBlockPublicAccessStateResult.__default + + completion(.success(result)) + } + + /** + Invokes the GetImageBlockPublicAccessState operation waiting for the response before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessStateSync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + if let getImageBlockPublicAccessStateSyncOverride = getImageBlockPublicAccessStateSyncOverride { + return try getImageBlockPublicAccessStateSyncOverride(input) + } + + return GetImageBlockPublicAccessStateResult.__default + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation returning immediately and passing the response to a callback. @@ -20105,6 +20337,44 @@ public struct MockElasticComputeCloudClient: ElasticComputeCloudClientProtocol { return GetReservedInstancesExchangeQuoteResult.__default } + /** + Invokes the GetSecurityGroupsForVpc operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - completion: The GetSecurityGroupsForVpcResult object or an error will be passed to this + callback when the operation is complete. The GetSecurityGroupsForVpcResult + object will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpcAsync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest, + completion: @escaping (Result) -> ()) throws { + if let getSecurityGroupsForVpcAsyncOverride = getSecurityGroupsForVpcAsyncOverride { + return try getSecurityGroupsForVpcAsyncOverride(input, completion) + } + + let result = GetSecurityGroupsForVpcResult.__default + + completion(.success(result)) + } + + /** + Invokes the GetSecurityGroupsForVpc operation waiting for the response before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpcSync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + if let getSecurityGroupsForVpcSyncOverride = getSecurityGroupsForVpcSyncOverride { + return try getSecurityGroupsForVpcSyncOverride(input) + } + + return GetSecurityGroupsForVpcResult.__default + } + /** Invokes the GetSerialConsoleAccessStatus operation returning immediately and passing the response to a callback. diff --git a/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClientV2.swift b/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClientV2.swift index 9552e18..1871fd0 100644 --- a/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClientV2.swift +++ b/Sources/ElasticComputeCloudClient/MockElasticComputeCloudClientV2.swift @@ -403,6 +403,8 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol let disableEbsEncryptionByDefaultOverride: DisableEbsEncryptionByDefaultFunctionType? let disableFastLaunchOverride: DisableFastLaunchFunctionType? let disableFastSnapshotRestoresOverride: DisableFastSnapshotRestoresFunctionType? + let disableImageOverride: DisableImageFunctionType? + let disableImageBlockPublicAccessOverride: DisableImageBlockPublicAccessFunctionType? let disableImageDeprecationOverride: DisableImageDeprecationFunctionType? let disableIpamOrganizationAdminAccountOverride: DisableIpamOrganizationAdminAccountFunctionType? let disableSerialConsoleAccessOverride: DisableSerialConsoleAccessFunctionType? @@ -429,6 +431,8 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol let enableEbsEncryptionByDefaultOverride: EnableEbsEncryptionByDefaultFunctionType? let enableFastLaunchOverride: EnableFastLaunchFunctionType? let enableFastSnapshotRestoresOverride: EnableFastSnapshotRestoresFunctionType? + let enableImageOverride: EnableImageFunctionType? + let enableImageBlockPublicAccessOverride: EnableImageBlockPublicAccessFunctionType? let enableImageDeprecationOverride: EnableImageDeprecationFunctionType? let enableIpamOrganizationAdminAccountOverride: EnableIpamOrganizationAdminAccountFunctionType? let enableReachabilityAnalyzerOrganizationSharingOverride: EnableReachabilityAnalyzerOrganizationSharingFunctionType? @@ -455,6 +459,7 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol let getFlowLogsIntegrationTemplateOverride: GetFlowLogsIntegrationTemplateFunctionType? let getGroupsForCapacityReservationOverride: GetGroupsForCapacityReservationFunctionType? let getHostReservationPurchasePreviewOverride: GetHostReservationPurchasePreviewFunctionType? + let getImageBlockPublicAccessStateOverride: GetImageBlockPublicAccessStateFunctionType? let getInstanceTypesFromInstanceRequirementsOverride: GetInstanceTypesFromInstanceRequirementsFunctionType? let getInstanceUefiDataOverride: GetInstanceUefiDataFunctionType? let getIpamAddressHistoryOverride: GetIpamAddressHistoryFunctionType? @@ -470,6 +475,7 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol let getNetworkInsightsAccessScopeContentOverride: GetNetworkInsightsAccessScopeContentFunctionType? let getPasswordDataOverride: GetPasswordDataFunctionType? let getReservedInstancesExchangeQuoteOverride: GetReservedInstancesExchangeQuoteFunctionType? + let getSecurityGroupsForVpcOverride: GetSecurityGroupsForVpcFunctionType? let getSerialConsoleAccessStatusOverride: GetSerialConsoleAccessStatusFunctionType? let getSpotPlacementScoresOverride: GetSpotPlacementScoresFunctionType? let getSubnetCidrReservationsOverride: GetSubnetCidrReservationsFunctionType? @@ -1003,6 +1009,8 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol disableEbsEncryptionByDefault: DisableEbsEncryptionByDefaultFunctionType? = nil, disableFastLaunch: DisableFastLaunchFunctionType? = nil, disableFastSnapshotRestores: DisableFastSnapshotRestoresFunctionType? = nil, + disableImage: DisableImageFunctionType? = nil, + disableImageBlockPublicAccess: DisableImageBlockPublicAccessFunctionType? = nil, disableImageDeprecation: DisableImageDeprecationFunctionType? = nil, disableIpamOrganizationAdminAccount: DisableIpamOrganizationAdminAccountFunctionType? = nil, disableSerialConsoleAccess: DisableSerialConsoleAccessFunctionType? = nil, @@ -1029,6 +1037,8 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol enableEbsEncryptionByDefault: EnableEbsEncryptionByDefaultFunctionType? = nil, enableFastLaunch: EnableFastLaunchFunctionType? = nil, enableFastSnapshotRestores: EnableFastSnapshotRestoresFunctionType? = nil, + enableImage: EnableImageFunctionType? = nil, + enableImageBlockPublicAccess: EnableImageBlockPublicAccessFunctionType? = nil, enableImageDeprecation: EnableImageDeprecationFunctionType? = nil, enableIpamOrganizationAdminAccount: EnableIpamOrganizationAdminAccountFunctionType? = nil, enableReachabilityAnalyzerOrganizationSharing: EnableReachabilityAnalyzerOrganizationSharingFunctionType? = nil, @@ -1055,6 +1065,7 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol getFlowLogsIntegrationTemplate: GetFlowLogsIntegrationTemplateFunctionType? = nil, getGroupsForCapacityReservation: GetGroupsForCapacityReservationFunctionType? = nil, getHostReservationPurchasePreview: GetHostReservationPurchasePreviewFunctionType? = nil, + getImageBlockPublicAccessState: GetImageBlockPublicAccessStateFunctionType? = nil, getInstanceTypesFromInstanceRequirements: GetInstanceTypesFromInstanceRequirementsFunctionType? = nil, getInstanceUefiData: GetInstanceUefiDataFunctionType? = nil, getIpamAddressHistory: GetIpamAddressHistoryFunctionType? = nil, @@ -1070,6 +1081,7 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol getNetworkInsightsAccessScopeContent: GetNetworkInsightsAccessScopeContentFunctionType? = nil, getPasswordData: GetPasswordDataFunctionType? = nil, getReservedInstancesExchangeQuote: GetReservedInstancesExchangeQuoteFunctionType? = nil, + getSecurityGroupsForVpc: GetSecurityGroupsForVpcFunctionType? = nil, getSerialConsoleAccessStatus: GetSerialConsoleAccessStatusFunctionType? = nil, getSpotPlacementScores: GetSpotPlacementScoresFunctionType? = nil, getSubnetCidrReservations: GetSubnetCidrReservationsFunctionType? = nil, @@ -1597,6 +1609,8 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol self.disableEbsEncryptionByDefaultOverride = disableEbsEncryptionByDefault self.disableFastLaunchOverride = disableFastLaunch self.disableFastSnapshotRestoresOverride = disableFastSnapshotRestores + self.disableImageOverride = disableImage + self.disableImageBlockPublicAccessOverride = disableImageBlockPublicAccess self.disableImageDeprecationOverride = disableImageDeprecation self.disableIpamOrganizationAdminAccountOverride = disableIpamOrganizationAdminAccount self.disableSerialConsoleAccessOverride = disableSerialConsoleAccess @@ -1623,6 +1637,8 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol self.enableEbsEncryptionByDefaultOverride = enableEbsEncryptionByDefault self.enableFastLaunchOverride = enableFastLaunch self.enableFastSnapshotRestoresOverride = enableFastSnapshotRestores + self.enableImageOverride = enableImage + self.enableImageBlockPublicAccessOverride = enableImageBlockPublicAccess self.enableImageDeprecationOverride = enableImageDeprecation self.enableIpamOrganizationAdminAccountOverride = enableIpamOrganizationAdminAccount self.enableReachabilityAnalyzerOrganizationSharingOverride = enableReachabilityAnalyzerOrganizationSharing @@ -1649,6 +1665,7 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol self.getFlowLogsIntegrationTemplateOverride = getFlowLogsIntegrationTemplate self.getGroupsForCapacityReservationOverride = getGroupsForCapacityReservation self.getHostReservationPurchasePreviewOverride = getHostReservationPurchasePreview + self.getImageBlockPublicAccessStateOverride = getImageBlockPublicAccessState self.getInstanceTypesFromInstanceRequirementsOverride = getInstanceTypesFromInstanceRequirements self.getInstanceUefiDataOverride = getInstanceUefiData self.getIpamAddressHistoryOverride = getIpamAddressHistory @@ -1664,6 +1681,7 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol self.getNetworkInsightsAccessScopeContentOverride = getNetworkInsightsAccessScopeContent self.getPasswordDataOverride = getPasswordData self.getReservedInstancesExchangeQuoteOverride = getReservedInstancesExchangeQuote + self.getSecurityGroupsForVpcOverride = getSecurityGroupsForVpc self.getSerialConsoleAccessStatusOverride = getSerialConsoleAccessStatus self.getSpotPlacementScoresOverride = getSpotPlacementScores self.getSubnetCidrReservationsOverride = getSubnetCidrReservations @@ -4413,13 +4431,16 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ public func deleteKeyPair( - input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws { + input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws -> ElasticComputeCloudModel.DeleteKeyPairResult { if let deleteKeyPairOverride = deleteKeyPairOverride { return try await deleteKeyPairOverride(input) } + return DeleteKeyPairResult.__default } /** @@ -8068,6 +8089,40 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol return DisableFastSnapshotRestoresResult.__default } + /** + Invokes the DisableImage operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImage( + input: ElasticComputeCloudModel.DisableImageRequest) async throws -> ElasticComputeCloudModel.DisableImageResult { + if let disableImageOverride = disableImageOverride { + return try await disableImageOverride(input) + } + + return DisableImageResult.__default + } + + /** + Invokes the DisableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccess( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + if let disableImageBlockPublicAccessOverride = disableImageBlockPublicAccessOverride { + return try await disableImageBlockPublicAccessOverride(input) + } + + return DisableImageBlockPublicAccessResult.__default + } + /** Invokes the DisableImageDeprecation operation suspending until the response is available before returning. @@ -8501,6 +8556,40 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol return EnableFastSnapshotRestoresResult.__default } + /** + Invokes the EnableImage operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImage( + input: ElasticComputeCloudModel.EnableImageRequest) async throws -> ElasticComputeCloudModel.EnableImageResult { + if let enableImageOverride = enableImageOverride { + return try await enableImageOverride(input) + } + + return EnableImageResult.__default + } + + /** + Invokes the EnableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccess( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + if let enableImageBlockPublicAccessOverride = enableImageBlockPublicAccessOverride { + return try await enableImageBlockPublicAccessOverride(input) + } + + return EnableImageBlockPublicAccessResult.__default + } + /** Invokes the EnableImageDeprecation operation suspending until the response is available before returning. @@ -8937,6 +9026,23 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol return GetHostReservationPurchasePreviewResult.__default } + /** + Invokes the GetImageBlockPublicAccessState operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessState( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) async throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + if let getImageBlockPublicAccessStateOverride = getImageBlockPublicAccessStateOverride { + return try await getImageBlockPublicAccessStateOverride(input) + } + + return GetImageBlockPublicAccessStateResult.__default + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation suspending until the response is available before returning. @@ -9192,6 +9298,23 @@ public struct MockElasticComputeCloudClientV2: ElasticComputeCloudClientProtocol return GetReservedInstancesExchangeQuoteResult.__default } + /** + Invokes the GetSecurityGroupsForVpc operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpc( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) async throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + if let getSecurityGroupsForVpcOverride = getSecurityGroupsForVpcOverride { + return try await getSecurityGroupsForVpcOverride(input) + } + + return GetSecurityGroupsForVpcResult.__default + } + /** Invokes the GetSerialConsoleAccessStatus operation suspending until the response is available before returning. diff --git a/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClient.swift b/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClient.swift index 3cc7aa3..0217af0 100644 --- a/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClient.swift +++ b/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClient.swift @@ -776,6 +776,10 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc let disableFastLaunchSyncOverride: DisableFastLaunchSyncType? let disableFastSnapshotRestoresAsyncOverride: DisableFastSnapshotRestoresAsyncType? let disableFastSnapshotRestoresSyncOverride: DisableFastSnapshotRestoresSyncType? + let disableImageAsyncOverride: DisableImageAsyncType? + let disableImageSyncOverride: DisableImageSyncType? + let disableImageBlockPublicAccessAsyncOverride: DisableImageBlockPublicAccessAsyncType? + let disableImageBlockPublicAccessSyncOverride: DisableImageBlockPublicAccessSyncType? let disableImageDeprecationAsyncOverride: DisableImageDeprecationAsyncType? let disableImageDeprecationSyncOverride: DisableImageDeprecationSyncType? let disableIpamOrganizationAdminAccountAsyncOverride: DisableIpamOrganizationAdminAccountAsyncType? @@ -828,6 +832,10 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc let enableFastLaunchSyncOverride: EnableFastLaunchSyncType? let enableFastSnapshotRestoresAsyncOverride: EnableFastSnapshotRestoresAsyncType? let enableFastSnapshotRestoresSyncOverride: EnableFastSnapshotRestoresSyncType? + let enableImageAsyncOverride: EnableImageAsyncType? + let enableImageSyncOverride: EnableImageSyncType? + let enableImageBlockPublicAccessAsyncOverride: EnableImageBlockPublicAccessAsyncType? + let enableImageBlockPublicAccessSyncOverride: EnableImageBlockPublicAccessSyncType? let enableImageDeprecationAsyncOverride: EnableImageDeprecationAsyncType? let enableImageDeprecationSyncOverride: EnableImageDeprecationSyncType? let enableIpamOrganizationAdminAccountAsyncOverride: EnableIpamOrganizationAdminAccountAsyncType? @@ -880,6 +888,8 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc let getGroupsForCapacityReservationSyncOverride: GetGroupsForCapacityReservationSyncType? let getHostReservationPurchasePreviewAsyncOverride: GetHostReservationPurchasePreviewAsyncType? let getHostReservationPurchasePreviewSyncOverride: GetHostReservationPurchasePreviewSyncType? + let getImageBlockPublicAccessStateAsyncOverride: GetImageBlockPublicAccessStateAsyncType? + let getImageBlockPublicAccessStateSyncOverride: GetImageBlockPublicAccessStateSyncType? let getInstanceTypesFromInstanceRequirementsAsyncOverride: GetInstanceTypesFromInstanceRequirementsAsyncType? let getInstanceTypesFromInstanceRequirementsSyncOverride: GetInstanceTypesFromInstanceRequirementsSyncType? let getInstanceUefiDataAsyncOverride: GetInstanceUefiDataAsyncType? @@ -910,6 +920,8 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc let getPasswordDataSyncOverride: GetPasswordDataSyncType? let getReservedInstancesExchangeQuoteAsyncOverride: GetReservedInstancesExchangeQuoteAsyncType? let getReservedInstancesExchangeQuoteSyncOverride: GetReservedInstancesExchangeQuoteSyncType? + let getSecurityGroupsForVpcAsyncOverride: GetSecurityGroupsForVpcAsyncType? + let getSecurityGroupsForVpcSyncOverride: GetSecurityGroupsForVpcSyncType? let getSerialConsoleAccessStatusAsyncOverride: GetSerialConsoleAccessStatusAsyncType? let getSerialConsoleAccessStatusSyncOverride: GetSerialConsoleAccessStatusSyncType? let getSpotPlacementScoresAsyncOverride: GetSpotPlacementScoresAsyncType? @@ -1970,6 +1982,10 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc disableFastLaunchSync: DisableFastLaunchSyncType? = nil, disableFastSnapshotRestoresAsync: DisableFastSnapshotRestoresAsyncType? = nil, disableFastSnapshotRestoresSync: DisableFastSnapshotRestoresSyncType? = nil, + disableImageAsync: DisableImageAsyncType? = nil, + disableImageSync: DisableImageSyncType? = nil, + disableImageBlockPublicAccessAsync: DisableImageBlockPublicAccessAsyncType? = nil, + disableImageBlockPublicAccessSync: DisableImageBlockPublicAccessSyncType? = nil, disableImageDeprecationAsync: DisableImageDeprecationAsyncType? = nil, disableImageDeprecationSync: DisableImageDeprecationSyncType? = nil, disableIpamOrganizationAdminAccountAsync: DisableIpamOrganizationAdminAccountAsyncType? = nil, @@ -2022,6 +2038,10 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc enableFastLaunchSync: EnableFastLaunchSyncType? = nil, enableFastSnapshotRestoresAsync: EnableFastSnapshotRestoresAsyncType? = nil, enableFastSnapshotRestoresSync: EnableFastSnapshotRestoresSyncType? = nil, + enableImageAsync: EnableImageAsyncType? = nil, + enableImageSync: EnableImageSyncType? = nil, + enableImageBlockPublicAccessAsync: EnableImageBlockPublicAccessAsyncType? = nil, + enableImageBlockPublicAccessSync: EnableImageBlockPublicAccessSyncType? = nil, enableImageDeprecationAsync: EnableImageDeprecationAsyncType? = nil, enableImageDeprecationSync: EnableImageDeprecationSyncType? = nil, enableIpamOrganizationAdminAccountAsync: EnableIpamOrganizationAdminAccountAsyncType? = nil, @@ -2074,6 +2094,8 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc getGroupsForCapacityReservationSync: GetGroupsForCapacityReservationSyncType? = nil, getHostReservationPurchasePreviewAsync: GetHostReservationPurchasePreviewAsyncType? = nil, getHostReservationPurchasePreviewSync: GetHostReservationPurchasePreviewSyncType? = nil, + getImageBlockPublicAccessStateAsync: GetImageBlockPublicAccessStateAsyncType? = nil, + getImageBlockPublicAccessStateSync: GetImageBlockPublicAccessStateSyncType? = nil, getInstanceTypesFromInstanceRequirementsAsync: GetInstanceTypesFromInstanceRequirementsAsyncType? = nil, getInstanceTypesFromInstanceRequirementsSync: GetInstanceTypesFromInstanceRequirementsSyncType? = nil, getInstanceUefiDataAsync: GetInstanceUefiDataAsyncType? = nil, @@ -2104,6 +2126,8 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc getPasswordDataSync: GetPasswordDataSyncType? = nil, getReservedInstancesExchangeQuoteAsync: GetReservedInstancesExchangeQuoteAsyncType? = nil, getReservedInstancesExchangeQuoteSync: GetReservedInstancesExchangeQuoteSyncType? = nil, + getSecurityGroupsForVpcAsync: GetSecurityGroupsForVpcAsyncType? = nil, + getSecurityGroupsForVpcSync: GetSecurityGroupsForVpcSyncType? = nil, getSerialConsoleAccessStatusAsync: GetSerialConsoleAccessStatusAsyncType? = nil, getSerialConsoleAccessStatusSync: GetSerialConsoleAccessStatusSyncType? = nil, getSpotPlacementScoresAsync: GetSpotPlacementScoresAsyncType? = nil, @@ -3159,6 +3183,10 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc self.disableFastLaunchSyncOverride = disableFastLaunchSync self.disableFastSnapshotRestoresAsyncOverride = disableFastSnapshotRestoresAsync self.disableFastSnapshotRestoresSyncOverride = disableFastSnapshotRestoresSync + self.disableImageAsyncOverride = disableImageAsync + self.disableImageSyncOverride = disableImageSync + self.disableImageBlockPublicAccessAsyncOverride = disableImageBlockPublicAccessAsync + self.disableImageBlockPublicAccessSyncOverride = disableImageBlockPublicAccessSync self.disableImageDeprecationAsyncOverride = disableImageDeprecationAsync self.disableImageDeprecationSyncOverride = disableImageDeprecationSync self.disableIpamOrganizationAdminAccountAsyncOverride = disableIpamOrganizationAdminAccountAsync @@ -3211,6 +3239,10 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc self.enableFastLaunchSyncOverride = enableFastLaunchSync self.enableFastSnapshotRestoresAsyncOverride = enableFastSnapshotRestoresAsync self.enableFastSnapshotRestoresSyncOverride = enableFastSnapshotRestoresSync + self.enableImageAsyncOverride = enableImageAsync + self.enableImageSyncOverride = enableImageSync + self.enableImageBlockPublicAccessAsyncOverride = enableImageBlockPublicAccessAsync + self.enableImageBlockPublicAccessSyncOverride = enableImageBlockPublicAccessSync self.enableImageDeprecationAsyncOverride = enableImageDeprecationAsync self.enableImageDeprecationSyncOverride = enableImageDeprecationSync self.enableIpamOrganizationAdminAccountAsyncOverride = enableIpamOrganizationAdminAccountAsync @@ -3263,6 +3295,8 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc self.getGroupsForCapacityReservationSyncOverride = getGroupsForCapacityReservationSync self.getHostReservationPurchasePreviewAsyncOverride = getHostReservationPurchasePreviewAsync self.getHostReservationPurchasePreviewSyncOverride = getHostReservationPurchasePreviewSync + self.getImageBlockPublicAccessStateAsyncOverride = getImageBlockPublicAccessStateAsync + self.getImageBlockPublicAccessStateSyncOverride = getImageBlockPublicAccessStateSync self.getInstanceTypesFromInstanceRequirementsAsyncOverride = getInstanceTypesFromInstanceRequirementsAsync self.getInstanceTypesFromInstanceRequirementsSyncOverride = getInstanceTypesFromInstanceRequirementsSync self.getInstanceUefiDataAsyncOverride = getInstanceUefiDataAsync @@ -3293,6 +3327,8 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc self.getPasswordDataSyncOverride = getPasswordDataSync self.getReservedInstancesExchangeQuoteAsyncOverride = getReservedInstancesExchangeQuoteAsync self.getReservedInstancesExchangeQuoteSyncOverride = getReservedInstancesExchangeQuoteSync + self.getSecurityGroupsForVpcAsyncOverride = getSecurityGroupsForVpcAsync + self.getSecurityGroupsForVpcSyncOverride = getSecurityGroupsForVpcSync self.getSerialConsoleAccessStatusAsyncOverride = getSerialConsoleAccessStatusAsync self.getSerialConsoleAccessStatusSyncOverride = getSerialConsoleAccessStatusSync self.getSpotPlacementScoresAsyncOverride = getSpotPlacementScoresAsync @@ -9122,17 +9158,18 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. - - completion: Nil or an error will be passed to this callback when the operation - is complete. + - completion: The DeleteKeyPairResult object or an error will be passed to this + callback when the operation is complete. The DeleteKeyPairResult + object will be validated before being returned to caller. */ public func deleteKeyPairAsync( input: ElasticComputeCloudModel.DeleteKeyPairRequest, - completion: @escaping (ElasticComputeCloudError?) -> ()) throws { + completion: @escaping (Result) -> ()) throws { if let deleteKeyPairAsyncOverride = deleteKeyPairAsyncOverride { return try deleteKeyPairAsyncOverride(input, completion) } - completion(error) + completion(.failure(error)) } /** @@ -9140,9 +9177,11 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ public func deleteKeyPairSync( - input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws { + input: ElasticComputeCloudModel.DeleteKeyPairRequest) throws -> ElasticComputeCloudModel.DeleteKeyPairResult { if let deleteKeyPairSyncOverride = deleteKeyPairSyncOverride { return try deleteKeyPairSyncOverride(input) } @@ -16938,6 +16977,78 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc throw error } + /** + Invokes the DisableImage operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - completion: The DisableImageResult object or an error will be passed to this + callback when the operation is complete. The DisableImageResult + object will be validated before being returned to caller. + */ + public func disableImageAsync( + input: ElasticComputeCloudModel.DisableImageRequest, + completion: @escaping (Result) -> ()) throws { + if let disableImageAsyncOverride = disableImageAsyncOverride { + return try disableImageAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the DisableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageSync( + input: ElasticComputeCloudModel.DisableImageRequest) throws -> ElasticComputeCloudModel.DisableImageResult { + if let disableImageSyncOverride = disableImageSyncOverride { + return try disableImageSyncOverride(input) + } + + throw error + } + + /** + Invokes the DisableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The DisableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The DisableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws { + if let disableImageBlockPublicAccessAsyncOverride = disableImageBlockPublicAccessAsyncOverride { + return try disableImageBlockPublicAccessAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the DisableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + if let disableImageBlockPublicAccessSyncOverride = disableImageBlockPublicAccessSyncOverride { + return try disableImageBlockPublicAccessSyncOverride(input) + } + + throw error + } + /** Invokes the DisableImageDeprecation operation returning immediately and passing the response to a callback. @@ -17865,6 +17976,78 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc throw error } + /** + Invokes the EnableImage operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - completion: The EnableImageResult object or an error will be passed to this + callback when the operation is complete. The EnableImageResult + object will be validated before being returned to caller. + */ + public func enableImageAsync( + input: ElasticComputeCloudModel.EnableImageRequest, + completion: @escaping (Result) -> ()) throws { + if let enableImageAsyncOverride = enableImageAsyncOverride { + return try enableImageAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the EnableImage operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageSync( + input: ElasticComputeCloudModel.EnableImageRequest) throws -> ElasticComputeCloudModel.EnableImageResult { + if let enableImageSyncOverride = enableImageSyncOverride { + return try enableImageSyncOverride(input) + } + + throw error + } + + /** + Invokes the EnableImageBlockPublicAccess operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - completion: The EnableImageBlockPublicAccessResult object or an error will be passed to this + callback when the operation is complete. The EnableImageBlockPublicAccessResult + object will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccessAsync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest, + completion: @escaping (Result) -> ()) throws { + if let enableImageBlockPublicAccessAsyncOverride = enableImageBlockPublicAccessAsyncOverride { + return try enableImageBlockPublicAccessAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the EnableImageBlockPublicAccess operation waiting for the response before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccessSync( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + if let enableImageBlockPublicAccessSyncOverride = enableImageBlockPublicAccessSyncOverride { + return try enableImageBlockPublicAccessSyncOverride(input) + } + + throw error + } + /** Invokes the EnableImageDeprecation operation returning immediately and passing the response to a callback. @@ -18795,6 +18978,42 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc throw error } + /** + Invokes the GetImageBlockPublicAccessState operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - completion: The GetImageBlockPublicAccessStateResult object or an error will be passed to this + callback when the operation is complete. The GetImageBlockPublicAccessStateResult + object will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessStateAsync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest, + completion: @escaping (Result) -> ()) throws { + if let getImageBlockPublicAccessStateAsyncOverride = getImageBlockPublicAccessStateAsyncOverride { + return try getImageBlockPublicAccessStateAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the GetImageBlockPublicAccessState operation waiting for the response before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessStateSync( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + if let getImageBlockPublicAccessStateSyncOverride = getImageBlockPublicAccessStateSyncOverride { + return try getImageBlockPublicAccessStateSyncOverride(input) + } + + throw error + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation returning immediately and passing the response to a callback. @@ -19335,6 +19554,42 @@ public struct ThrowingElasticComputeCloudClient: ElasticComputeCloudClientProtoc throw error } + /** + Invokes the GetSecurityGroupsForVpc operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - completion: The GetSecurityGroupsForVpcResult object or an error will be passed to this + callback when the operation is complete. The GetSecurityGroupsForVpcResult + object will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpcAsync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest, + completion: @escaping (Result) -> ()) throws { + if let getSecurityGroupsForVpcAsyncOverride = getSecurityGroupsForVpcAsyncOverride { + return try getSecurityGroupsForVpcAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the GetSecurityGroupsForVpc operation waiting for the response before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpcSync( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + if let getSecurityGroupsForVpcSyncOverride = getSecurityGroupsForVpcSyncOverride { + return try getSecurityGroupsForVpcSyncOverride(input) + } + + throw error + } + /** Invokes the GetSerialConsoleAccessStatus operation returning immediately and passing the response to a callback. diff --git a/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClientV2.swift b/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClientV2.swift index 373b01f..7371be1 100644 --- a/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClientV2.swift +++ b/Sources/ElasticComputeCloudClient/ThrowingElasticComputeCloudClientV2.swift @@ -404,6 +404,8 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt let disableEbsEncryptionByDefaultOverride: DisableEbsEncryptionByDefaultFunctionType? let disableFastLaunchOverride: DisableFastLaunchFunctionType? let disableFastSnapshotRestoresOverride: DisableFastSnapshotRestoresFunctionType? + let disableImageOverride: DisableImageFunctionType? + let disableImageBlockPublicAccessOverride: DisableImageBlockPublicAccessFunctionType? let disableImageDeprecationOverride: DisableImageDeprecationFunctionType? let disableIpamOrganizationAdminAccountOverride: DisableIpamOrganizationAdminAccountFunctionType? let disableSerialConsoleAccessOverride: DisableSerialConsoleAccessFunctionType? @@ -430,6 +432,8 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt let enableEbsEncryptionByDefaultOverride: EnableEbsEncryptionByDefaultFunctionType? let enableFastLaunchOverride: EnableFastLaunchFunctionType? let enableFastSnapshotRestoresOverride: EnableFastSnapshotRestoresFunctionType? + let enableImageOverride: EnableImageFunctionType? + let enableImageBlockPublicAccessOverride: EnableImageBlockPublicAccessFunctionType? let enableImageDeprecationOverride: EnableImageDeprecationFunctionType? let enableIpamOrganizationAdminAccountOverride: EnableIpamOrganizationAdminAccountFunctionType? let enableReachabilityAnalyzerOrganizationSharingOverride: EnableReachabilityAnalyzerOrganizationSharingFunctionType? @@ -456,6 +460,7 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt let getFlowLogsIntegrationTemplateOverride: GetFlowLogsIntegrationTemplateFunctionType? let getGroupsForCapacityReservationOverride: GetGroupsForCapacityReservationFunctionType? let getHostReservationPurchasePreviewOverride: GetHostReservationPurchasePreviewFunctionType? + let getImageBlockPublicAccessStateOverride: GetImageBlockPublicAccessStateFunctionType? let getInstanceTypesFromInstanceRequirementsOverride: GetInstanceTypesFromInstanceRequirementsFunctionType? let getInstanceUefiDataOverride: GetInstanceUefiDataFunctionType? let getIpamAddressHistoryOverride: GetIpamAddressHistoryFunctionType? @@ -471,6 +476,7 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt let getNetworkInsightsAccessScopeContentOverride: GetNetworkInsightsAccessScopeContentFunctionType? let getPasswordDataOverride: GetPasswordDataFunctionType? let getReservedInstancesExchangeQuoteOverride: GetReservedInstancesExchangeQuoteFunctionType? + let getSecurityGroupsForVpcOverride: GetSecurityGroupsForVpcFunctionType? let getSerialConsoleAccessStatusOverride: GetSerialConsoleAccessStatusFunctionType? let getSpotPlacementScoresOverride: GetSpotPlacementScoresFunctionType? let getSubnetCidrReservationsOverride: GetSubnetCidrReservationsFunctionType? @@ -1004,6 +1010,8 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt disableEbsEncryptionByDefault: DisableEbsEncryptionByDefaultFunctionType? = nil, disableFastLaunch: DisableFastLaunchFunctionType? = nil, disableFastSnapshotRestores: DisableFastSnapshotRestoresFunctionType? = nil, + disableImage: DisableImageFunctionType? = nil, + disableImageBlockPublicAccess: DisableImageBlockPublicAccessFunctionType? = nil, disableImageDeprecation: DisableImageDeprecationFunctionType? = nil, disableIpamOrganizationAdminAccount: DisableIpamOrganizationAdminAccountFunctionType? = nil, disableSerialConsoleAccess: DisableSerialConsoleAccessFunctionType? = nil, @@ -1030,6 +1038,8 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt enableEbsEncryptionByDefault: EnableEbsEncryptionByDefaultFunctionType? = nil, enableFastLaunch: EnableFastLaunchFunctionType? = nil, enableFastSnapshotRestores: EnableFastSnapshotRestoresFunctionType? = nil, + enableImage: EnableImageFunctionType? = nil, + enableImageBlockPublicAccess: EnableImageBlockPublicAccessFunctionType? = nil, enableImageDeprecation: EnableImageDeprecationFunctionType? = nil, enableIpamOrganizationAdminAccount: EnableIpamOrganizationAdminAccountFunctionType? = nil, enableReachabilityAnalyzerOrganizationSharing: EnableReachabilityAnalyzerOrganizationSharingFunctionType? = nil, @@ -1056,6 +1066,7 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt getFlowLogsIntegrationTemplate: GetFlowLogsIntegrationTemplateFunctionType? = nil, getGroupsForCapacityReservation: GetGroupsForCapacityReservationFunctionType? = nil, getHostReservationPurchasePreview: GetHostReservationPurchasePreviewFunctionType? = nil, + getImageBlockPublicAccessState: GetImageBlockPublicAccessStateFunctionType? = nil, getInstanceTypesFromInstanceRequirements: GetInstanceTypesFromInstanceRequirementsFunctionType? = nil, getInstanceUefiData: GetInstanceUefiDataFunctionType? = nil, getIpamAddressHistory: GetIpamAddressHistoryFunctionType? = nil, @@ -1071,6 +1082,7 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt getNetworkInsightsAccessScopeContent: GetNetworkInsightsAccessScopeContentFunctionType? = nil, getPasswordData: GetPasswordDataFunctionType? = nil, getReservedInstancesExchangeQuote: GetReservedInstancesExchangeQuoteFunctionType? = nil, + getSecurityGroupsForVpc: GetSecurityGroupsForVpcFunctionType? = nil, getSerialConsoleAccessStatus: GetSerialConsoleAccessStatusFunctionType? = nil, getSpotPlacementScores: GetSpotPlacementScoresFunctionType? = nil, getSubnetCidrReservations: GetSubnetCidrReservationsFunctionType? = nil, @@ -1599,6 +1611,8 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt self.disableEbsEncryptionByDefaultOverride = disableEbsEncryptionByDefault self.disableFastLaunchOverride = disableFastLaunch self.disableFastSnapshotRestoresOverride = disableFastSnapshotRestores + self.disableImageOverride = disableImage + self.disableImageBlockPublicAccessOverride = disableImageBlockPublicAccess self.disableImageDeprecationOverride = disableImageDeprecation self.disableIpamOrganizationAdminAccountOverride = disableIpamOrganizationAdminAccount self.disableSerialConsoleAccessOverride = disableSerialConsoleAccess @@ -1625,6 +1639,8 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt self.enableEbsEncryptionByDefaultOverride = enableEbsEncryptionByDefault self.enableFastLaunchOverride = enableFastLaunch self.enableFastSnapshotRestoresOverride = enableFastSnapshotRestores + self.enableImageOverride = enableImage + self.enableImageBlockPublicAccessOverride = enableImageBlockPublicAccess self.enableImageDeprecationOverride = enableImageDeprecation self.enableIpamOrganizationAdminAccountOverride = enableIpamOrganizationAdminAccount self.enableReachabilityAnalyzerOrganizationSharingOverride = enableReachabilityAnalyzerOrganizationSharing @@ -1651,6 +1667,7 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt self.getFlowLogsIntegrationTemplateOverride = getFlowLogsIntegrationTemplate self.getGroupsForCapacityReservationOverride = getGroupsForCapacityReservation self.getHostReservationPurchasePreviewOverride = getHostReservationPurchasePreview + self.getImageBlockPublicAccessStateOverride = getImageBlockPublicAccessState self.getInstanceTypesFromInstanceRequirementsOverride = getInstanceTypesFromInstanceRequirements self.getInstanceUefiDataOverride = getInstanceUefiData self.getIpamAddressHistoryOverride = getIpamAddressHistory @@ -1666,6 +1683,7 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt self.getNetworkInsightsAccessScopeContentOverride = getNetworkInsightsAccessScopeContent self.getPasswordDataOverride = getPasswordData self.getReservedInstancesExchangeQuoteOverride = getReservedInstancesExchangeQuote + self.getSecurityGroupsForVpcOverride = getSecurityGroupsForVpc self.getSerialConsoleAccessStatusOverride = getSerialConsoleAccessStatus self.getSpotPlacementScoresOverride = getSpotPlacementScores self.getSubnetCidrReservationsOverride = getSubnetCidrReservations @@ -4425,9 +4443,11 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt - Parameters: - input: The validated DeleteKeyPairRequest object being passed to this operation. + - Returns: The DeleteKeyPairResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. */ public func deleteKeyPair( - input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws { + input: ElasticComputeCloudModel.DeleteKeyPairRequest) async throws -> ElasticComputeCloudModel.DeleteKeyPairResult { if let deleteKeyPairOverride = deleteKeyPairOverride { return try await deleteKeyPairOverride(input) } @@ -8101,6 +8121,40 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt throw error } + /** + Invokes the DisableImage operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageRequest object being passed to this operation. + - Returns: The DisableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImage( + input: ElasticComputeCloudModel.DisableImageRequest) async throws -> ElasticComputeCloudModel.DisableImageResult { + if let disableImageOverride = disableImageOverride { + return try await disableImageOverride(input) + } + + throw error + } + + /** + Invokes the DisableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DisableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The DisableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func disableImageBlockPublicAccess( + input: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.DisableImageBlockPublicAccessResult { + if let disableImageBlockPublicAccessOverride = disableImageBlockPublicAccessOverride { + return try await disableImageBlockPublicAccessOverride(input) + } + + throw error + } + /** Invokes the DisableImageDeprecation operation suspending until the response is available before returning. @@ -8537,6 +8591,40 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt throw error } + /** + Invokes the EnableImage operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageRequest object being passed to this operation. + - Returns: The EnableImageResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImage( + input: ElasticComputeCloudModel.EnableImageRequest) async throws -> ElasticComputeCloudModel.EnableImageResult { + if let enableImageOverride = enableImageOverride { + return try await enableImageOverride(input) + } + + throw error + } + + /** + Invokes the EnableImageBlockPublicAccess operation suspending until the response is available before returning. + + - Parameters: + - input: The validated EnableImageBlockPublicAccessRequest object being passed to this operation. + - Returns: The EnableImageBlockPublicAccessResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func enableImageBlockPublicAccess( + input: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest) async throws -> ElasticComputeCloudModel.EnableImageBlockPublicAccessResult { + if let enableImageBlockPublicAccessOverride = enableImageBlockPublicAccessOverride { + return try await enableImageBlockPublicAccessOverride(input) + } + + throw error + } + /** Invokes the EnableImageDeprecation operation suspending until the response is available before returning. @@ -8975,6 +9063,23 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt throw error } + /** + Invokes the GetImageBlockPublicAccessState operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetImageBlockPublicAccessStateRequest object being passed to this operation. + - Returns: The GetImageBlockPublicAccessStateResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getImageBlockPublicAccessState( + input: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest) async throws -> ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult { + if let getImageBlockPublicAccessStateOverride = getImageBlockPublicAccessStateOverride { + return try await getImageBlockPublicAccessStateOverride(input) + } + + throw error + } + /** Invokes the GetInstanceTypesFromInstanceRequirements operation suspending until the response is available before returning. @@ -9230,6 +9335,23 @@ public struct ThrowingElasticComputeCloudClientV2: ElasticComputeCloudClientProt throw error } + /** + Invokes the GetSecurityGroupsForVpc operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetSecurityGroupsForVpcRequest object being passed to this operation. + - Returns: The GetSecurityGroupsForVpcResult object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + */ + public func getSecurityGroupsForVpc( + input: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest) async throws -> ElasticComputeCloudModel.GetSecurityGroupsForVpcResult { + if let getSecurityGroupsForVpcOverride = getSecurityGroupsForVpcOverride { + return try await getSecurityGroupsForVpcOverride(input) + } + + throw error + } + /** Invokes the GetSerialConsoleAccessStatus operation suspending until the response is available before returning. diff --git a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelDefaultInstances.swift b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelDefaultInstances.swift index dc7f433..2ba2136 100644 --- a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelDefaultInstances.swift +++ b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelDefaultInstances.swift @@ -4090,6 +4090,7 @@ public extension CreateNetworkInterfaceRequest { clientToken: nil, description: nil, dryRun: nil, + enablePrimaryIpv6: nil, groups: nil, interfaceType: nil, ipv4PrefixCount: nil, @@ -5060,6 +5061,7 @@ public extension CreateVerifiedAccessEndpointRequest { networkInterfaceOptions: nil, policyDocument: nil, securityGroupIds: nil, + sseSpecification: nil, tagSpecifications: nil, verifiedAccessGroupId: "value") @@ -5089,6 +5091,7 @@ public extension CreateVerifiedAccessGroupRequest { description: nil, dryRun: nil, policyDocument: nil, + sseSpecification: nil, tagSpecifications: nil, verifiedAccessInstanceId: "value") @@ -5117,6 +5120,7 @@ public extension CreateVerifiedAccessInstanceRequest { clientToken: nil, description: nil, dryRun: nil, + fIPSEnabled: nil, tagSpecifications: nil) return defaultInstance @@ -5178,6 +5182,7 @@ public extension CreateVerifiedAccessTrustProviderRequest { dryRun: nil, oidcOptions: nil, policyReferenceName: "value", + sseSpecification: nil, tagSpecifications: nil, trustProviderType: .__default, userTrustProviderType: nil) @@ -5293,6 +5298,7 @@ public extension CreateVpcEndpointRequest { routeTableIds: nil, securityGroupIds: nil, serviceName: "value", + subnetConfigurations: nil, subnetIds: nil, tagSpecifications: nil, vpcEndpointType: nil, @@ -6035,6 +6041,19 @@ public extension DeleteKeyPairRequest { }() } +public extension DeleteKeyPairResult { + /** + Default instance of the DeleteKeyPairResult structure. + */ + static let __default: ElasticComputeCloudModel.DeleteKeyPairResult = { + let defaultInstance = ElasticComputeCloudModel.DeleteKeyPairResult( + keyPairId: nil, + return: nil) + + return defaultInstance + }() +} + public extension DeleteLaunchTemplateRequest { /** Default instance of the DeleteLaunchTemplateRequest structure. @@ -8685,6 +8704,7 @@ public extension DescribeImagesRequest { filters: nil, imageIds: nil, includeDeprecated: nil, + includeDisabled: nil, maxResults: nil, nextToken: nil, owners: nil) @@ -12078,6 +12098,30 @@ public extension DisableFastSnapshotRestoresResult { }() } +public extension DisableImageBlockPublicAccessRequest { + /** + Default instance of the DisableImageBlockPublicAccessRequest structure. + */ + static let __default: ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest = { + let defaultInstance = ElasticComputeCloudModel.DisableImageBlockPublicAccessRequest( + dryRun: nil) + + return defaultInstance + }() +} + +public extension DisableImageBlockPublicAccessResult { + /** + Default instance of the DisableImageBlockPublicAccessResult structure. + */ + static let __default: ElasticComputeCloudModel.DisableImageBlockPublicAccessResult = { + let defaultInstance = ElasticComputeCloudModel.DisableImageBlockPublicAccessResult( + imageBlockPublicAccessState: nil) + + return defaultInstance + }() +} + public extension DisableImageDeprecationRequest { /** Default instance of the DisableImageDeprecationRequest structure. @@ -12103,6 +12147,31 @@ public extension DisableImageDeprecationResult { }() } +public extension DisableImageRequest { + /** + Default instance of the DisableImageRequest structure. + */ + static let __default: ElasticComputeCloudModel.DisableImageRequest = { + let defaultInstance = ElasticComputeCloudModel.DisableImageRequest( + dryRun: nil, + imageId: "value") + + return defaultInstance + }() +} + +public extension DisableImageResult { + /** + Default instance of the DisableImageResult structure. + */ + static let __default: ElasticComputeCloudModel.DisableImageResult = { + let defaultInstance = ElasticComputeCloudModel.DisableImageResult( + return: nil) + + return defaultInstance + }() +} + public extension DisableIpamOrganizationAdminAccountRequest { /** Default instance of the DisableIpamOrganizationAdminAccountRequest structure. @@ -13161,6 +13230,31 @@ public extension EnableFastSnapshotRestoresResult { }() } +public extension EnableImageBlockPublicAccessRequest { + /** + Default instance of the EnableImageBlockPublicAccessRequest structure. + */ + static let __default: ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest = { + let defaultInstance = ElasticComputeCloudModel.EnableImageBlockPublicAccessRequest( + dryRun: nil, + imageBlockPublicAccessState: .__default) + + return defaultInstance + }() +} + +public extension EnableImageBlockPublicAccessResult { + /** + Default instance of the EnableImageBlockPublicAccessResult structure. + */ + static let __default: ElasticComputeCloudModel.EnableImageBlockPublicAccessResult = { + let defaultInstance = ElasticComputeCloudModel.EnableImageBlockPublicAccessResult( + imageBlockPublicAccessState: nil) + + return defaultInstance + }() +} + public extension EnableImageDeprecationRequest { /** Default instance of the EnableImageDeprecationRequest structure. @@ -13187,6 +13281,31 @@ public extension EnableImageDeprecationResult { }() } +public extension EnableImageRequest { + /** + Default instance of the EnableImageRequest structure. + */ + static let __default: ElasticComputeCloudModel.EnableImageRequest = { + let defaultInstance = ElasticComputeCloudModel.EnableImageRequest( + dryRun: nil, + imageId: "value") + + return defaultInstance + }() +} + +public extension EnableImageResult { + /** + Default instance of the EnableImageResult structure. + */ + static let __default: ElasticComputeCloudModel.EnableImageResult = { + let defaultInstance = ElasticComputeCloudModel.EnableImageResult( + return: nil) + + return defaultInstance + }() +} + public extension EnableIpamOrganizationAdminAccountRequest { /** Default instance of the EnableIpamOrganizationAdminAccountRequest structure. @@ -14433,7 +14552,8 @@ public extension GetEbsEncryptionByDefaultResult { */ static let __default: ElasticComputeCloudModel.GetEbsEncryptionByDefaultResult = { let defaultInstance = ElasticComputeCloudModel.GetEbsEncryptionByDefaultResult( - ebsEncryptionByDefault: nil) + ebsEncryptionByDefault: nil, + sseType: nil) return defaultInstance }() @@ -14522,6 +14642,30 @@ public extension GetHostReservationPurchasePreviewResult { }() } +public extension GetImageBlockPublicAccessStateRequest { + /** + Default instance of the GetImageBlockPublicAccessStateRequest structure. + */ + static let __default: ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest = { + let defaultInstance = ElasticComputeCloudModel.GetImageBlockPublicAccessStateRequest( + dryRun: nil) + + return defaultInstance + }() +} + +public extension GetImageBlockPublicAccessStateResult { + /** + Default instance of the GetImageBlockPublicAccessStateResult structure. + */ + static let __default: ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult = { + let defaultInstance = ElasticComputeCloudModel.GetImageBlockPublicAccessStateResult( + imageBlockPublicAccessState: nil) + + return defaultInstance + }() +} + public extension GetInstanceTypesFromInstanceRequirementsRequest { /** Default instance of the GetInstanceTypesFromInstanceRequirementsRequest structure. @@ -14961,6 +15105,35 @@ public extension GetReservedInstancesExchangeQuoteResult { }() } +public extension GetSecurityGroupsForVpcRequest { + /** + Default instance of the GetSecurityGroupsForVpcRequest structure. + */ + static let __default: ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest = { + let defaultInstance = ElasticComputeCloudModel.GetSecurityGroupsForVpcRequest( + dryRun: nil, + filters: nil, + maxResults: nil, + nextToken: nil, + vpcId: "value") + + return defaultInstance + }() +} + +public extension GetSecurityGroupsForVpcResult { + /** + Default instance of the GetSecurityGroupsForVpcResult structure. + */ + static let __default: ElasticComputeCloudModel.GetSecurityGroupsForVpcResult = { + let defaultInstance = ElasticComputeCloudModel.GetSecurityGroupsForVpcResult( + nextToken: nil, + securityGroupForVpcs: nil) + + return defaultInstance + }() +} + public extension GetSerialConsoleAccessStatusRequest { /** Default instance of the GetSerialConsoleAccessStatusRequest structure. @@ -15718,6 +15891,7 @@ public extension Image { ramdiskId: nil, rootDeviceName: nil, rootDeviceType: nil, + sourceInstanceId: nil, sriovNetSupport: nil, state: nil, stateReason: nil, @@ -16132,7 +16306,8 @@ public extension InferenceAcceleratorInfo { */ static let __default: ElasticComputeCloudModel.InferenceAcceleratorInfo = { let defaultInstance = ElasticComputeCloudModel.InferenceAcceleratorInfo( - accelerators: nil) + accelerators: nil, + totalInferenceMemoryInMiB: nil) return defaultInstance }() @@ -16146,12 +16321,25 @@ public extension InferenceDeviceInfo { let defaultInstance = ElasticComputeCloudModel.InferenceDeviceInfo( count: nil, manufacturer: nil, + memoryInfo: nil, name: nil) return defaultInstance }() } +public extension InferenceDeviceMemoryInfo { + /** + Default instance of the InferenceDeviceMemoryInfo structure. + */ + static let __default: ElasticComputeCloudModel.InferenceDeviceMemoryInfo = { + let defaultInstance = ElasticComputeCloudModel.InferenceDeviceMemoryInfo( + sizeInMiB: nil) + + return defaultInstance + }() +} + public extension Instance { /** Default instance of the Instance structure. @@ -16476,7 +16664,8 @@ public extension InstanceIpv6Address { */ static let __default: ElasticComputeCloudModel.InstanceIpv6Address = { let defaultInstance = ElasticComputeCloudModel.InstanceIpv6Address( - ipv6Address: nil) + ipv6Address: nil, + isPrimaryIpv6: nil) return defaultInstance }() @@ -16672,6 +16861,7 @@ public extension InstanceNetworkInterfaceSpecification { ipv6Prefixes: nil, networkCardIndex: nil, networkInterfaceId: nil, + primaryIpv6: nil, privateIpAddress: nil, privateIpAddresses: nil, secondaryPrivateIpAddressCount: nil, @@ -16933,6 +17123,8 @@ public extension InstanceTypeInfo { memoryInfo: nil, networkInfo: nil, nitroEnclavesSupport: nil, + nitroTpmInfo: nil, + nitroTpmSupport: nil, placementGroupInfo: nil, processorInfo: nil, supportedBootModes: nil, @@ -17957,6 +18149,7 @@ public extension LaunchTemplateInstanceNetworkInterfaceSpecification { ipv6Prefixes: nil, networkCardIndex: nil, networkInterfaceId: nil, + primaryIpv6: nil, privateIpAddress: nil, privateIpAddresses: nil, secondaryPrivateIpAddressCount: nil, @@ -17987,6 +18180,7 @@ public extension LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { ipv6Prefixes: nil, networkCardIndex: nil, networkInterfaceId: nil, + primaryIpv6: nil, privateIpAddress: nil, privateIpAddresses: nil, secondaryPrivateIpAddressCount: nil, @@ -19407,6 +19601,7 @@ public extension ModifyNetworkInterfaceAttributeRequest { description: nil, dryRun: nil, enaSrdSpecification: nil, + enablePrimaryIpv6: nil, groups: nil, networkInterfaceId: "value", sourceDestCheck: nil) @@ -19839,7 +20034,8 @@ public extension ModifyVerifiedAccessEndpointPolicyRequest { clientToken: nil, dryRun: nil, policyDocument: nil, - policyEnabled: false, + policyEnabled: nil, + sseSpecification: nil, verifiedAccessEndpointId: "value") return defaultInstance @@ -19853,7 +20049,8 @@ public extension ModifyVerifiedAccessEndpointPolicyResult { static let __default: ElasticComputeCloudModel.ModifyVerifiedAccessEndpointPolicyResult = { let defaultInstance = ElasticComputeCloudModel.ModifyVerifiedAccessEndpointPolicyResult( policyDocument: nil, - policyEnabled: nil) + policyEnabled: nil, + sseSpecification: nil) return defaultInstance }() @@ -19898,7 +20095,8 @@ public extension ModifyVerifiedAccessGroupPolicyRequest { clientToken: nil, dryRun: nil, policyDocument: nil, - policyEnabled: false, + policyEnabled: nil, + sseSpecification: nil, verifiedAccessGroupId: "value") return defaultInstance @@ -19912,7 +20110,8 @@ public extension ModifyVerifiedAccessGroupPolicyResult { static let __default: ElasticComputeCloudModel.ModifyVerifiedAccessGroupPolicyResult = { let defaultInstance = ElasticComputeCloudModel.ModifyVerifiedAccessGroupPolicyResult( policyDocument: nil, - policyEnabled: nil) + policyEnabled: nil, + sseSpecification: nil) return defaultInstance }() @@ -20028,6 +20227,7 @@ public extension ModifyVerifiedAccessTrustProviderRequest { description: nil, dryRun: nil, oidcOptions: nil, + sseSpecification: nil, verifiedAccessTrustProviderId: "value") return defaultInstance @@ -20150,6 +20350,7 @@ public extension ModifyVpcEndpointRequest { removeSecurityGroupIds: nil, removeSubnetIds: nil, resetPolicy: nil, + subnetConfigurations: nil, vpcEndpointId: "value") return defaultInstance @@ -20680,9 +20881,11 @@ public extension NetworkCardInfo { */ static let __default: ElasticComputeCloudModel.NetworkCardInfo = { let defaultInstance = ElasticComputeCloudModel.NetworkCardInfo( + baselineBandwidthInGbps: nil, maximumNetworkInterfaces: nil, networkCardIndex: nil, - networkPerformance: nil) + networkPerformance: nil, + peakBandwidthInGbps: nil) return defaultInstance }() @@ -20936,7 +21139,8 @@ public extension NetworkInterfaceIpv6Address { */ static let __default: ElasticComputeCloudModel.NetworkInterfaceIpv6Address = { let defaultInstance = ElasticComputeCloudModel.NetworkInterfaceIpv6Address( - ipv6Address: nil) + ipv6Address: nil, + isPrimaryIpv6: nil) return defaultInstance }() @@ -21000,6 +21204,18 @@ public extension NewDhcpConfiguration { }() } +public extension NitroTpmInfo { + /** + Default instance of the NitroTpmInfo structure. + */ + static let __default: ElasticComputeCloudModel.NitroTpmInfo = { + let defaultInstance = ElasticComputeCloudModel.NitroTpmInfo( + supportedVersions: nil) + + return defaultInstance + }() +} + public extension OidcOptions { /** Default instance of the OidcOptions structure. @@ -23286,6 +23502,7 @@ public extension RestoreSnapshotFromRecycleBinResult { ownerId: nil, progress: nil, snapshotId: nil, + sseType: nil, startTime: nil, state: nil, volumeId: nil, @@ -23566,6 +23783,7 @@ public extension RunInstancesRequest { ebsOptimized: nil, elasticGpuSpecification: nil, elasticInferenceAccelerators: nil, + enablePrimaryIpv6: nil, enclaveOptions: nil, hibernationOptions: nil, iamInstanceProfile: nil, @@ -23986,6 +24204,23 @@ public extension SecurityGroup { }() } +public extension SecurityGroupForVpc { + /** + Default instance of the SecurityGroupForVpc structure. + */ + static let __default: ElasticComputeCloudModel.SecurityGroupForVpc = { + let defaultInstance = ElasticComputeCloudModel.SecurityGroupForVpc( + description: nil, + groupId: nil, + groupName: nil, + ownerId: nil, + primaryVpcId: nil, + tags: nil) + + return defaultInstance + }() +} + public extension SecurityGroupIdentifier { /** Default instance of the SecurityGroupIdentifier structure. @@ -24201,6 +24436,7 @@ public extension Snapshot { progress: nil, restoreExpiryTime: nil, snapshotId: nil, + sseType: nil, startTime: nil, state: nil, stateMessage: nil, @@ -24261,6 +24497,7 @@ public extension SnapshotInfo { ownerId: nil, progress: nil, snapshotId: nil, + sseType: nil, startTime: nil, state: nil, tags: nil, @@ -24937,6 +25174,20 @@ public extension SubnetCidrReservation { }() } +public extension SubnetConfiguration { + /** + Default instance of the SubnetConfiguration structure. + */ + static let __default: ElasticComputeCloudModel.SubnetConfiguration = { + let defaultInstance = ElasticComputeCloudModel.SubnetConfiguration( + ipv4: nil, + ipv6: nil, + subnetId: nil) + + return defaultInstance + }() +} + public extension SubnetIpv6CidrBlockAssociation { /** Default instance of the SubnetIpv6CidrBlockAssociation structure. @@ -26429,6 +26680,7 @@ public extension VerifiedAccessEndpoint { loadBalancerOptions: nil, networkInterfaceOptions: nil, securityGroupIds: nil, + sseSpecification: nil, status: nil, tags: nil, verifiedAccessEndpointId: nil, @@ -26492,6 +26744,7 @@ public extension VerifiedAccessGroup { description: nil, lastUpdatedTime: nil, owner: nil, + sseSpecification: nil, tags: nil, verifiedAccessGroupArn: nil, verifiedAccessGroupId: nil, @@ -26509,6 +26762,7 @@ public extension VerifiedAccessInstance { let defaultInstance = ElasticComputeCloudModel.VerifiedAccessInstance( creationTime: nil, description: nil, + fipsEnabled: nil, lastUpdatedTime: nil, tags: nil, verifiedAccessInstanceId: nil, @@ -26661,6 +26915,32 @@ public extension VerifiedAccessLogs { }() } +public extension VerifiedAccessSseSpecificationRequest { + /** + Default instance of the VerifiedAccessSseSpecificationRequest structure. + */ + static let __default: ElasticComputeCloudModel.VerifiedAccessSseSpecificationRequest = { + let defaultInstance = ElasticComputeCloudModel.VerifiedAccessSseSpecificationRequest( + customerManagedKeyEnabled: nil, + kmsKeyArn: nil) + + return defaultInstance + }() +} + +public extension VerifiedAccessSseSpecificationResponse { + /** + Default instance of the VerifiedAccessSseSpecificationResponse structure. + */ + static let __default: ElasticComputeCloudModel.VerifiedAccessSseSpecificationResponse = { + let defaultInstance = ElasticComputeCloudModel.VerifiedAccessSseSpecificationResponse( + customerManagedKeyEnabled: nil, + kmsKeyArn: nil) + + return defaultInstance + }() +} + public extension VerifiedAccessTrustProvider { /** Default instance of the VerifiedAccessTrustProvider structure. @@ -26674,6 +26954,7 @@ public extension VerifiedAccessTrustProvider { lastUpdatedTime: nil, oidcOptions: nil, policyReferenceName: nil, + sseSpecification: nil, tags: nil, trustProviderType: nil, userTrustProviderType: nil, @@ -26733,6 +27014,7 @@ public extension Volume { outpostArn: nil, size: nil, snapshotId: nil, + sseType: nil, state: nil, tags: nil, throughput: nil, diff --git a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelOperations.swift b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelOperations.swift index c8bbb1a..fa1d332 100644 --- a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelOperations.swift +++ b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelOperations.swift @@ -399,6 +399,8 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo case disableEbsEncryptionByDefault = "DisableEbsEncryptionByDefault" case disableFastLaunch = "DisableFastLaunch" case disableFastSnapshotRestores = "DisableFastSnapshotRestores" + case disableImage = "DisableImage" + case disableImageBlockPublicAccess = "DisableImageBlockPublicAccess" case disableImageDeprecation = "DisableImageDeprecation" case disableIpamOrganizationAdminAccount = "DisableIpamOrganizationAdminAccount" case disableSerialConsoleAccess = "DisableSerialConsoleAccess" @@ -425,6 +427,8 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo case enableEbsEncryptionByDefault = "EnableEbsEncryptionByDefault" case enableFastLaunch = "EnableFastLaunch" case enableFastSnapshotRestores = "EnableFastSnapshotRestores" + case enableImage = "EnableImage" + case enableImageBlockPublicAccess = "EnableImageBlockPublicAccess" case enableImageDeprecation = "EnableImageDeprecation" case enableIpamOrganizationAdminAccount = "EnableIpamOrganizationAdminAccount" case enableReachabilityAnalyzerOrganizationSharing = "EnableReachabilityAnalyzerOrganizationSharing" @@ -451,6 +455,7 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo case getFlowLogsIntegrationTemplate = "GetFlowLogsIntegrationTemplate" case getGroupsForCapacityReservation = "GetGroupsForCapacityReservation" case getHostReservationPurchasePreview = "GetHostReservationPurchasePreview" + case getImageBlockPublicAccessState = "GetImageBlockPublicAccessState" case getInstanceTypesFromInstanceRequirements = "GetInstanceTypesFromInstanceRequirements" case getInstanceUefiData = "GetInstanceUefiData" case getIpamAddressHistory = "GetIpamAddressHistory" @@ -466,6 +471,7 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo case getNetworkInsightsAccessScopeContent = "GetNetworkInsightsAccessScopeContent" case getPasswordData = "GetPasswordData" case getReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote" + case getSecurityGroupsForVpc = "GetSecurityGroupsForVpc" case getSerialConsoleAccessStatus = "GetSerialConsoleAccessStatus" case getSpotPlacementScores = "GetSpotPlacementScores" case getSubnetCidrReservations = "GetSubnetCidrReservations" @@ -1373,6 +1379,10 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo return "/" case .disableFastSnapshotRestores: return "/" + case .disableImage: + return "/" + case .disableImageBlockPublicAccess: + return "/" case .disableImageDeprecation: return "/" case .disableIpamOrganizationAdminAccount: @@ -1425,6 +1435,10 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo return "/" case .enableFastSnapshotRestores: return "/" + case .enableImage: + return "/" + case .enableImageBlockPublicAccess: + return "/" case .enableImageDeprecation: return "/" case .enableIpamOrganizationAdminAccount: @@ -1477,6 +1491,8 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo return "/" case .getHostReservationPurchasePreview: return "/" + case .getImageBlockPublicAccessState: + return "/" case .getInstanceTypesFromInstanceRequirements: return "/" case .getInstanceUefiData: @@ -1507,6 +1523,8 @@ public enum ElasticComputeCloudModelOperations: String, Hashable, CustomStringCo return "/" case .getReservedInstancesExchangeQuote: return "/" + case .getSecurityGroupsForVpc: + return "/" case .getSerialConsoleAccessStatus: return "/" case .getSpotPlacementScores: diff --git a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelStructures.swift b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelStructures.swift index 05cb4bb..4a94a1a 100644 --- a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelStructures.swift +++ b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelStructures.swift @@ -5591,11 +5591,11 @@ public struct CreateCustomerGatewayResult: Codable, Equatable { } public struct CreateDefaultSubnetRequest: Codable, Equatable { - public var availabilityZone: String + public var availabilityZone: AvailabilityZoneName public var dryRun: Boolean? public var ipv6Native: Boolean? - public init(availabilityZone: String, + public init(availabilityZone: AvailabilityZoneName, dryRun: Boolean? = nil, ipv6Native: Boolean? = nil) { self.availabilityZone = availabilityZone @@ -7264,6 +7264,7 @@ public struct CreateNetworkInterfaceRequest: Codable, Equatable { public var clientToken: String? public var description: String? public var dryRun: Boolean? + public var enablePrimaryIpv6: Boolean? public var groups: SecurityGroupIdStringList? public var interfaceType: NetworkInterfaceCreationType? public var ipv4PrefixCount: Integer? @@ -7281,6 +7282,7 @@ public struct CreateNetworkInterfaceRequest: Codable, Equatable { public init(clientToken: String? = nil, description: String? = nil, dryRun: Boolean? = nil, + enablePrimaryIpv6: Boolean? = nil, groups: SecurityGroupIdStringList? = nil, interfaceType: NetworkInterfaceCreationType? = nil, ipv4PrefixCount: Integer? = nil, @@ -7297,6 +7299,7 @@ public struct CreateNetworkInterfaceRequest: Codable, Equatable { self.clientToken = clientToken self.description = description self.dryRun = dryRun + self.enablePrimaryIpv6 = enablePrimaryIpv6 self.groups = groups self.interfaceType = interfaceType self.ipv4PrefixCount = ipv4PrefixCount @@ -7316,6 +7319,7 @@ public struct CreateNetworkInterfaceRequest: Codable, Equatable { case clientToken = "ClientToken" case description case dryRun + case enablePrimaryIpv6 = "EnablePrimaryIpv6" case groups = "SecurityGroupId" case interfaceType = "InterfaceType" case ipv4PrefixCount = "Ipv4PrefixCount" @@ -8972,6 +8976,7 @@ public struct CreateVerifiedAccessEndpointRequest: Codable, Equatable { public var networkInterfaceOptions: CreateVerifiedAccessEndpointEniOptions? public var policyDocument: String? public var securityGroupIds: SecurityGroupIdList? + public var sseSpecification: VerifiedAccessSseSpecificationRequest? public var tagSpecifications: TagSpecificationList? public var verifiedAccessGroupId: VerifiedAccessGroupId @@ -8987,6 +8992,7 @@ public struct CreateVerifiedAccessEndpointRequest: Codable, Equatable { networkInterfaceOptions: CreateVerifiedAccessEndpointEniOptions? = nil, policyDocument: String? = nil, securityGroupIds: SecurityGroupIdList? = nil, + sseSpecification: VerifiedAccessSseSpecificationRequest? = nil, tagSpecifications: TagSpecificationList? = nil, verifiedAccessGroupId: VerifiedAccessGroupId) { self.applicationDomain = applicationDomain @@ -9001,6 +9007,7 @@ public struct CreateVerifiedAccessEndpointRequest: Codable, Equatable { self.networkInterfaceOptions = networkInterfaceOptions self.policyDocument = policyDocument self.securityGroupIds = securityGroupIds + self.sseSpecification = sseSpecification self.tagSpecifications = tagSpecifications self.verifiedAccessGroupId = verifiedAccessGroupId } @@ -9018,6 +9025,7 @@ public struct CreateVerifiedAccessEndpointRequest: Codable, Equatable { case networkInterfaceOptions = "NetworkInterfaceOptions" case policyDocument = "PolicyDocument" case securityGroupIds = "SecurityGroupId" + case sseSpecification = "SseSpecification" case tagSpecifications = "TagSpecification" case verifiedAccessGroupId = "VerifiedAccessGroupId" } @@ -9025,6 +9033,7 @@ public struct CreateVerifiedAccessEndpointRequest: Codable, Equatable { public func validate() throws { try loadBalancerOptions?.validate() try networkInterfaceOptions?.validate() + try sseSpecification?.validate() } } @@ -9049,6 +9058,7 @@ public struct CreateVerifiedAccessGroupRequest: Codable, Equatable { public var description: String? public var dryRun: Boolean? public var policyDocument: String? + public var sseSpecification: VerifiedAccessSseSpecificationRequest? public var tagSpecifications: TagSpecificationList? public var verifiedAccessInstanceId: VerifiedAccessInstanceId @@ -9056,12 +9066,14 @@ public struct CreateVerifiedAccessGroupRequest: Codable, Equatable { description: String? = nil, dryRun: Boolean? = nil, policyDocument: String? = nil, + sseSpecification: VerifiedAccessSseSpecificationRequest? = nil, tagSpecifications: TagSpecificationList? = nil, verifiedAccessInstanceId: VerifiedAccessInstanceId) { self.clientToken = clientToken self.description = description self.dryRun = dryRun self.policyDocument = policyDocument + self.sseSpecification = sseSpecification self.tagSpecifications = tagSpecifications self.verifiedAccessInstanceId = verifiedAccessInstanceId } @@ -9071,11 +9083,13 @@ public struct CreateVerifiedAccessGroupRequest: Codable, Equatable { case description = "Description" case dryRun = "DryRun" case policyDocument = "PolicyDocument" + case sseSpecification = "SseSpecification" case tagSpecifications = "TagSpecification" case verifiedAccessInstanceId = "VerifiedAccessInstanceId" } public func validate() throws { + try sseSpecification?.validate() } } @@ -9099,15 +9113,18 @@ public struct CreateVerifiedAccessInstanceRequest: Codable, Equatable { public var clientToken: String? public var description: String? public var dryRun: Boolean? + public var fIPSEnabled: Boolean? public var tagSpecifications: TagSpecificationList? public init(clientToken: String? = nil, description: String? = nil, dryRun: Boolean? = nil, + fIPSEnabled: Boolean? = nil, tagSpecifications: TagSpecificationList? = nil) { self.clientToken = clientToken self.description = description self.dryRun = dryRun + self.fIPSEnabled = fIPSEnabled self.tagSpecifications = tagSpecifications } @@ -9115,6 +9132,7 @@ public struct CreateVerifiedAccessInstanceRequest: Codable, Equatable { case clientToken = "ClientToken" case description = "Description" case dryRun = "DryRun" + case fIPSEnabled = "FIPSEnabled" case tagSpecifications = "TagSpecification" } @@ -9200,6 +9218,7 @@ public struct CreateVerifiedAccessTrustProviderRequest: Codable, Equatable { public var dryRun: Boolean? public var oidcOptions: CreateVerifiedAccessTrustProviderOidcOptions? public var policyReferenceName: String + public var sseSpecification: VerifiedAccessSseSpecificationRequest? public var tagSpecifications: TagSpecificationList? public var trustProviderType: TrustProviderType public var userTrustProviderType: UserTrustProviderType? @@ -9211,6 +9230,7 @@ public struct CreateVerifiedAccessTrustProviderRequest: Codable, Equatable { dryRun: Boolean? = nil, oidcOptions: CreateVerifiedAccessTrustProviderOidcOptions? = nil, policyReferenceName: String, + sseSpecification: VerifiedAccessSseSpecificationRequest? = nil, tagSpecifications: TagSpecificationList? = nil, trustProviderType: TrustProviderType, userTrustProviderType: UserTrustProviderType? = nil) { @@ -9221,6 +9241,7 @@ public struct CreateVerifiedAccessTrustProviderRequest: Codable, Equatable { self.dryRun = dryRun self.oidcOptions = oidcOptions self.policyReferenceName = policyReferenceName + self.sseSpecification = sseSpecification self.tagSpecifications = tagSpecifications self.trustProviderType = trustProviderType self.userTrustProviderType = userTrustProviderType @@ -9234,6 +9255,7 @@ public struct CreateVerifiedAccessTrustProviderRequest: Codable, Equatable { case dryRun = "DryRun" case oidcOptions = "OidcOptions" case policyReferenceName = "PolicyReferenceName" + case sseSpecification = "SseSpecification" case tagSpecifications = "TagSpecification" case trustProviderType = "TrustProviderType" case userTrustProviderType = "UserTrustProviderType" @@ -9242,6 +9264,7 @@ public struct CreateVerifiedAccessTrustProviderRequest: Codable, Equatable { public func validate() throws { try deviceOptions?.validate() try oidcOptions?.validate() + try sseSpecification?.validate() } } @@ -9427,6 +9450,7 @@ public struct CreateVpcEndpointRequest: Codable, Equatable { public var routeTableIds: VpcEndpointRouteTableIdList? public var securityGroupIds: VpcEndpointSecurityGroupIdList? public var serviceName: String + public var subnetConfigurations: SubnetConfigurationsList? public var subnetIds: VpcEndpointSubnetIdList? public var tagSpecifications: TagSpecificationList? public var vpcEndpointType: VpcEndpointType? @@ -9441,6 +9465,7 @@ public struct CreateVpcEndpointRequest: Codable, Equatable { routeTableIds: VpcEndpointRouteTableIdList? = nil, securityGroupIds: VpcEndpointSecurityGroupIdList? = nil, serviceName: String, + subnetConfigurations: SubnetConfigurationsList? = nil, subnetIds: VpcEndpointSubnetIdList? = nil, tagSpecifications: TagSpecificationList? = nil, vpcEndpointType: VpcEndpointType? = nil, @@ -9454,6 +9479,7 @@ public struct CreateVpcEndpointRequest: Codable, Equatable { self.routeTableIds = routeTableIds self.securityGroupIds = securityGroupIds self.serviceName = serviceName + self.subnetConfigurations = subnetConfigurations self.subnetIds = subnetIds self.tagSpecifications = tagSpecifications self.vpcEndpointType = vpcEndpointType @@ -9470,6 +9496,7 @@ public struct CreateVpcEndpointRequest: Codable, Equatable { case routeTableIds = "RouteTableId" case securityGroupIds = "SecurityGroupId" case serviceName = "ServiceName" + case subnetConfigurations = "SubnetConfiguration" case subnetIds = "SubnetId" case tagSpecifications = "TagSpecification" case vpcEndpointType = "VpcEndpointType" @@ -10650,6 +10677,25 @@ public struct DeleteKeyPairRequest: Codable, Equatable { } } +public struct DeleteKeyPairResult: Codable, Equatable { + public var keyPairId: String? + public var `return`: Boolean? + + public init(keyPairId: String? = nil, + `return`: Boolean? = nil) { + self.keyPairId = keyPairId + self.`return` = `return` + } + + enum CodingKeys: String, CodingKey { + case keyPairId + case `return` = "return" + } + + public func validate() throws { + } +} + public struct DeleteLaunchTemplateRequest: Codable, Equatable { public var dryRun: Boolean? public var launchTemplateId: LaunchTemplateId? @@ -14804,6 +14850,7 @@ public struct DescribeImagesRequest: Codable, Equatable { public var filters: FilterList? public var imageIds: ImageIdStringList? public var includeDeprecated: Boolean? + public var includeDisabled: Boolean? public var maxResults: Integer? public var nextToken: String? public var owners: OwnerStringList? @@ -14813,6 +14860,7 @@ public struct DescribeImagesRequest: Codable, Equatable { filters: FilterList? = nil, imageIds: ImageIdStringList? = nil, includeDeprecated: Boolean? = nil, + includeDisabled: Boolean? = nil, maxResults: Integer? = nil, nextToken: String? = nil, owners: OwnerStringList? = nil) { @@ -14821,6 +14869,7 @@ public struct DescribeImagesRequest: Codable, Equatable { self.filters = filters self.imageIds = imageIds self.includeDeprecated = includeDeprecated + self.includeDisabled = includeDisabled self.maxResults = maxResults self.nextToken = nextToken self.owners = owners @@ -14832,6 +14881,7 @@ public struct DescribeImagesRequest: Codable, Equatable { case filters = "Filter" case imageIds = "ImageId" case includeDeprecated = "IncludeDeprecated" + case includeDisabled = "IncludeDisabled" case maxResults = "MaxResults" case nextToken = "NextToken" case owners = "Owner" @@ -20712,6 +20762,36 @@ public struct DisableFastSnapshotRestoresResult: Codable, Equatable { } } +public struct DisableImageBlockPublicAccessRequest: Codable, Equatable { + public var dryRun: Boolean? + + public init(dryRun: Boolean? = nil) { + self.dryRun = dryRun + } + + enum CodingKeys: String, CodingKey { + case dryRun = "DryRun" + } + + public func validate() throws { + } +} + +public struct DisableImageBlockPublicAccessResult: Codable, Equatable { + public var imageBlockPublicAccessState: ImageBlockPublicAccessDisabledState? + + public init(imageBlockPublicAccessState: ImageBlockPublicAccessDisabledState? = nil) { + self.imageBlockPublicAccessState = imageBlockPublicAccessState + } + + enum CodingKeys: String, CodingKey { + case imageBlockPublicAccessState + } + + public func validate() throws { + } +} + public struct DisableImageDeprecationRequest: Codable, Equatable { public var dryRun: Boolean? public var imageId: ImageId @@ -20746,6 +20826,40 @@ public struct DisableImageDeprecationResult: Codable, Equatable { } } +public struct DisableImageRequest: Codable, Equatable { + public var dryRun: Boolean? + public var imageId: ImageId + + public init(dryRun: Boolean? = nil, + imageId: ImageId) { + self.dryRun = dryRun + self.imageId = imageId + } + + enum CodingKeys: String, CodingKey { + case dryRun = "DryRun" + case imageId = "ImageId" + } + + public func validate() throws { + } +} + +public struct DisableImageResult: Codable, Equatable { + public var `return`: Boolean? + + public init(`return`: Boolean? = nil) { + self.`return` = `return` + } + + enum CodingKeys: String, CodingKey { + case `return` = "return" + } + + public func validate() throws { + } +} + public struct DisableIpamOrganizationAdminAccountRequest: Codable, Equatable { public var delegatedAdminAccountId: String public var dryRun: Boolean? @@ -22463,6 +22577,40 @@ public struct EnableFastSnapshotRestoresResult: Codable, Equatable { } } +public struct EnableImageBlockPublicAccessRequest: Codable, Equatable { + public var dryRun: Boolean? + public var imageBlockPublicAccessState: ImageBlockPublicAccessEnabledState + + public init(dryRun: Boolean? = nil, + imageBlockPublicAccessState: ImageBlockPublicAccessEnabledState) { + self.dryRun = dryRun + self.imageBlockPublicAccessState = imageBlockPublicAccessState + } + + enum CodingKeys: String, CodingKey { + case dryRun = "DryRun" + case imageBlockPublicAccessState = "ImageBlockPublicAccessState" + } + + public func validate() throws { + } +} + +public struct EnableImageBlockPublicAccessResult: Codable, Equatable { + public var imageBlockPublicAccessState: ImageBlockPublicAccessEnabledState? + + public init(imageBlockPublicAccessState: ImageBlockPublicAccessEnabledState? = nil) { + self.imageBlockPublicAccessState = imageBlockPublicAccessState + } + + enum CodingKeys: String, CodingKey { + case imageBlockPublicAccessState + } + + public func validate() throws { + } +} + public struct EnableImageDeprecationRequest: Codable, Equatable { public var deprecateAt: MillisecondDateTime public var dryRun: Boolean? @@ -22501,6 +22649,40 @@ public struct EnableImageDeprecationResult: Codable, Equatable { } } +public struct EnableImageRequest: Codable, Equatable { + public var dryRun: Boolean? + public var imageId: ImageId + + public init(dryRun: Boolean? = nil, + imageId: ImageId) { + self.dryRun = dryRun + self.imageId = imageId + } + + enum CodingKeys: String, CodingKey { + case dryRun = "DryRun" + case imageId = "ImageId" + } + + public func validate() throws { + } +} + +public struct EnableImageResult: Codable, Equatable { + public var `return`: Boolean? + + public init(`return`: Boolean? = nil) { + self.`return` = `return` + } + + enum CodingKeys: String, CodingKey { + case `return` = "return" + } + + public func validate() throws { + } +} + public struct EnableIpamOrganizationAdminAccountRequest: Codable, Equatable { public var delegatedAdminAccountId: String public var dryRun: Boolean? @@ -24835,13 +25017,17 @@ public struct GetEbsEncryptionByDefaultRequest: Codable, Equatable { public struct GetEbsEncryptionByDefaultResult: Codable, Equatable { public var ebsEncryptionByDefault: Boolean? + public var sseType: SSEType? - public init(ebsEncryptionByDefault: Boolean? = nil) { + public init(ebsEncryptionByDefault: Boolean? = nil, + sseType: SSEType? = nil) { self.ebsEncryptionByDefault = ebsEncryptionByDefault + self.sseType = sseType } enum CodingKeys: String, CodingKey { case ebsEncryptionByDefault + case sseType } public func validate() throws { @@ -24984,6 +25170,36 @@ public struct GetHostReservationPurchasePreviewResult: Codable, Equatable { } } +public struct GetImageBlockPublicAccessStateRequest: Codable, Equatable { + public var dryRun: Boolean? + + public init(dryRun: Boolean? = nil) { + self.dryRun = dryRun + } + + enum CodingKeys: String, CodingKey { + case dryRun = "DryRun" + } + + public func validate() throws { + } +} + +public struct GetImageBlockPublicAccessStateResult: Codable, Equatable { + public var imageBlockPublicAccessState: String? + + public init(imageBlockPublicAccessState: String? = nil) { + self.imageBlockPublicAccessState = imageBlockPublicAccessState + } + + enum CodingKeys: String, CodingKey { + case imageBlockPublicAccessState + } + + public func validate() throws { + } +} + public struct GetInstanceTypesFromInstanceRequirementsRequest: Codable, Equatable { public var architectureTypes: ArchitectureTypeSet public var dryRun: Boolean? @@ -25674,11 +25890,11 @@ public struct GetPasswordDataRequest: Codable, Equatable { public struct GetPasswordDataResult: Codable, Equatable { public var instanceId: String? - public var passwordData: String? + public var passwordData: PasswordData? public var timestamp: DateTime? public init(instanceId: String? = nil, - passwordData: String? = nil, + passwordData: PasswordData? = nil, timestamp: DateTime? = nil) { self.instanceId = instanceId self.passwordData = passwordData @@ -25767,6 +25983,57 @@ public struct GetReservedInstancesExchangeQuoteResult: Codable, Equatable { } } +public struct GetSecurityGroupsForVpcRequest: Codable, Equatable { + public var dryRun: Boolean? + public var filters: FilterList? + public var maxResults: GetSecurityGroupsForVpcRequestMaxResults? + public var nextToken: String? + public var vpcId: VpcId + + public init(dryRun: Boolean? = nil, + filters: FilterList? = nil, + maxResults: GetSecurityGroupsForVpcRequestMaxResults? = nil, + nextToken: String? = nil, + vpcId: VpcId) { + self.dryRun = dryRun + self.filters = filters + self.maxResults = maxResults + self.nextToken = nextToken + self.vpcId = vpcId + } + + enum CodingKeys: String, CodingKey { + case dryRun = "DryRun" + case filters = "Filter" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case vpcId = "VpcId" + } + + public func validate() throws { + try maxResults?.validateAsGetSecurityGroupsForVpcRequestMaxResults() + } +} + +public struct GetSecurityGroupsForVpcResult: Codable, Equatable { + public var nextToken: String? + public var securityGroupForVpcs: SecurityGroupForVpcList? + + public init(nextToken: String? = nil, + securityGroupForVpcs: SecurityGroupForVpcList? = nil) { + self.nextToken = nextToken + self.securityGroupForVpcs = securityGroupForVpcs + } + + enum CodingKeys: String, CodingKey { + case nextToken + case securityGroupForVpcs = "securityGroupForVpcSet" + } + + public func validate() throws { + } +} + public struct GetSerialConsoleAccessStatusRequest: Codable, Equatable { public var dryRun: Boolean? @@ -27074,6 +27341,7 @@ public struct Image: Codable, Equatable { public var ramdiskId: String? public var rootDeviceName: String? public var rootDeviceType: DeviceType? + public var sourceInstanceId: String? public var sriovNetSupport: String? public var state: ImageState? public var stateReason: StateReason? @@ -27105,6 +27373,7 @@ public struct Image: Codable, Equatable { ramdiskId: String? = nil, rootDeviceName: String? = nil, rootDeviceType: DeviceType? = nil, + sourceInstanceId: String? = nil, sriovNetSupport: String? = nil, state: ImageState? = nil, stateReason: StateReason? = nil, @@ -27135,6 +27404,7 @@ public struct Image: Codable, Equatable { self.ramdiskId = ramdiskId self.rootDeviceName = rootDeviceName self.rootDeviceType = rootDeviceType + self.sourceInstanceId = sourceInstanceId self.sriovNetSupport = sriovNetSupport self.state = state self.stateReason = stateReason @@ -27168,6 +27438,7 @@ public struct Image: Codable, Equatable { case ramdiskId case rootDeviceName case rootDeviceType + case sourceInstanceId case sriovNetSupport case state = "imageState" case stateReason @@ -28035,13 +28306,17 @@ public struct ImportVolumeTaskDetails: Codable, Equatable { public struct InferenceAcceleratorInfo: Codable, Equatable { public var accelerators: InferenceDeviceInfoList? + public var totalInferenceMemoryInMiB: TotalInferenceMemory? - public init(accelerators: InferenceDeviceInfoList? = nil) { + public init(accelerators: InferenceDeviceInfoList? = nil, + totalInferenceMemoryInMiB: TotalInferenceMemory? = nil) { self.accelerators = accelerators + self.totalInferenceMemoryInMiB = totalInferenceMemoryInMiB } enum CodingKeys: String, CodingKey { case accelerators + case totalInferenceMemoryInMiB } public func validate() throws { @@ -28051,22 +28326,42 @@ public struct InferenceAcceleratorInfo: Codable, Equatable { public struct InferenceDeviceInfo: Codable, Equatable { public var count: InferenceDeviceCount? public var manufacturer: InferenceDeviceManufacturerName? + public var memoryInfo: InferenceDeviceMemoryInfo? public var name: InferenceDeviceName? public init(count: InferenceDeviceCount? = nil, manufacturer: InferenceDeviceManufacturerName? = nil, + memoryInfo: InferenceDeviceMemoryInfo? = nil, name: InferenceDeviceName? = nil) { self.count = count self.manufacturer = manufacturer + self.memoryInfo = memoryInfo self.name = name } enum CodingKeys: String, CodingKey { case count case manufacturer + case memoryInfo case name } + public func validate() throws { + try memoryInfo?.validate() + } +} + +public struct InferenceDeviceMemoryInfo: Codable, Equatable { + public var sizeInMiB: InferenceDeviceMemorySize? + + public init(sizeInMiB: InferenceDeviceMemorySize? = nil) { + self.sizeInMiB = sizeInMiB + } + + enum CodingKeys: String, CodingKey { + case sizeInMiB + } + public func validate() throws { } } @@ -28783,13 +29078,17 @@ public struct InstanceIpv4Prefix: Codable, Equatable { public struct InstanceIpv6Address: Codable, Equatable { public var ipv6Address: String? + public var isPrimaryIpv6: Boolean? - public init(ipv6Address: String? = nil) { + public init(ipv6Address: String? = nil, + isPrimaryIpv6: Boolean? = nil) { self.ipv6Address = ipv6Address + self.isPrimaryIpv6 = isPrimaryIpv6 } enum CodingKeys: String, CodingKey { case ipv6Address + case isPrimaryIpv6 } public func validate() throws { @@ -29129,6 +29428,7 @@ public struct InstanceNetworkInterfaceSpecification: Codable, Equatable { public var ipv6Prefixes: Ipv6PrefixList? public var networkCardIndex: Integer? public var networkInterfaceId: NetworkInterfaceId? + public var primaryIpv6: Boolean? public var privateIpAddress: String? public var privateIpAddresses: PrivateIpAddressSpecificationList? public var secondaryPrivateIpAddressCount: Integer? @@ -29149,6 +29449,7 @@ public struct InstanceNetworkInterfaceSpecification: Codable, Equatable { ipv6Prefixes: Ipv6PrefixList? = nil, networkCardIndex: Integer? = nil, networkInterfaceId: NetworkInterfaceId? = nil, + primaryIpv6: Boolean? = nil, privateIpAddress: String? = nil, privateIpAddresses: PrivateIpAddressSpecificationList? = nil, secondaryPrivateIpAddressCount: Integer? = nil, @@ -29168,6 +29469,7 @@ public struct InstanceNetworkInterfaceSpecification: Codable, Equatable { self.ipv6Prefixes = ipv6Prefixes self.networkCardIndex = networkCardIndex self.networkInterfaceId = networkInterfaceId + self.primaryIpv6 = primaryIpv6 self.privateIpAddress = privateIpAddress self.privateIpAddresses = privateIpAddresses self.secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount @@ -29190,6 +29492,7 @@ public struct InstanceNetworkInterfaceSpecification: Codable, Equatable { case ipv6Prefixes = "Ipv6Prefix" case networkCardIndex = "NetworkCardIndex" case networkInterfaceId + case primaryIpv6 = "PrimaryIpv6" case privateIpAddress case privateIpAddresses = "privateIpAddressesSet" case secondaryPrivateIpAddressCount @@ -29733,6 +30036,8 @@ public struct InstanceTypeInfo: Codable, Equatable { public var memoryInfo: MemoryInfo? public var networkInfo: NetworkInfo? public var nitroEnclavesSupport: NitroEnclavesSupport? + public var nitroTpmInfo: NitroTpmInfo? + public var nitroTpmSupport: NitroTpmSupport? public var placementGroupInfo: PlacementGroupInfo? public var processorInfo: ProcessorInfo? public var supportedBootModes: BootModeTypeList? @@ -29759,6 +30064,8 @@ public struct InstanceTypeInfo: Codable, Equatable { memoryInfo: MemoryInfo? = nil, networkInfo: NetworkInfo? = nil, nitroEnclavesSupport: NitroEnclavesSupport? = nil, + nitroTpmInfo: NitroTpmInfo? = nil, + nitroTpmSupport: NitroTpmSupport? = nil, placementGroupInfo: PlacementGroupInfo? = nil, processorInfo: ProcessorInfo? = nil, supportedBootModes: BootModeTypeList? = nil, @@ -29784,6 +30091,8 @@ public struct InstanceTypeInfo: Codable, Equatable { self.memoryInfo = memoryInfo self.networkInfo = networkInfo self.nitroEnclavesSupport = nitroEnclavesSupport + self.nitroTpmInfo = nitroTpmInfo + self.nitroTpmSupport = nitroTpmSupport self.placementGroupInfo = placementGroupInfo self.processorInfo = processorInfo self.supportedBootModes = supportedBootModes @@ -29812,6 +30121,8 @@ public struct InstanceTypeInfo: Codable, Equatable { case memoryInfo case networkInfo case nitroEnclavesSupport + case nitroTpmInfo + case nitroTpmSupport case placementGroupInfo case processorInfo case supportedBootModes @@ -29829,6 +30140,7 @@ public struct InstanceTypeInfo: Codable, Equatable { try instanceStorageInfo?.validate() try memoryInfo?.validate() try networkInfo?.validate() + try nitroTpmInfo?.validate() try placementGroupInfo?.validate() try processorInfo?.validate() try vCpuInfo?.validate() @@ -31697,6 +32009,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecification: Codable, Equa public var ipv6Prefixes: Ipv6PrefixListResponse? public var networkCardIndex: Integer? public var networkInterfaceId: NetworkInterfaceId? + public var primaryIpv6: Boolean? public var privateIpAddress: String? public var privateIpAddresses: PrivateIpAddressSpecificationList? public var secondaryPrivateIpAddressCount: Integer? @@ -31717,6 +32030,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecification: Codable, Equa ipv6Prefixes: Ipv6PrefixListResponse? = nil, networkCardIndex: Integer? = nil, networkInterfaceId: NetworkInterfaceId? = nil, + primaryIpv6: Boolean? = nil, privateIpAddress: String? = nil, privateIpAddresses: PrivateIpAddressSpecificationList? = nil, secondaryPrivateIpAddressCount: Integer? = nil, @@ -31736,6 +32050,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecification: Codable, Equa self.ipv6Prefixes = ipv6Prefixes self.networkCardIndex = networkCardIndex self.networkInterfaceId = networkInterfaceId + self.primaryIpv6 = primaryIpv6 self.privateIpAddress = privateIpAddress self.privateIpAddresses = privateIpAddresses self.secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount @@ -31758,6 +32073,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecification: Codable, Equa case ipv6Prefixes = "ipv6PrefixSet" case networkCardIndex case networkInterfaceId + case primaryIpv6 case privateIpAddress case privateIpAddresses = "privateIpAddressesSet" case secondaryPrivateIpAddressCount @@ -31784,6 +32100,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecificationRequest: Codabl public var ipv6Prefixes: Ipv6PrefixList? public var networkCardIndex: Integer? public var networkInterfaceId: NetworkInterfaceId? + public var primaryIpv6: Boolean? public var privateIpAddress: String? public var privateIpAddresses: PrivateIpAddressSpecificationList? public var secondaryPrivateIpAddressCount: Integer? @@ -31804,6 +32121,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecificationRequest: Codabl ipv6Prefixes: Ipv6PrefixList? = nil, networkCardIndex: Integer? = nil, networkInterfaceId: NetworkInterfaceId? = nil, + primaryIpv6: Boolean? = nil, privateIpAddress: String? = nil, privateIpAddresses: PrivateIpAddressSpecificationList? = nil, secondaryPrivateIpAddressCount: Integer? = nil, @@ -31823,6 +32141,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecificationRequest: Codabl self.ipv6Prefixes = ipv6Prefixes self.networkCardIndex = networkCardIndex self.networkInterfaceId = networkInterfaceId + self.primaryIpv6 = primaryIpv6 self.privateIpAddress = privateIpAddress self.privateIpAddresses = privateIpAddresses self.secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount @@ -31845,6 +32164,7 @@ public struct LaunchTemplateInstanceNetworkInterfaceSpecificationRequest: Codabl case ipv6Prefixes = "Ipv6Prefix" case networkCardIndex = "NetworkCardIndex" case networkInterfaceId = "NetworkInterfaceId" + case primaryIpv6 = "PrimaryIpv6" case privateIpAddress = "PrivateIpAddress" case privateIpAddresses = "PrivateIpAddresses" case secondaryPrivateIpAddressCount = "SecondaryPrivateIpAddressCount" @@ -34422,6 +34742,7 @@ public struct ModifyNetworkInterfaceAttributeRequest: Codable, Equatable { public var description: AttributeValue? public var dryRun: Boolean? public var enaSrdSpecification: EnaSrdSpecification? + public var enablePrimaryIpv6: Boolean? public var groups: SecurityGroupIdStringList? public var networkInterfaceId: NetworkInterfaceId public var sourceDestCheck: AttributeBooleanValue? @@ -34430,6 +34751,7 @@ public struct ModifyNetworkInterfaceAttributeRequest: Codable, Equatable { description: AttributeValue? = nil, dryRun: Boolean? = nil, enaSrdSpecification: EnaSrdSpecification? = nil, + enablePrimaryIpv6: Boolean? = nil, groups: SecurityGroupIdStringList? = nil, networkInterfaceId: NetworkInterfaceId, sourceDestCheck: AttributeBooleanValue? = nil) { @@ -34437,6 +34759,7 @@ public struct ModifyNetworkInterfaceAttributeRequest: Codable, Equatable { self.description = description self.dryRun = dryRun self.enaSrdSpecification = enaSrdSpecification + self.enablePrimaryIpv6 = enablePrimaryIpv6 self.groups = groups self.networkInterfaceId = networkInterfaceId self.sourceDestCheck = sourceDestCheck @@ -34447,6 +34770,7 @@ public struct ModifyNetworkInterfaceAttributeRequest: Codable, Equatable { case description case dryRun case enaSrdSpecification = "EnaSrdSpecification" + case enablePrimaryIpv6 = "EnablePrimaryIpv6" case groups = "SecurityGroupId" case networkInterfaceId case sourceDestCheck @@ -35220,18 +35544,21 @@ public struct ModifyVerifiedAccessEndpointPolicyRequest: Codable, Equatable { public var clientToken: String? public var dryRun: Boolean? public var policyDocument: String? - public var policyEnabled: Boolean + public var policyEnabled: Boolean? + public var sseSpecification: VerifiedAccessSseSpecificationRequest? public var verifiedAccessEndpointId: VerifiedAccessEndpointId public init(clientToken: String? = nil, dryRun: Boolean? = nil, policyDocument: String? = nil, - policyEnabled: Boolean, + policyEnabled: Boolean? = nil, + sseSpecification: VerifiedAccessSseSpecificationRequest? = nil, verifiedAccessEndpointId: VerifiedAccessEndpointId) { self.clientToken = clientToken self.dryRun = dryRun self.policyDocument = policyDocument self.policyEnabled = policyEnabled + self.sseSpecification = sseSpecification self.verifiedAccessEndpointId = verifiedAccessEndpointId } @@ -35240,29 +35567,36 @@ public struct ModifyVerifiedAccessEndpointPolicyRequest: Codable, Equatable { case dryRun = "DryRun" case policyDocument = "PolicyDocument" case policyEnabled = "PolicyEnabled" + case sseSpecification = "SseSpecification" case verifiedAccessEndpointId = "VerifiedAccessEndpointId" } public func validate() throws { + try sseSpecification?.validate() } } public struct ModifyVerifiedAccessEndpointPolicyResult: Codable, Equatable { public var policyDocument: String? public var policyEnabled: Boolean? + public var sseSpecification: VerifiedAccessSseSpecificationResponse? public init(policyDocument: String? = nil, - policyEnabled: Boolean? = nil) { + policyEnabled: Boolean? = nil, + sseSpecification: VerifiedAccessSseSpecificationResponse? = nil) { self.policyDocument = policyDocument self.policyEnabled = policyEnabled + self.sseSpecification = sseSpecification } enum CodingKeys: String, CodingKey { case policyDocument case policyEnabled + case sseSpecification } public func validate() throws { + try sseSpecification?.validate() } } @@ -35327,18 +35661,21 @@ public struct ModifyVerifiedAccessGroupPolicyRequest: Codable, Equatable { public var clientToken: String? public var dryRun: Boolean? public var policyDocument: String? - public var policyEnabled: Boolean + public var policyEnabled: Boolean? + public var sseSpecification: VerifiedAccessSseSpecificationRequest? public var verifiedAccessGroupId: VerifiedAccessGroupId public init(clientToken: String? = nil, dryRun: Boolean? = nil, policyDocument: String? = nil, - policyEnabled: Boolean, + policyEnabled: Boolean? = nil, + sseSpecification: VerifiedAccessSseSpecificationRequest? = nil, verifiedAccessGroupId: VerifiedAccessGroupId) { self.clientToken = clientToken self.dryRun = dryRun self.policyDocument = policyDocument self.policyEnabled = policyEnabled + self.sseSpecification = sseSpecification self.verifiedAccessGroupId = verifiedAccessGroupId } @@ -35347,29 +35684,36 @@ public struct ModifyVerifiedAccessGroupPolicyRequest: Codable, Equatable { case dryRun = "DryRun" case policyDocument = "PolicyDocument" case policyEnabled = "PolicyEnabled" + case sseSpecification = "SseSpecification" case verifiedAccessGroupId = "VerifiedAccessGroupId" } public func validate() throws { + try sseSpecification?.validate() } } public struct ModifyVerifiedAccessGroupPolicyResult: Codable, Equatable { public var policyDocument: String? public var policyEnabled: Boolean? + public var sseSpecification: VerifiedAccessSseSpecificationResponse? public init(policyDocument: String? = nil, - policyEnabled: Boolean? = nil) { + policyEnabled: Boolean? = nil, + sseSpecification: VerifiedAccessSseSpecificationResponse? = nil) { self.policyDocument = policyDocument self.policyEnabled = policyEnabled + self.sseSpecification = sseSpecification } enum CodingKeys: String, CodingKey { case policyDocument case policyEnabled + case sseSpecification } public func validate() throws { + try sseSpecification?.validate() } } @@ -35551,17 +35895,20 @@ public struct ModifyVerifiedAccessTrustProviderRequest: Codable, Equatable { public var description: String? public var dryRun: Boolean? public var oidcOptions: ModifyVerifiedAccessTrustProviderOidcOptions? + public var sseSpecification: VerifiedAccessSseSpecificationRequest? public var verifiedAccessTrustProviderId: VerifiedAccessTrustProviderId public init(clientToken: String? = nil, description: String? = nil, dryRun: Boolean? = nil, oidcOptions: ModifyVerifiedAccessTrustProviderOidcOptions? = nil, + sseSpecification: VerifiedAccessSseSpecificationRequest? = nil, verifiedAccessTrustProviderId: VerifiedAccessTrustProviderId) { self.clientToken = clientToken self.description = description self.dryRun = dryRun self.oidcOptions = oidcOptions + self.sseSpecification = sseSpecification self.verifiedAccessTrustProviderId = verifiedAccessTrustProviderId } @@ -35570,11 +35917,13 @@ public struct ModifyVerifiedAccessTrustProviderRequest: Codable, Equatable { case description = "Description" case dryRun = "DryRun" case oidcOptions = "OidcOptions" + case sseSpecification = "SseSpecification" case verifiedAccessTrustProviderId = "VerifiedAccessTrustProviderId" } public func validate() throws { try oidcOptions?.validate() + try sseSpecification?.validate() } } @@ -35758,6 +36107,7 @@ public struct ModifyVpcEndpointRequest: Codable, Equatable { public var removeSecurityGroupIds: VpcEndpointSecurityGroupIdList? public var removeSubnetIds: VpcEndpointSubnetIdList? public var resetPolicy: Boolean? + public var subnetConfigurations: SubnetConfigurationsList? public var vpcEndpointId: VpcEndpointId public init(addRouteTableIds: VpcEndpointRouteTableIdList? = nil, @@ -35772,6 +36122,7 @@ public struct ModifyVpcEndpointRequest: Codable, Equatable { removeSecurityGroupIds: VpcEndpointSecurityGroupIdList? = nil, removeSubnetIds: VpcEndpointSubnetIdList? = nil, resetPolicy: Boolean? = nil, + subnetConfigurations: SubnetConfigurationsList? = nil, vpcEndpointId: VpcEndpointId) { self.addRouteTableIds = addRouteTableIds self.addSecurityGroupIds = addSecurityGroupIds @@ -35785,6 +36136,7 @@ public struct ModifyVpcEndpointRequest: Codable, Equatable { self.removeSecurityGroupIds = removeSecurityGroupIds self.removeSubnetIds = removeSubnetIds self.resetPolicy = resetPolicy + self.subnetConfigurations = subnetConfigurations self.vpcEndpointId = vpcEndpointId } @@ -35801,6 +36153,7 @@ public struct ModifyVpcEndpointRequest: Codable, Equatable { case removeSecurityGroupIds = "RemoveSecurityGroupId" case removeSubnetIds = "RemoveSubnetId" case resetPolicy = "ResetPolicy" + case subnetConfigurations = "SubnetConfiguration" case vpcEndpointId = "VpcEndpointId" } @@ -36741,22 +37094,30 @@ public struct NetworkBandwidthGbpsRequest: Codable, Equatable { } public struct NetworkCardInfo: Codable, Equatable { + public var baselineBandwidthInGbps: BaselineBandwidthInGbps? public var maximumNetworkInterfaces: MaxNetworkInterfaces? public var networkCardIndex: NetworkCardIndex? public var networkPerformance: NetworkPerformance? + public var peakBandwidthInGbps: PeakBandwidthInGbps? - public init(maximumNetworkInterfaces: MaxNetworkInterfaces? = nil, + public init(baselineBandwidthInGbps: BaselineBandwidthInGbps? = nil, + maximumNetworkInterfaces: MaxNetworkInterfaces? = nil, networkCardIndex: NetworkCardIndex? = nil, - networkPerformance: NetworkPerformance? = nil) { + networkPerformance: NetworkPerformance? = nil, + peakBandwidthInGbps: PeakBandwidthInGbps? = nil) { + self.baselineBandwidthInGbps = baselineBandwidthInGbps self.maximumNetworkInterfaces = maximumNetworkInterfaces self.networkCardIndex = networkCardIndex self.networkPerformance = networkPerformance + self.peakBandwidthInGbps = peakBandwidthInGbps } enum CodingKeys: String, CodingKey { + case baselineBandwidthInGbps case maximumNetworkInterfaces case networkCardIndex case networkPerformance + case peakBandwidthInGbps } public func validate() throws { @@ -37351,13 +37712,17 @@ public struct NetworkInterfaceCountRequest: Codable, Equatable { public struct NetworkInterfaceIpv6Address: Codable, Equatable { public var ipv6Address: String? + public var isPrimaryIpv6: Boolean? - public init(ipv6Address: String? = nil) { + public init(ipv6Address: String? = nil, + isPrimaryIpv6: Boolean? = nil) { self.ipv6Address = ipv6Address + self.isPrimaryIpv6 = isPrimaryIpv6 } enum CodingKeys: String, CodingKey { case ipv6Address + case isPrimaryIpv6 } public func validate() throws { @@ -37466,6 +37831,21 @@ public struct NewDhcpConfiguration: Codable, Equatable { } } +public struct NitroTpmInfo: Codable, Equatable { + public var supportedVersions: NitroTpmSupportedVersionsList? + + public init(supportedVersions: NitroTpmSupportedVersionsList? = nil) { + self.supportedVersions = supportedVersions + } + + enum CodingKeys: String, CodingKey { + case supportedVersions + } + + public func validate() throws { + } +} + public struct OidcOptions: Codable, Equatable { public var authorizationEndpoint: String? public var clientId: String? @@ -41610,6 +41990,7 @@ public struct RestoreSnapshotFromRecycleBinResult: Codable, Equatable { public var ownerId: String? public var progress: String? public var snapshotId: String? + public var sseType: SSEType? public var startTime: MillisecondDateTime? public var state: SnapshotState? public var volumeId: String? @@ -41621,6 +42002,7 @@ public struct RestoreSnapshotFromRecycleBinResult: Codable, Equatable { ownerId: String? = nil, progress: String? = nil, snapshotId: String? = nil, + sseType: SSEType? = nil, startTime: MillisecondDateTime? = nil, state: SnapshotState? = nil, volumeId: String? = nil, @@ -41631,6 +42013,7 @@ public struct RestoreSnapshotFromRecycleBinResult: Codable, Equatable { self.ownerId = ownerId self.progress = progress self.snapshotId = snapshotId + self.sseType = sseType self.startTime = startTime self.state = state self.volumeId = volumeId @@ -41644,6 +42027,7 @@ public struct RestoreSnapshotFromRecycleBinResult: Codable, Equatable { case ownerId case progress case snapshotId + case sseType case startTime case state = "status" case volumeId @@ -42155,6 +42539,7 @@ public struct RunInstancesRequest: Codable, Equatable { public var ebsOptimized: Boolean? public var elasticGpuSpecification: ElasticGpuSpecifications? public var elasticInferenceAccelerators: ElasticInferenceAccelerators? + public var enablePrimaryIpv6: Boolean? public var enclaveOptions: EnclaveOptionsRequest? public var hibernationOptions: HibernationOptionsRequest? public var iamInstanceProfile: IamInstanceProfileSpecification? @@ -42196,6 +42581,7 @@ public struct RunInstancesRequest: Codable, Equatable { ebsOptimized: Boolean? = nil, elasticGpuSpecification: ElasticGpuSpecifications? = nil, elasticInferenceAccelerators: ElasticInferenceAccelerators? = nil, + enablePrimaryIpv6: Boolean? = nil, enclaveOptions: EnclaveOptionsRequest? = nil, hibernationOptions: HibernationOptionsRequest? = nil, iamInstanceProfile: IamInstanceProfileSpecification? = nil, @@ -42236,6 +42622,7 @@ public struct RunInstancesRequest: Codable, Equatable { self.ebsOptimized = ebsOptimized self.elasticGpuSpecification = elasticGpuSpecification self.elasticInferenceAccelerators = elasticInferenceAccelerators + self.enablePrimaryIpv6 = enablePrimaryIpv6 self.enclaveOptions = enclaveOptions self.hibernationOptions = hibernationOptions self.iamInstanceProfile = iamInstanceProfile @@ -42279,6 +42666,7 @@ public struct RunInstancesRequest: Codable, Equatable { case ebsOptimized case elasticGpuSpecification = "ElasticGpuSpecification" case elasticInferenceAccelerators = "ElasticInferenceAccelerator" + case enablePrimaryIpv6 = "EnablePrimaryIpv6" case enclaveOptions = "EnclaveOptions" case hibernationOptions = "HibernationOptions" case iamInstanceProfile @@ -42397,13 +42785,13 @@ public struct S3Storage: Codable, Equatable { public var bucket: String? public var prefix: String? public var uploadPolicy: Blob? - public var uploadPolicySignature: String? + public var uploadPolicySignature: S3StorageUploadPolicySignature? public init(aWSAccessKeyId: String? = nil, bucket: String? = nil, prefix: String? = nil, uploadPolicy: Blob? = nil, - uploadPolicySignature: String? = nil) { + uploadPolicySignature: S3StorageUploadPolicySignature? = nil) { self.aWSAccessKeyId = aWSAccessKeyId self.bucket = bucket self.prefix = prefix @@ -43091,6 +43479,41 @@ public struct SecurityGroup: Codable, Equatable { } } +public struct SecurityGroupForVpc: Codable, Equatable { + public var description: String? + public var groupId: String? + public var groupName: String? + public var ownerId: String? + public var primaryVpcId: String? + public var tags: TagList? + + public init(description: String? = nil, + groupId: String? = nil, + groupName: String? = nil, + ownerId: String? = nil, + primaryVpcId: String? = nil, + tags: TagList? = nil) { + self.description = description + self.groupId = groupId + self.groupName = groupName + self.ownerId = ownerId + self.primaryVpcId = primaryVpcId + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case description + case groupId + case groupName + case ownerId + case primaryVpcId + case tags = "tagSet" + } + + public func validate() throws { + } +} + public struct SecurityGroupIdentifier: Codable, Equatable { public var groupId: String? public var groupName: String? @@ -43507,6 +43930,7 @@ public struct Snapshot: Codable, Equatable { public var progress: String? public var restoreExpiryTime: MillisecondDateTime? public var snapshotId: String? + public var sseType: SSEType? public var startTime: DateTime? public var state: SnapshotState? public var stateMessage: String? @@ -43525,6 +43949,7 @@ public struct Snapshot: Codable, Equatable { progress: String? = nil, restoreExpiryTime: MillisecondDateTime? = nil, snapshotId: String? = nil, + sseType: SSEType? = nil, startTime: DateTime? = nil, state: SnapshotState? = nil, stateMessage: String? = nil, @@ -43542,6 +43967,7 @@ public struct Snapshot: Codable, Equatable { self.progress = progress self.restoreExpiryTime = restoreExpiryTime self.snapshotId = snapshotId + self.sseType = sseType self.startTime = startTime self.state = state self.stateMessage = stateMessage @@ -43562,6 +43988,7 @@ public struct Snapshot: Codable, Equatable { case progress case restoreExpiryTime case snapshotId + case sseType case startTime case state = "status" case stateMessage = "statusMessage" @@ -43662,6 +44089,7 @@ public struct SnapshotInfo: Codable, Equatable { public var ownerId: String? public var progress: String? public var snapshotId: String? + public var sseType: SSEType? public var startTime: MillisecondDateTime? public var state: SnapshotState? public var tags: TagList? @@ -43674,6 +44102,7 @@ public struct SnapshotInfo: Codable, Equatable { ownerId: String? = nil, progress: String? = nil, snapshotId: String? = nil, + sseType: SSEType? = nil, startTime: MillisecondDateTime? = nil, state: SnapshotState? = nil, tags: TagList? = nil, @@ -43685,6 +44114,7 @@ public struct SnapshotInfo: Codable, Equatable { self.ownerId = ownerId self.progress = progress self.snapshotId = snapshotId + self.sseType = sseType self.startTime = startTime self.state = state self.tags = tags @@ -43699,6 +44129,7 @@ public struct SnapshotInfo: Codable, Equatable { case ownerId case progress case snapshotId + case sseType case startTime case state case tags = "tagSet" @@ -45073,6 +45504,29 @@ public struct SubnetCidrReservation: Codable, Equatable { } } +public struct SubnetConfiguration: Codable, Equatable { + public var ipv4: String? + public var ipv6: String? + public var subnetId: SubnetId? + + public init(ipv4: String? = nil, + ipv6: String? = nil, + subnetId: SubnetId? = nil) { + self.ipv4 = ipv4 + self.ipv6 = ipv6 + self.subnetId = subnetId + } + + enum CodingKeys: String, CodingKey { + case ipv4 = "Ipv4" + case ipv6 = "Ipv6" + case subnetId = "SubnetId" + } + + public func validate() throws { + } +} + public struct SubnetIpv6CidrBlockAssociation: Codable, Equatable { public var associationId: SubnetCidrAssociationId? public var ipv6CidrBlock: String? @@ -47807,6 +48261,7 @@ public struct VerifiedAccessEndpoint: Codable, Equatable { public var loadBalancerOptions: VerifiedAccessEndpointLoadBalancerOptions? public var networkInterfaceOptions: VerifiedAccessEndpointEniOptions? public var securityGroupIds: SecurityGroupIdList? + public var sseSpecification: VerifiedAccessSseSpecificationResponse? public var status: VerifiedAccessEndpointStatus? public var tags: TagList? public var verifiedAccessEndpointId: String? @@ -47826,6 +48281,7 @@ public struct VerifiedAccessEndpoint: Codable, Equatable { loadBalancerOptions: VerifiedAccessEndpointLoadBalancerOptions? = nil, networkInterfaceOptions: VerifiedAccessEndpointEniOptions? = nil, securityGroupIds: SecurityGroupIdList? = nil, + sseSpecification: VerifiedAccessSseSpecificationResponse? = nil, status: VerifiedAccessEndpointStatus? = nil, tags: TagList? = nil, verifiedAccessEndpointId: String? = nil, @@ -47844,6 +48300,7 @@ public struct VerifiedAccessEndpoint: Codable, Equatable { self.loadBalancerOptions = loadBalancerOptions self.networkInterfaceOptions = networkInterfaceOptions self.securityGroupIds = securityGroupIds + self.sseSpecification = sseSpecification self.status = status self.tags = tags self.verifiedAccessEndpointId = verifiedAccessEndpointId @@ -47865,6 +48322,7 @@ public struct VerifiedAccessEndpoint: Codable, Equatable { case loadBalancerOptions case networkInterfaceOptions case securityGroupIds = "securityGroupIdSet" + case sseSpecification case status case tags = "tagSet" case verifiedAccessEndpointId @@ -47875,6 +48333,7 @@ public struct VerifiedAccessEndpoint: Codable, Equatable { public func validate() throws { try loadBalancerOptions?.validate() try networkInterfaceOptions?.validate() + try sseSpecification?.validate() try status?.validate() } } @@ -47956,6 +48415,7 @@ public struct VerifiedAccessGroup: Codable, Equatable { public var description: String? public var lastUpdatedTime: String? public var owner: String? + public var sseSpecification: VerifiedAccessSseSpecificationResponse? public var tags: TagList? public var verifiedAccessGroupArn: String? public var verifiedAccessGroupId: String? @@ -47966,6 +48426,7 @@ public struct VerifiedAccessGroup: Codable, Equatable { description: String? = nil, lastUpdatedTime: String? = nil, owner: String? = nil, + sseSpecification: VerifiedAccessSseSpecificationResponse? = nil, tags: TagList? = nil, verifiedAccessGroupArn: String? = nil, verifiedAccessGroupId: String? = nil, @@ -47975,6 +48436,7 @@ public struct VerifiedAccessGroup: Codable, Equatable { self.description = description self.lastUpdatedTime = lastUpdatedTime self.owner = owner + self.sseSpecification = sseSpecification self.tags = tags self.verifiedAccessGroupArn = verifiedAccessGroupArn self.verifiedAccessGroupId = verifiedAccessGroupId @@ -47987,6 +48449,7 @@ public struct VerifiedAccessGroup: Codable, Equatable { case description case lastUpdatedTime case owner + case sseSpecification case tags = "tagSet" case verifiedAccessGroupArn case verifiedAccessGroupId @@ -47994,12 +48457,14 @@ public struct VerifiedAccessGroup: Codable, Equatable { } public func validate() throws { + try sseSpecification?.validate() } } public struct VerifiedAccessInstance: Codable, Equatable { public var creationTime: String? public var description: String? + public var fipsEnabled: Boolean? public var lastUpdatedTime: String? public var tags: TagList? public var verifiedAccessInstanceId: String? @@ -48007,12 +48472,14 @@ public struct VerifiedAccessInstance: Codable, Equatable { public init(creationTime: String? = nil, description: String? = nil, + fipsEnabled: Boolean? = nil, lastUpdatedTime: String? = nil, tags: TagList? = nil, verifiedAccessInstanceId: String? = nil, verifiedAccessTrustProviders: VerifiedAccessTrustProviderCondensedList? = nil) { self.creationTime = creationTime self.description = description + self.fipsEnabled = fipsEnabled self.lastUpdatedTime = lastUpdatedTime self.tags = tags self.verifiedAccessInstanceId = verifiedAccessInstanceId @@ -48022,6 +48489,7 @@ public struct VerifiedAccessInstance: Codable, Equatable { enum CodingKeys: String, CodingKey { case creationTime case description + case fipsEnabled case lastUpdatedTime case tags = "tagSet" case verifiedAccessInstanceId @@ -48284,6 +48752,44 @@ public struct VerifiedAccessLogs: Codable, Equatable { } } +public struct VerifiedAccessSseSpecificationRequest: Codable, Equatable { + public var customerManagedKeyEnabled: Boolean? + public var kmsKeyArn: KmsKeyArn? + + public init(customerManagedKeyEnabled: Boolean? = nil, + kmsKeyArn: KmsKeyArn? = nil) { + self.customerManagedKeyEnabled = customerManagedKeyEnabled + self.kmsKeyArn = kmsKeyArn + } + + enum CodingKeys: String, CodingKey { + case customerManagedKeyEnabled = "CustomerManagedKeyEnabled" + case kmsKeyArn = "KmsKeyArn" + } + + public func validate() throws { + } +} + +public struct VerifiedAccessSseSpecificationResponse: Codable, Equatable { + public var customerManagedKeyEnabled: Boolean? + public var kmsKeyArn: KmsKeyArn? + + public init(customerManagedKeyEnabled: Boolean? = nil, + kmsKeyArn: KmsKeyArn? = nil) { + self.customerManagedKeyEnabled = customerManagedKeyEnabled + self.kmsKeyArn = kmsKeyArn + } + + enum CodingKeys: String, CodingKey { + case customerManagedKeyEnabled + case kmsKeyArn + } + + public func validate() throws { + } +} + public struct VerifiedAccessTrustProvider: Codable, Equatable { public var creationTime: String? public var description: String? @@ -48292,6 +48798,7 @@ public struct VerifiedAccessTrustProvider: Codable, Equatable { public var lastUpdatedTime: String? public var oidcOptions: OidcOptions? public var policyReferenceName: String? + public var sseSpecification: VerifiedAccessSseSpecificationResponse? public var tags: TagList? public var trustProviderType: TrustProviderType? public var userTrustProviderType: UserTrustProviderType? @@ -48304,6 +48811,7 @@ public struct VerifiedAccessTrustProvider: Codable, Equatable { lastUpdatedTime: String? = nil, oidcOptions: OidcOptions? = nil, policyReferenceName: String? = nil, + sseSpecification: VerifiedAccessSseSpecificationResponse? = nil, tags: TagList? = nil, trustProviderType: TrustProviderType? = nil, userTrustProviderType: UserTrustProviderType? = nil, @@ -48315,6 +48823,7 @@ public struct VerifiedAccessTrustProvider: Codable, Equatable { self.lastUpdatedTime = lastUpdatedTime self.oidcOptions = oidcOptions self.policyReferenceName = policyReferenceName + self.sseSpecification = sseSpecification self.tags = tags self.trustProviderType = trustProviderType self.userTrustProviderType = userTrustProviderType @@ -48329,6 +48838,7 @@ public struct VerifiedAccessTrustProvider: Codable, Equatable { case lastUpdatedTime case oidcOptions case policyReferenceName + case sseSpecification case tags = "tagSet" case trustProviderType case userTrustProviderType @@ -48338,6 +48848,7 @@ public struct VerifiedAccessTrustProvider: Codable, Equatable { public func validate() throws { try deviceOptions?.validate() try oidcOptions?.validate() + try sseSpecification?.validate() } } @@ -48419,6 +48930,7 @@ public struct Volume: Codable, Equatable { public var outpostArn: String? public var size: Integer? public var snapshotId: String? + public var sseType: SSEType? public var state: VolumeState? public var tags: TagList? public var throughput: Integer? @@ -48436,6 +48948,7 @@ public struct Volume: Codable, Equatable { outpostArn: String? = nil, size: Integer? = nil, snapshotId: String? = nil, + sseType: SSEType? = nil, state: VolumeState? = nil, tags: TagList? = nil, throughput: Integer? = nil, @@ -48452,6 +48965,7 @@ public struct Volume: Codable, Equatable { self.outpostArn = outpostArn self.size = size self.snapshotId = snapshotId + self.sseType = sseType self.state = state self.tags = tags self.throughput = throughput @@ -48471,6 +48985,7 @@ public struct Volume: Codable, Equatable { case outpostArn case size case snapshotId + case sseType case state = "status" case tags = "tagSet" case throughput diff --git a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelTypes.swift b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelTypes.swift index 29dba17..84a76f7 100644 --- a/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelTypes.swift +++ b/Sources/ElasticComputeCloudModel/ElasticComputeCloudModelTypes.swift @@ -658,6 +658,11 @@ public enum BareMetal: String, Codable, CustomStringConvertible { */ public typealias BareMetalFlag = Bool +/** + Type definition for the BaselineBandwidthInGbps field. + */ +public typealias BaselineBandwidthInGbps = Double + /** Type definition for the BaselineBandwidthInMbps field. */ @@ -984,6 +989,7 @@ public enum CapacityReservationInstancePlatform: String, Codable, CustomStringCo case rhelWithSqlServerWeb = "RHEL with SQL Server Web" case redHatEnterpriseLinux = "Red Hat Enterprise Linux" case suseLinux = "SUSE Linux" + case ubuntuPro = "Ubuntu Pro" case windows = "Windows" case windowsWithSqlServer = "Windows with SQL Server" case windowsWithSqlServerEnterprise = "Windows with SQL Server Enterprise" @@ -2995,6 +3001,11 @@ public typealias GetIpamPoolAllocationsMaxResults = Int */ public typealias GetManagedPrefixListAssociationsMaxResults = Int +/** + Type definition for the GetSecurityGroupsForVpcRequestMaxResults field. + */ +public typealias GetSecurityGroupsForVpcRequestMaxResults = Int + /** Type definition for the GetSubnetCidrReservationsMaxResults field. */ @@ -3263,6 +3274,32 @@ public enum ImageAttributeName: String, Codable, CustomStringConvertible { public static let __default: ImageAttributeName = .blockdevicemapping } +/** + Enumeration restricting the values of the ImageBlockPublicAccessDisabledState field. + */ +public enum ImageBlockPublicAccessDisabledState: String, Codable, CustomStringConvertible { + case unblocked + + public var description: String { + return rawValue + } + + public static let __default: ImageBlockPublicAccessDisabledState = .unblocked +} + +/** + Enumeration restricting the values of the ImageBlockPublicAccessEnabledState field. + */ +public enum ImageBlockPublicAccessEnabledState: String, Codable, CustomStringConvertible { + case blockNewSharing = "block-new-sharing" + + public var description: String { + return rawValue + } + + public static let __default: ImageBlockPublicAccessEnabledState = .blockNewSharing +} + /** Type definition for the ImageDiskContainerList field. */ @@ -3299,6 +3336,7 @@ public typealias ImageRecycleBinInfoList = [ImageRecycleBinInfo] public enum ImageState: String, Codable, CustomStringConvertible { case available case deregistered + case disabled case error case failed case invalid @@ -3410,6 +3448,11 @@ public typealias InferenceDeviceInfoList = [InferenceDeviceInfo] */ public typealias InferenceDeviceManufacturerName = String +/** + Type definition for the InferenceDeviceMemorySize field. + */ +public typealias InferenceDeviceMemorySize = Int + /** Type definition for the InferenceDeviceName field. */ @@ -3985,6 +4028,18 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case c6inLarge = "c6in.large" case c6inMetal = "c6in.metal" case c6inXlarge = "c6in.xlarge" + case c7a12xlarge = "c7a.12xlarge" + case c7a16xlarge = "c7a.16xlarge" + case c7a24xlarge = "c7a.24xlarge" + case c7a2xlarge = "c7a.2xlarge" + case c7a32xlarge = "c7a.32xlarge" + case c7a48xlarge = "c7a.48xlarge" + case c7a4xlarge = "c7a.4xlarge" + case c7a8xlarge = "c7a.8xlarge" + case c7aLarge = "c7a.large" + case c7aMedium = "c7a.medium" + case c7aMetal48xl = "c7a.metal-48xl" + case c7aXlarge = "c7a.xlarge" case c7g12xlarge = "c7g.12xlarge" case c7g16xlarge = "c7g.16xlarge" case c7g2xlarge = "c7g.2xlarge" @@ -3994,6 +4049,31 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case c7gMedium = "c7g.medium" case c7gMetal = "c7g.metal" case c7gXlarge = "c7g.xlarge" + case c7gd12xlarge = "c7gd.12xlarge" + case c7gd16xlarge = "c7gd.16xlarge" + case c7gd2xlarge = "c7gd.2xlarge" + case c7gd4xlarge = "c7gd.4xlarge" + case c7gd8xlarge = "c7gd.8xlarge" + case c7gdLarge = "c7gd.large" + case c7gdMedium = "c7gd.medium" + case c7gdXlarge = "c7gd.xlarge" + case c7gn12xlarge = "c7gn.12xlarge" + case c7gn16xlarge = "c7gn.16xlarge" + case c7gn2xlarge = "c7gn.2xlarge" + case c7gn4xlarge = "c7gn.4xlarge" + case c7gn8xlarge = "c7gn.8xlarge" + case c7gnLarge = "c7gn.large" + case c7gnMedium = "c7gn.medium" + case c7gnXlarge = "c7gn.xlarge" + case c7i12xlarge = "c7i.12xlarge" + case c7i16xlarge = "c7i.16xlarge" + case c7i24xlarge = "c7i.24xlarge" + case c7i2xlarge = "c7i.2xlarge" + case c7i48xlarge = "c7i.48xlarge" + case c7i4xlarge = "c7i.4xlarge" + case c7i8xlarge = "c7i.8xlarge" + case c7iLarge = "c7i.large" + case c7iXlarge = "c7i.xlarge" case cc14xlarge = "cc1.4xlarge" case cc28xlarge = "cc2.8xlarge" case cg14xlarge = "cg1.4xlarge" @@ -4055,6 +4135,13 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case hi14xlarge = "hi1.4xlarge" case hpc6a48xlarge = "hpc6a.48xlarge" case hpc6id32xlarge = "hpc6id.32xlarge" + case hpc7a12xlarge = "hpc7a.12xlarge" + case hpc7a24xlarge = "hpc7a.24xlarge" + case hpc7a48xlarge = "hpc7a.48xlarge" + case hpc7a96xlarge = "hpc7a.96xlarge" + case hpc7g16xlarge = "hpc7g.16xlarge" + case hpc7g4xlarge = "hpc7g.4xlarge" + case hpc7g8xlarge = "hpc7g.8xlarge" case hs18xlarge = "hs1.8xlarge" case i22xlarge = "i2.2xlarge" case i24xlarge = "i2.4xlarge" @@ -4254,6 +4341,18 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case m6inLarge = "m6in.large" case m6inMetal = "m6in.metal" case m6inXlarge = "m6in.xlarge" + case m7a12xlarge = "m7a.12xlarge" + case m7a16xlarge = "m7a.16xlarge" + case m7a24xlarge = "m7a.24xlarge" + case m7a2xlarge = "m7a.2xlarge" + case m7a32xlarge = "m7a.32xlarge" + case m7a48xlarge = "m7a.48xlarge" + case m7a4xlarge = "m7a.4xlarge" + case m7a8xlarge = "m7a.8xlarge" + case m7aLarge = "m7a.large" + case m7aMedium = "m7a.medium" + case m7aMetal48xl = "m7a.metal-48xl" + case m7aXlarge = "m7a.xlarge" case m7g12xlarge = "m7g.12xlarge" case m7g16xlarge = "m7g.16xlarge" case m7g2xlarge = "m7g.2xlarge" @@ -4263,7 +4362,30 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case m7gMedium = "m7g.medium" case m7gMetal = "m7g.metal" case m7gXlarge = "m7g.xlarge" + case m7gd12xlarge = "m7gd.12xlarge" + case m7gd16xlarge = "m7gd.16xlarge" + case m7gd2xlarge = "m7gd.2xlarge" + case m7gd4xlarge = "m7gd.4xlarge" + case m7gd8xlarge = "m7gd.8xlarge" + case m7gdLarge = "m7gd.large" + case m7gdMedium = "m7gd.medium" + case m7gdXlarge = "m7gd.xlarge" + case m7iFlex2xlarge = "m7i-flex.2xlarge" + case m7iFlex4xlarge = "m7i-flex.4xlarge" + case m7iFlex8xlarge = "m7i-flex.8xlarge" + case m7iFlexLarge = "m7i-flex.large" + case m7iFlexXlarge = "m7i-flex.xlarge" + case m7i12xlarge = "m7i.12xlarge" + case m7i16xlarge = "m7i.16xlarge" + case m7i24xlarge = "m7i.24xlarge" + case m7i2xlarge = "m7i.2xlarge" + case m7i48xlarge = "m7i.48xlarge" + case m7i4xlarge = "m7i.4xlarge" + case m7i8xlarge = "m7i.8xlarge" + case m7iLarge = "m7i.large" + case m7iXlarge = "m7i.xlarge" case mac1Metal = "mac1.metal" + case mac2M2proMetal = "mac2-m2pro.metal" case mac2Metal = "mac2.metal" case p216xlarge = "p2.16xlarge" case p28xlarge = "p2.8xlarge" @@ -4274,6 +4396,7 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case p3dn24xlarge = "p3dn.24xlarge" case p4d24xlarge = "p4d.24xlarge" case p4de24xlarge = "p4de.24xlarge" + case p548xlarge = "p5.48xlarge" case r32xlarge = "r3.2xlarge" case r34xlarge = "r3.4xlarge" case r38xlarge = "r3.8xlarge" @@ -4415,6 +4538,18 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case r6inLarge = "r6in.large" case r6inMetal = "r6in.metal" case r6inXlarge = "r6in.xlarge" + case r7a12xlarge = "r7a.12xlarge" + case r7a16xlarge = "r7a.16xlarge" + case r7a24xlarge = "r7a.24xlarge" + case r7a2xlarge = "r7a.2xlarge" + case r7a32xlarge = "r7a.32xlarge" + case r7a48xlarge = "r7a.48xlarge" + case r7a4xlarge = "r7a.4xlarge" + case r7a8xlarge = "r7a.8xlarge" + case r7aLarge = "r7a.large" + case r7aMedium = "r7a.medium" + case r7aMetal48xl = "r7a.metal-48xl" + case r7aXlarge = "r7a.xlarge" case r7g12xlarge = "r7g.12xlarge" case r7g16xlarge = "r7g.16xlarge" case r7g2xlarge = "r7g.2xlarge" @@ -4424,6 +4559,31 @@ public enum InstanceType: String, Codable, CustomStringConvertible { case r7gMedium = "r7g.medium" case r7gMetal = "r7g.metal" case r7gXlarge = "r7g.xlarge" + case r7gd12xlarge = "r7gd.12xlarge" + case r7gd16xlarge = "r7gd.16xlarge" + case r7gd2xlarge = "r7gd.2xlarge" + case r7gd4xlarge = "r7gd.4xlarge" + case r7gd8xlarge = "r7gd.8xlarge" + case r7gdLarge = "r7gd.large" + case r7gdMedium = "r7gd.medium" + case r7gdXlarge = "r7gd.xlarge" + case r7i12xlarge = "r7i.12xlarge" + case r7i16xlarge = "r7i.16xlarge" + case r7i24xlarge = "r7i.24xlarge" + case r7i2xlarge = "r7i.2xlarge" + case r7i48xlarge = "r7i.48xlarge" + case r7i4xlarge = "r7i.4xlarge" + case r7i8xlarge = "r7i.8xlarge" + case r7iLarge = "r7i.large" + case r7iXlarge = "r7i.xlarge" + case r7iz12xlarge = "r7iz.12xlarge" + case r7iz16xlarge = "r7iz.16xlarge" + case r7iz2xlarge = "r7iz.2xlarge" + case r7iz32xlarge = "r7iz.32xlarge" + case r7iz4xlarge = "r7iz.4xlarge" + case r7iz8xlarge = "r7iz.8xlarge" + case r7izLarge = "r7iz.large" + case r7izXlarge = "r7iz.xlarge" case t1Micro = "t1.micro" case t22xlarge = "t2.2xlarge" case t2Large = "t2.large" @@ -5277,6 +5437,11 @@ public enum KeyType: String, Codable, CustomStringConvertible { public static let __default: KeyType = .ed25519 } +/** + Type definition for the KmsKeyArn field. + */ +public typealias KmsKeyArn = String + /** Type definition for the KmsKeyId field. */ @@ -5746,6 +5911,7 @@ public typealias Location = String public enum LocationType: String, Codable, CustomStringConvertible { case availabilityZone = "availability-zone" case availabilityZoneId = "availability-zone-id" + case outpost case region public var description: String { @@ -6295,6 +6461,30 @@ public enum NitroEnclavesSupport: String, Codable, CustomStringConvertible { public static let __default: NitroEnclavesSupport = .supported } +/** + Enumeration restricting the values of the NitroTpmSupport field. + */ +public enum NitroTpmSupport: String, Codable, CustomStringConvertible { + case supported + case unsupported + + public var description: String { + return rawValue + } + + public static let __default: NitroTpmSupport = .supported +} + +/** + Type definition for the NitroTpmSupportedVersionType field. + */ +public typealias NitroTpmSupportedVersionType = String + +/** + Type definition for the NitroTpmSupportedVersionsList field. + */ +public typealias NitroTpmSupportedVersionsList = [NitroTpmSupportedVersionType] + /** Type definition for the OccurrenceDayRequestSet field. */ @@ -6406,6 +6596,11 @@ public enum PartitionLoadFrequency: String, Codable, CustomStringConvertible { public static let __default: PartitionLoadFrequency = .daily } +/** + Type definition for the PasswordData field. + */ +public typealias PasswordData = String + /** Type definition for the PathComponentList field. */ @@ -6439,6 +6634,11 @@ public enum PaymentOption: String, Codable, CustomStringConvertible { public static let __default: PaymentOption = .allupfront } +/** + Type definition for the PeakBandwidthInGbps field. + */ +public typealias PeakBandwidthInGbps = Double + /** Enumeration restricting the values of the PeriodType field. */ @@ -7510,6 +7710,31 @@ public typealias RunInstancesUserData = String */ public typealias S3ObjectTagList = [S3ObjectTag] +/** + Type definition for the S3StorageUploadPolicy field. + */ +public typealias S3StorageUploadPolicy = String + +/** + Type definition for the S3StorageUploadPolicySignature field. + */ +public typealias S3StorageUploadPolicySignature = String + +/** + Enumeration restricting the values of the SSEType field. + */ +public enum SSEType: String, Codable, CustomStringConvertible { + case none + case sseEbs = "sse-ebs" + case sseKms = "sse-kms" + + public var description: String { + return rawValue + } + + public static let __default: SSEType = .none +} + /** Type definition for the ScheduledInstanceAvailabilitySet field. */ @@ -7550,6 +7775,11 @@ public typealias ScheduledInstancesNetworkInterfaceSet = [ScheduledInstancesNetw */ public typealias ScheduledInstancesSecurityGroupIdSet = [SecurityGroupId] +/** + Type definition for the SecurityGroupForVpcList field. + */ +public typealias SecurityGroupForVpcList = [SecurityGroupForVpc] + /** Type definition for the SecurityGroupId field. */ @@ -7854,6 +8084,7 @@ public enum SpotInstanceState: String, Codable, CustomStringConvertible { case active case cancelled case closed + case disabled case failed case open @@ -8094,6 +8325,11 @@ public enum SubnetCidrReservationType: String, Codable, CustomStringConvertible public static let __default: SubnetCidrReservationType = .explicit } +/** + Type definition for the SubnetConfigurationsList field. + */ +public typealias SubnetConfigurationsList = [SubnetConfiguration] + /** Type definition for the SubnetId field. */ @@ -9891,6 +10127,11 @@ public typealias TotalFpgaMemory = Int */ public typealias TotalGpuMemory = Int +/** + Type definition for the TotalInferenceMemory field. + */ +public typealias TotalInferenceMemory = Int + /** Validation for the AddIpamOperatingRegionSet field. */ @@ -9949,7 +10190,7 @@ extension ElasticComputeCloudModel.AllowedInstanceType { throw ElasticComputeCloudError.validationError(reason: "The provided value to AllowedInstanceType violated the maximum length constraint.") } - guard let matchingRange = self.range(of: "[a-zA-Z0-9\\.\\*]+", options: .regularExpression), + guard let matchingRange = self.range(of: "[a-zA-Z0-9\\.\\*\\-]+", options: .regularExpression), matchingRange == startIndex.. 1000 { + throw ElasticComputeCloudError.validationError(reason: "The provided value to GetSecurityGroupsForVpcRequestMaxResults violated the maximum range constraint.") + } + } +} + /** Validation for the GetSubnetCidrReservationsMaxResults field. */ diff --git a/Sources/ElasticContainerModel/ElasticContainerModelTypes.swift b/Sources/ElasticContainerModel/ElasticContainerModelTypes.swift index fb58e33..7ba32b2 100644 --- a/Sources/ElasticContainerModel/ElasticContainerModelTypes.swift +++ b/Sources/ElasticContainerModel/ElasticContainerModelTypes.swift @@ -1030,6 +1030,7 @@ public enum SettingName: String, Codable, CustomStringConvertible { case containerinsights = "containerInsights" case containerinstancelongarnformat = "containerInstanceLongArnFormat" case fargatefipsmode = "fargateFIPSMode" + case fargatetaskretirementwaitperiod = "fargateTaskRetirementWaitPeriod" case servicelongarnformat = "serviceLongArnFormat" case tagresourceauthorization = "tagResourceAuthorization" case tasklongarnformat = "taskLongArnFormat" diff --git a/Sources/RDSClient/AWSRDSClient.swift b/Sources/RDSClient/AWSRDSClient.swift index f435c54..0b68188 100644 --- a/Sources/RDSClient/AWSRDSClient.swift +++ b/Sources/RDSClient/AWSRDSClient.swift @@ -2646,7 +2646,7 @@ public struct AWSRDSClient RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -2716,6 +2716,84 @@ public struct AWSRDSClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteDBClusterAutomatedBackup, + handlerDelegate: handlerDelegate) + let wrappedInput = DeleteDBClusterAutomatedBackupOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.deleteDBClusterAutomatedBackup.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the DeleteDBClusterAutomatedBackup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackupSync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteDBClusterAutomatedBackup, + handlerDelegate: handlerDelegate) + let wrappedInput = DeleteDBClusterAutomatedBackupOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.deleteDBClusterAutomatedBackup.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: RDSError = error.asTypedError() + throw typedError + } + } + /** Invokes the DeleteDBClusterEndpoint operation returning immediately and passing the response to a callback. @@ -4103,6 +4181,84 @@ public struct AWSRDSClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.describeDBClusterAutomatedBackups, + handlerDelegate: handlerDelegate) + let wrappedInput = DescribeDBClusterAutomatedBackupsOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.describeDBClusterAutomatedBackups.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the DescribeDBClusterAutomatedBackups operation waiting for the response before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackupsSync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.describeDBClusterAutomatedBackups, + handlerDelegate: handlerDelegate) + let wrappedInput = DescribeDBClusterAutomatedBackupsOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.describeDBClusterAutomatedBackups.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: RDSError = error.asTypedError() + throw typedError + } + } + /** Invokes the DescribeDBClusterBacktracks operation returning immediately and passing the response to a callback. @@ -9780,7 +9936,7 @@ public struct AWSRDSClient RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -9858,7 +10014,7 @@ public struct AWSRDSClient RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -11020,6 +11176,84 @@ public struct AWSRDSClient) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.switchoverGlobalCluster, + handlerDelegate: handlerDelegate) + let wrappedInput = SwitchoverGlobalClusterOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.switchoverGlobalCluster.rawValue, + version: apiVersion) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the SwitchoverGlobalCluster operation waiting for the response before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalClusterSync( + input: RDSModel.SwitchoverGlobalClusterMessage) throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.switchoverGlobalCluster, + handlerDelegate: handlerDelegate) + let wrappedInput = SwitchoverGlobalClusterOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.switchoverGlobalCluster.rawValue, + version: apiVersion) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: RDSError = error.asTypedError() + throw typedError + } + } + /** Invokes the SwitchoverReadReplica operation returning immediately and passing the response to a callback. @@ -12381,7 +12615,7 @@ public struct AWSRDSClient RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -12414,6 +12648,46 @@ public struct AWSRDSClient RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteDBClusterAutomatedBackup, + handlerDelegate: handlerDelegate) + let wrappedInput = DeleteDBClusterAutomatedBackupOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.deleteDBClusterAutomatedBackup.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: RDSError = error.asTypedError() + throw typedError + } + } + /** Invokes the DeleteDBClusterEndpoint operation suspending until the response is available before returning. @@ -13123,6 +13397,46 @@ public struct AWSRDSClient RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.describeDBClusterAutomatedBackups, + handlerDelegate: handlerDelegate) + let wrappedInput = DescribeDBClusterAutomatedBackupsOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.describeDBClusterAutomatedBackups.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: RDSError = error.asTypedError() + throw typedError + } + } + /** Invokes the DescribeDBClusterBacktracks operation suspending until the response is available before returning. @@ -16036,7 +16350,7 @@ public struct AWSRDSClient RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -16076,7 +16390,7 @@ public struct AWSRDSClient RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -16669,6 +16983,46 @@ public struct AWSRDSClient RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.switchoverGlobalCluster, + handlerDelegate: handlerDelegate) + let wrappedInput = SwitchoverGlobalClusterOperationHTTPRequestInput(encodable: input) + + let requestInput = QueryWrapperHTTPRequestInput( + wrappedInput: wrappedInput, + action: RDSModelOperations.switchoverGlobalCluster.rawValue, + version: apiVersion) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: RDSError = error.asTypedError() + throw typedError + } + } + /** Invokes the SwitchoverReadReplica operation suspending until the response is available before returning. diff --git a/Sources/RDSClient/MockRDSClient.swift b/Sources/RDSClient/MockRDSClient.swift index 269cace..feaadf6 100644 --- a/Sources/RDSClient/MockRDSClient.swift +++ b/Sources/RDSClient/MockRDSClient.swift @@ -95,6 +95,8 @@ public struct MockRDSClient: RDSClientProtocol { let deleteCustomDBEngineVersionSyncOverride: DeleteCustomDBEngineVersionSyncType? let deleteDBClusterAsyncOverride: DeleteDBClusterAsyncType? let deleteDBClusterSyncOverride: DeleteDBClusterSyncType? + let deleteDBClusterAutomatedBackupAsyncOverride: DeleteDBClusterAutomatedBackupAsyncType? + let deleteDBClusterAutomatedBackupSyncOverride: DeleteDBClusterAutomatedBackupSyncType? let deleteDBClusterEndpointAsyncOverride: DeleteDBClusterEndpointAsyncType? let deleteDBClusterEndpointSyncOverride: DeleteDBClusterEndpointSyncType? let deleteDBClusterParameterGroupAsyncOverride: DeleteDBClusterParameterGroupAsyncType? @@ -131,6 +133,8 @@ public struct MockRDSClient: RDSClientProtocol { let describeBlueGreenDeploymentsSyncOverride: DescribeBlueGreenDeploymentsSyncType? let describeCertificatesAsyncOverride: DescribeCertificatesAsyncType? let describeCertificatesSyncOverride: DescribeCertificatesSyncType? + let describeDBClusterAutomatedBackupsAsyncOverride: DescribeDBClusterAutomatedBackupsAsyncType? + let describeDBClusterAutomatedBackupsSyncOverride: DescribeDBClusterAutomatedBackupsSyncType? let describeDBClusterBacktracksAsyncOverride: DescribeDBClusterBacktracksAsyncType? let describeDBClusterBacktracksSyncOverride: DescribeDBClusterBacktracksSyncType? let describeDBClusterEndpointsAsyncOverride: DescribeDBClusterEndpointsAsyncType? @@ -309,6 +313,8 @@ public struct MockRDSClient: RDSClientProtocol { let stopDBInstanceAutomatedBackupsReplicationSyncOverride: StopDBInstanceAutomatedBackupsReplicationSyncType? let switchoverBlueGreenDeploymentAsyncOverride: SwitchoverBlueGreenDeploymentAsyncType? let switchoverBlueGreenDeploymentSyncOverride: SwitchoverBlueGreenDeploymentSyncType? + let switchoverGlobalClusterAsyncOverride: SwitchoverGlobalClusterAsyncType? + let switchoverGlobalClusterSyncOverride: SwitchoverGlobalClusterSyncType? let switchoverReadReplicaAsyncOverride: SwitchoverReadReplicaAsyncType? let switchoverReadReplicaSyncOverride: SwitchoverReadReplicaSyncType? @@ -383,6 +389,8 @@ public struct MockRDSClient: RDSClientProtocol { deleteCustomDBEngineVersionSync: DeleteCustomDBEngineVersionSyncType? = nil, deleteDBClusterAsync: DeleteDBClusterAsyncType? = nil, deleteDBClusterSync: DeleteDBClusterSyncType? = nil, + deleteDBClusterAutomatedBackupAsync: DeleteDBClusterAutomatedBackupAsyncType? = nil, + deleteDBClusterAutomatedBackupSync: DeleteDBClusterAutomatedBackupSyncType? = nil, deleteDBClusterEndpointAsync: DeleteDBClusterEndpointAsyncType? = nil, deleteDBClusterEndpointSync: DeleteDBClusterEndpointSyncType? = nil, deleteDBClusterParameterGroupAsync: DeleteDBClusterParameterGroupAsyncType? = nil, @@ -419,6 +427,8 @@ public struct MockRDSClient: RDSClientProtocol { describeBlueGreenDeploymentsSync: DescribeBlueGreenDeploymentsSyncType? = nil, describeCertificatesAsync: DescribeCertificatesAsyncType? = nil, describeCertificatesSync: DescribeCertificatesSyncType? = nil, + describeDBClusterAutomatedBackupsAsync: DescribeDBClusterAutomatedBackupsAsyncType? = nil, + describeDBClusterAutomatedBackupsSync: DescribeDBClusterAutomatedBackupsSyncType? = nil, describeDBClusterBacktracksAsync: DescribeDBClusterBacktracksAsyncType? = nil, describeDBClusterBacktracksSync: DescribeDBClusterBacktracksSyncType? = nil, describeDBClusterEndpointsAsync: DescribeDBClusterEndpointsAsyncType? = nil, @@ -597,6 +607,8 @@ public struct MockRDSClient: RDSClientProtocol { stopDBInstanceAutomatedBackupsReplicationSync: StopDBInstanceAutomatedBackupsReplicationSyncType? = nil, switchoverBlueGreenDeploymentAsync: SwitchoverBlueGreenDeploymentAsyncType? = nil, switchoverBlueGreenDeploymentSync: SwitchoverBlueGreenDeploymentSyncType? = nil, + switchoverGlobalClusterAsync: SwitchoverGlobalClusterAsyncType? = nil, + switchoverGlobalClusterSync: SwitchoverGlobalClusterSyncType? = nil, switchoverReadReplicaAsync: SwitchoverReadReplicaAsyncType? = nil, switchoverReadReplicaSync: SwitchoverReadReplicaSyncType? = nil) { self.addRoleToDBClusterAsyncOverride = addRoleToDBClusterAsync @@ -665,6 +677,8 @@ public struct MockRDSClient: RDSClientProtocol { self.deleteCustomDBEngineVersionSyncOverride = deleteCustomDBEngineVersionSync self.deleteDBClusterAsyncOverride = deleteDBClusterAsync self.deleteDBClusterSyncOverride = deleteDBClusterSync + self.deleteDBClusterAutomatedBackupAsyncOverride = deleteDBClusterAutomatedBackupAsync + self.deleteDBClusterAutomatedBackupSyncOverride = deleteDBClusterAutomatedBackupSync self.deleteDBClusterEndpointAsyncOverride = deleteDBClusterEndpointAsync self.deleteDBClusterEndpointSyncOverride = deleteDBClusterEndpointSync self.deleteDBClusterParameterGroupAsyncOverride = deleteDBClusterParameterGroupAsync @@ -701,6 +715,8 @@ public struct MockRDSClient: RDSClientProtocol { self.describeBlueGreenDeploymentsSyncOverride = describeBlueGreenDeploymentsSync self.describeCertificatesAsyncOverride = describeCertificatesAsync self.describeCertificatesSyncOverride = describeCertificatesSync + self.describeDBClusterAutomatedBackupsAsyncOverride = describeDBClusterAutomatedBackupsAsync + self.describeDBClusterAutomatedBackupsSyncOverride = describeDBClusterAutomatedBackupsSync self.describeDBClusterBacktracksAsyncOverride = describeDBClusterBacktracksAsync self.describeDBClusterBacktracksSyncOverride = describeDBClusterBacktracksSync self.describeDBClusterEndpointsAsyncOverride = describeDBClusterEndpointsAsync @@ -879,6 +895,8 @@ public struct MockRDSClient: RDSClientProtocol { self.stopDBInstanceAutomatedBackupsReplicationSyncOverride = stopDBInstanceAutomatedBackupsReplicationSync self.switchoverBlueGreenDeploymentAsyncOverride = switchoverBlueGreenDeploymentAsync self.switchoverBlueGreenDeploymentSyncOverride = switchoverBlueGreenDeploymentSync + self.switchoverGlobalClusterAsyncOverride = switchoverGlobalClusterAsync + self.switchoverGlobalClusterSyncOverride = switchoverGlobalClusterSync self.switchoverReadReplicaAsyncOverride = switchoverReadReplicaAsync self.switchoverReadReplicaSyncOverride = switchoverReadReplicaSync } @@ -2153,7 +2171,7 @@ public struct MockRDSClient: RDSClientProtocol { - completion: The DeleteDBClusterResultForDeleteDBCluster object or an error will be passed to this callback when the operation is complete. The DeleteDBClusterResultForDeleteDBCluster object will be validated before being returned to caller. - The possible errors are: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + The possible errors are: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ public func deleteDBClusterAsync( input: RDSModel.DeleteDBClusterMessage, @@ -2174,7 +2192,7 @@ public struct MockRDSClient: RDSClientProtocol { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ public func deleteDBClusterSync( input: RDSModel.DeleteDBClusterMessage) throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -2185,6 +2203,46 @@ public struct MockRDSClient: RDSClientProtocol { return DeleteDBClusterResultForDeleteDBCluster.__default } + /** + Invokes the DeleteDBClusterAutomatedBackup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - completion: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object or an error will be passed to this + callback when the operation is complete. The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup + object will be validated before being returned to caller. + The possible errors are: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackupAsync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage, + completion: @escaping (Result) -> ()) throws { + if let deleteDBClusterAutomatedBackupAsyncOverride = deleteDBClusterAutomatedBackupAsyncOverride { + return try deleteDBClusterAutomatedBackupAsyncOverride(input, completion) + } + + let result = DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup.__default + + completion(.success(result)) + } + + /** + Invokes the DeleteDBClusterAutomatedBackup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackupSync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + if let deleteDBClusterAutomatedBackupSyncOverride = deleteDBClusterAutomatedBackupSyncOverride { + return try deleteDBClusterAutomatedBackupSyncOverride(input) + } + + return DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup.__default + } + /** Invokes the DeleteDBClusterEndpoint operation returning immediately and passing the response to a callback. @@ -2873,6 +2931,46 @@ public struct MockRDSClient: RDSClientProtocol { return CertificateMessageForDescribeCertificates.__default } + /** + Invokes the DescribeDBClusterAutomatedBackups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - completion: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object or an error will be passed to this + callback when the operation is complete. The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + object will be validated before being returned to caller. + The possible errors are: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackupsAsync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage, + completion: @escaping (Result) -> ()) throws { + if let describeDBClusterAutomatedBackupsAsyncOverride = describeDBClusterAutomatedBackupsAsyncOverride { + return try describeDBClusterAutomatedBackupsAsyncOverride(input, completion) + } + + let result = DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups.__default + + completion(.success(result)) + } + + /** + Invokes the DescribeDBClusterAutomatedBackups operation waiting for the response before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackupsSync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + if let describeDBClusterAutomatedBackupsSyncOverride = describeDBClusterAutomatedBackupsSyncOverride { + return try describeDBClusterAutomatedBackupsSyncOverride(input) + } + + return DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups.__default + } + /** Invokes the DescribeDBClusterBacktracks operation returning immediately and passing the response to a callback. @@ -5767,7 +5865,7 @@ public struct MockRDSClient: RDSClientProtocol { - completion: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object or an error will be passed to this callback when the operation is complete. The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object will be validated before being returned to caller. - The possible errors are: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + The possible errors are: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ public func restoreDBClusterFromSnapshotAsync( input: RDSModel.RestoreDBClusterFromSnapshotMessage, @@ -5788,7 +5886,7 @@ public struct MockRDSClient: RDSClientProtocol { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ public func restoreDBClusterFromSnapshotSync( input: RDSModel.RestoreDBClusterFromSnapshotMessage) throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -5807,7 +5905,7 @@ public struct MockRDSClient: RDSClientProtocol { - completion: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object or an error will be passed to this callback when the operation is complete. The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object will be validated before being returned to caller. - The possible errors are: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + The possible errors are: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ public func restoreDBClusterToPointInTimeAsync( input: RDSModel.RestoreDBClusterToPointInTimeMessage, @@ -5828,7 +5926,7 @@ public struct MockRDSClient: RDSClientProtocol { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ public func restoreDBClusterToPointInTimeSync( input: RDSModel.RestoreDBClusterToPointInTimeMessage) throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -6399,6 +6497,46 @@ public struct MockRDSClient: RDSClientProtocol { return SwitchoverBlueGreenDeploymentResponseForSwitchoverBlueGreenDeployment.__default } + /** + Invokes the SwitchoverGlobalCluster operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - completion: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object or an error will be passed to this + callback when the operation is complete. The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + object will be validated before being returned to caller. + The possible errors are: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalClusterAsync( + input: RDSModel.SwitchoverGlobalClusterMessage, + completion: @escaping (Result) -> ()) throws { + if let switchoverGlobalClusterAsyncOverride = switchoverGlobalClusterAsyncOverride { + return try switchoverGlobalClusterAsyncOverride(input, completion) + } + + let result = SwitchoverGlobalClusterResultForSwitchoverGlobalCluster.__default + + completion(.success(result)) + } + + /** + Invokes the SwitchoverGlobalCluster operation waiting for the response before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalClusterSync( + input: RDSModel.SwitchoverGlobalClusterMessage) throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + if let switchoverGlobalClusterSyncOverride = switchoverGlobalClusterSyncOverride { + return try switchoverGlobalClusterSyncOverride(input) + } + + return SwitchoverGlobalClusterResultForSwitchoverGlobalCluster.__default + } + /** Invokes the SwitchoverReadReplica operation returning immediately and passing the response to a callback. diff --git a/Sources/RDSClient/MockRDSClientV2.swift b/Sources/RDSClient/MockRDSClientV2.swift index 38a1d61..f9097a2 100644 --- a/Sources/RDSClient/MockRDSClientV2.swift +++ b/Sources/RDSClient/MockRDSClientV2.swift @@ -63,6 +63,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { let deleteBlueGreenDeploymentOverride: DeleteBlueGreenDeploymentFunctionType? let deleteCustomDBEngineVersionOverride: DeleteCustomDBEngineVersionFunctionType? let deleteDBClusterOverride: DeleteDBClusterFunctionType? + let deleteDBClusterAutomatedBackupOverride: DeleteDBClusterAutomatedBackupFunctionType? let deleteDBClusterEndpointOverride: DeleteDBClusterEndpointFunctionType? let deleteDBClusterParameterGroupOverride: DeleteDBClusterParameterGroupFunctionType? let deleteDBClusterSnapshotOverride: DeleteDBClusterSnapshotFunctionType? @@ -81,6 +82,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { let describeAccountAttributesOverride: DescribeAccountAttributesFunctionType? let describeBlueGreenDeploymentsOverride: DescribeBlueGreenDeploymentsFunctionType? let describeCertificatesOverride: DescribeCertificatesFunctionType? + let describeDBClusterAutomatedBackupsOverride: DescribeDBClusterAutomatedBackupsFunctionType? let describeDBClusterBacktracksOverride: DescribeDBClusterBacktracksFunctionType? let describeDBClusterEndpointsOverride: DescribeDBClusterEndpointsFunctionType? let describeDBClusterParameterGroupsOverride: DescribeDBClusterParameterGroupsFunctionType? @@ -170,6 +172,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { let stopDBInstanceOverride: StopDBInstanceFunctionType? let stopDBInstanceAutomatedBackupsReplicationOverride: StopDBInstanceAutomatedBackupsReplicationFunctionType? let switchoverBlueGreenDeploymentOverride: SwitchoverBlueGreenDeploymentFunctionType? + let switchoverGlobalClusterOverride: SwitchoverGlobalClusterFunctionType? let switchoverReadReplicaOverride: SwitchoverReadReplicaFunctionType? /** @@ -210,6 +213,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { deleteBlueGreenDeployment: DeleteBlueGreenDeploymentFunctionType? = nil, deleteCustomDBEngineVersion: DeleteCustomDBEngineVersionFunctionType? = nil, deleteDBCluster: DeleteDBClusterFunctionType? = nil, + deleteDBClusterAutomatedBackup: DeleteDBClusterAutomatedBackupFunctionType? = nil, deleteDBClusterEndpoint: DeleteDBClusterEndpointFunctionType? = nil, deleteDBClusterParameterGroup: DeleteDBClusterParameterGroupFunctionType? = nil, deleteDBClusterSnapshot: DeleteDBClusterSnapshotFunctionType? = nil, @@ -228,6 +232,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { describeAccountAttributes: DescribeAccountAttributesFunctionType? = nil, describeBlueGreenDeployments: DescribeBlueGreenDeploymentsFunctionType? = nil, describeCertificates: DescribeCertificatesFunctionType? = nil, + describeDBClusterAutomatedBackups: DescribeDBClusterAutomatedBackupsFunctionType? = nil, describeDBClusterBacktracks: DescribeDBClusterBacktracksFunctionType? = nil, describeDBClusterEndpoints: DescribeDBClusterEndpointsFunctionType? = nil, describeDBClusterParameterGroups: DescribeDBClusterParameterGroupsFunctionType? = nil, @@ -317,6 +322,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { stopDBInstance: StopDBInstanceFunctionType? = nil, stopDBInstanceAutomatedBackupsReplication: StopDBInstanceAutomatedBackupsReplicationFunctionType? = nil, switchoverBlueGreenDeployment: SwitchoverBlueGreenDeploymentFunctionType? = nil, + switchoverGlobalCluster: SwitchoverGlobalClusterFunctionType? = nil, switchoverReadReplica: SwitchoverReadReplicaFunctionType? = nil) { self.addRoleToDBClusterOverride = addRoleToDBCluster self.addRoleToDBInstanceOverride = addRoleToDBInstance @@ -351,6 +357,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { self.deleteBlueGreenDeploymentOverride = deleteBlueGreenDeployment self.deleteCustomDBEngineVersionOverride = deleteCustomDBEngineVersion self.deleteDBClusterOverride = deleteDBCluster + self.deleteDBClusterAutomatedBackupOverride = deleteDBClusterAutomatedBackup self.deleteDBClusterEndpointOverride = deleteDBClusterEndpoint self.deleteDBClusterParameterGroupOverride = deleteDBClusterParameterGroup self.deleteDBClusterSnapshotOverride = deleteDBClusterSnapshot @@ -369,6 +376,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { self.describeAccountAttributesOverride = describeAccountAttributes self.describeBlueGreenDeploymentsOverride = describeBlueGreenDeployments self.describeCertificatesOverride = describeCertificates + self.describeDBClusterAutomatedBackupsOverride = describeDBClusterAutomatedBackups self.describeDBClusterBacktracksOverride = describeDBClusterBacktracks self.describeDBClusterEndpointsOverride = describeDBClusterEndpoints self.describeDBClusterParameterGroupsOverride = describeDBClusterParameterGroups @@ -458,6 +466,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { self.stopDBInstanceOverride = stopDBInstance self.stopDBInstanceAutomatedBackupsReplicationOverride = stopDBInstanceAutomatedBackupsReplication self.switchoverBlueGreenDeploymentOverride = switchoverBlueGreenDeployment + self.switchoverGlobalClusterOverride = switchoverGlobalCluster self.switchoverReadReplicaOverride = switchoverReadReplica } @@ -1035,7 +1044,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ public func deleteDBCluster( input: RDSModel.DeleteDBClusterMessage) async throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -1046,6 +1055,24 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { return DeleteDBClusterResultForDeleteDBCluster.__default } + /** + Invokes the DeleteDBClusterAutomatedBackup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackup( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) async throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + if let deleteDBClusterAutomatedBackupOverride = deleteDBClusterAutomatedBackupOverride { + return try await deleteDBClusterAutomatedBackupOverride(input) + } + + return DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup.__default + } + /** Invokes the DeleteDBClusterEndpoint operation suspending until the response is available before returning. @@ -1354,6 +1381,24 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { return CertificateMessageForDescribeCertificates.__default } + /** + Invokes the DescribeDBClusterAutomatedBackups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackups( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) async throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + if let describeDBClusterAutomatedBackupsOverride = describeDBClusterAutomatedBackupsOverride { + return try await describeDBClusterAutomatedBackupsOverride(input) + } + + return DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups.__default + } + /** Invokes the DescribeDBClusterBacktracks operation suspending until the response is available before returning. @@ -2658,7 +2703,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ public func restoreDBClusterFromSnapshot( input: RDSModel.RestoreDBClusterFromSnapshotMessage) async throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -2676,7 +2721,7 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ public func restoreDBClusterToPointInTime( input: RDSModel.RestoreDBClusterToPointInTimeMessage) async throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -2939,6 +2984,24 @@ public struct MockRDSClientV2: RDSClientProtocolV2 { return SwitchoverBlueGreenDeploymentResponseForSwitchoverBlueGreenDeployment.__default } + /** + Invokes the SwitchoverGlobalCluster operation suspending until the response is available before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalCluster( + input: RDSModel.SwitchoverGlobalClusterMessage) async throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + if let switchoverGlobalClusterOverride = switchoverGlobalClusterOverride { + return try await switchoverGlobalClusterOverride(input) + } + + return SwitchoverGlobalClusterResultForSwitchoverGlobalCluster.__default + } + /** Invokes the SwitchoverReadReplica operation suspending until the response is available before returning. diff --git a/Sources/RDSClient/RDSClientProtocol+async.swift b/Sources/RDSClient/RDSClientProtocol+async.swift index f6253d3..563c524 100644 --- a/Sources/RDSClient/RDSClientProtocol+async.swift +++ b/Sources/RDSClient/RDSClientProtocol+async.swift @@ -889,7 +889,7 @@ public extension RDSClientProtocol { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ func deleteDBCluster(input: RDSModel.DeleteDBClusterMessage) async throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -909,6 +909,33 @@ public extension RDSClientProtocol { } } + /** + Invokes the DeleteDBClusterAutomatedBackup operation and asynchronously returning the response. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + func deleteDBClusterAutomatedBackup(input: RDSModel.DeleteDBClusterAutomatedBackupMessage) async throws + -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + return try await withCheckedThrowingContinuation { cont in + do { + try deleteDBClusterAutomatedBackupAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the DeleteDBClusterEndpoint operation and asynchronously returning the response. @@ -1374,6 +1401,33 @@ public extension RDSClientProtocol { } } + /** + Invokes the DescribeDBClusterAutomatedBackups operation and asynchronously returning the response. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + func describeDBClusterAutomatedBackups(input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) async throws + -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + return try await withCheckedThrowingContinuation { cont in + do { + try describeDBClusterAutomatedBackupsAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the DescribeDBClusterBacktracks operation and asynchronously returning the response. @@ -3332,7 +3386,7 @@ public extension RDSClientProtocol { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ func restoreDBClusterFromSnapshot(input: RDSModel.RestoreDBClusterFromSnapshotMessage) async throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -3359,7 +3413,7 @@ public extension RDSClientProtocol { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ func restoreDBClusterToPointInTime(input: RDSModel.RestoreDBClusterToPointInTimeMessage) async throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -3757,6 +3811,33 @@ public extension RDSClientProtocol { } } + /** + Invokes the SwitchoverGlobalCluster operation and asynchronously returning the response. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + func switchoverGlobalCluster(input: RDSModel.SwitchoverGlobalClusterMessage) async throws + -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + return try await withCheckedThrowingContinuation { cont in + do { + try switchoverGlobalClusterAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + /** Invokes the SwitchoverReadReplica operation and asynchronously returning the response. diff --git a/Sources/RDSClient/RDSClientProtocol.swift b/Sources/RDSClient/RDSClientProtocol.swift index 2cf006c..f32df67 100644 --- a/Sources/RDSClient/RDSClientProtocol.swift +++ b/Sources/RDSClient/RDSClientProtocol.swift @@ -194,6 +194,11 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { typealias DeleteDBClusterAsyncType = ( _ input: RDSModel.DeleteDBClusterMessage, _ completion: @escaping (Result) -> ()) throws -> () + typealias DeleteDBClusterAutomatedBackupSyncType = ( + _ input: RDSModel.DeleteDBClusterAutomatedBackupMessage) throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup + typealias DeleteDBClusterAutomatedBackupAsyncType = ( + _ input: RDSModel.DeleteDBClusterAutomatedBackupMessage, + _ completion: @escaping (Result) -> ()) throws -> () typealias DeleteDBClusterEndpointSyncType = ( _ input: RDSModel.DeleteDBClusterEndpointMessage) throws -> RDSModel.DBClusterEndpointForDeleteDBClusterEndpoint typealias DeleteDBClusterEndpointAsyncType = ( @@ -284,6 +289,11 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { typealias DescribeCertificatesAsyncType = ( _ input: RDSModel.DescribeCertificatesMessage, _ completion: @escaping (Result) -> ()) throws -> () + typealias DescribeDBClusterAutomatedBackupsSyncType = ( + _ input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + typealias DescribeDBClusterAutomatedBackupsAsyncType = ( + _ input: RDSModel.DescribeDBClusterAutomatedBackupsMessage, + _ completion: @escaping (Result) -> ()) throws -> () typealias DescribeDBClusterBacktracksSyncType = ( _ input: RDSModel.DescribeDBClusterBacktracksMessage) throws -> RDSModel.DBClusterBacktrackMessageForDescribeDBClusterBacktracks typealias DescribeDBClusterBacktracksAsyncType = ( @@ -729,6 +739,11 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { typealias SwitchoverBlueGreenDeploymentAsyncType = ( _ input: RDSModel.SwitchoverBlueGreenDeploymentRequest, _ completion: @escaping (Result) -> ()) throws -> () + typealias SwitchoverGlobalClusterSyncType = ( + _ input: RDSModel.SwitchoverGlobalClusterMessage) throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + typealias SwitchoverGlobalClusterAsyncType = ( + _ input: RDSModel.SwitchoverGlobalClusterMessage, + _ completion: @escaping (Result) -> ()) throws -> () typealias SwitchoverReadReplicaSyncType = ( _ input: RDSModel.SwitchoverReadReplicaMessage) throws -> RDSModel.SwitchoverReadReplicaResultForSwitchoverReadReplica typealias SwitchoverReadReplicaAsyncType = ( @@ -1566,7 +1581,7 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { - completion: The DeleteDBClusterResultForDeleteDBCluster object or an error will be passed to this callback when the operation is complete. The DeleteDBClusterResultForDeleteDBCluster object will be validated before being returned to caller. - The possible errors are: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + The possible errors are: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ func deleteDBClusterAsync( input: RDSModel.DeleteDBClusterMessage, @@ -1579,11 +1594,37 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ func deleteDBClusterSync( input: RDSModel.DeleteDBClusterMessage) throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster + /** + Invokes the DeleteDBClusterAutomatedBackup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - completion: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object or an error will be passed to this + callback when the operation is complete. The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup + object will be validated before being returned to caller. + The possible errors are: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + func deleteDBClusterAutomatedBackupAsync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the DeleteDBClusterAutomatedBackup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + func deleteDBClusterAutomatedBackupSync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup + /** Invokes the DeleteDBClusterEndpoint operation returning immediately and passing the response to a callback. @@ -2035,6 +2076,32 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { func describeCertificatesSync( input: RDSModel.DescribeCertificatesMessage) throws -> RDSModel.CertificateMessageForDescribeCertificates + /** + Invokes the DescribeDBClusterAutomatedBackups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - completion: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object or an error will be passed to this + callback when the operation is complete. The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + object will be validated before being returned to caller. + The possible errors are: dBClusterAutomatedBackupNotFound. + */ + func describeDBClusterAutomatedBackupsAsync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the DescribeDBClusterAutomatedBackups operation waiting for the response before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + func describeDBClusterAutomatedBackupsSync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + /** Invokes the DescribeDBClusterBacktracks operation returning immediately and passing the response to a callback. @@ -3916,7 +3983,7 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { - completion: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object or an error will be passed to this callback when the operation is complete. The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object will be validated before being returned to caller. - The possible errors are: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + The possible errors are: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ func restoreDBClusterFromSnapshotAsync( input: RDSModel.RestoreDBClusterFromSnapshotMessage, @@ -3929,7 +3996,7 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ func restoreDBClusterFromSnapshotSync( input: RDSModel.RestoreDBClusterFromSnapshotMessage) throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot @@ -3942,7 +4009,7 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { - completion: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object or an error will be passed to this callback when the operation is complete. The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object will be validated before being returned to caller. - The possible errors are: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + The possible errors are: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ func restoreDBClusterToPointInTimeAsync( input: RDSModel.RestoreDBClusterToPointInTimeMessage, @@ -3955,7 +4022,7 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ func restoreDBClusterToPointInTimeSync( input: RDSModel.RestoreDBClusterToPointInTimeMessage) throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime @@ -4324,6 +4391,32 @@ public protocol RDSClientProtocol: RDSClientProtocolV2 { func switchoverBlueGreenDeploymentSync( input: RDSModel.SwitchoverBlueGreenDeploymentRequest) throws -> RDSModel.SwitchoverBlueGreenDeploymentResponseForSwitchoverBlueGreenDeployment + /** + Invokes the SwitchoverGlobalCluster operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - completion: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object or an error will be passed to this + callback when the operation is complete. The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + object will be validated before being returned to caller. + The possible errors are: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + func switchoverGlobalClusterAsync( + input: RDSModel.SwitchoverGlobalClusterMessage, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the SwitchoverGlobalCluster operation waiting for the response before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + func switchoverGlobalClusterSync( + input: RDSModel.SwitchoverGlobalClusterMessage) throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + /** Invokes the SwitchoverReadReplica operation returning immediately and passing the response to a callback. diff --git a/Sources/RDSClient/RDSClientProtocolV2.swift b/Sources/RDSClient/RDSClientProtocolV2.swift index ccf8883..2e19d36 100644 --- a/Sources/RDSClient/RDSClientProtocolV2.swift +++ b/Sources/RDSClient/RDSClientProtocolV2.swift @@ -96,6 +96,8 @@ public protocol RDSClientProtocolV2 { _ input: RDSModel.DeleteCustomDBEngineVersionMessage) async throws -> RDSModel.DBEngineVersionForDeleteCustomDBEngineVersion typealias DeleteDBClusterFunctionType = ( _ input: RDSModel.DeleteDBClusterMessage) async throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster + typealias DeleteDBClusterAutomatedBackupFunctionType = ( + _ input: RDSModel.DeleteDBClusterAutomatedBackupMessage) async throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup typealias DeleteDBClusterEndpointFunctionType = ( _ input: RDSModel.DeleteDBClusterEndpointMessage) async throws -> RDSModel.DBClusterEndpointForDeleteDBClusterEndpoint typealias DeleteDBClusterParameterGroupFunctionType = ( @@ -132,6 +134,8 @@ public protocol RDSClientProtocolV2 { _ input: RDSModel.DescribeBlueGreenDeploymentsRequest) async throws -> RDSModel.DescribeBlueGreenDeploymentsResponseForDescribeBlueGreenDeployments typealias DescribeCertificatesFunctionType = ( _ input: RDSModel.DescribeCertificatesMessage) async throws -> RDSModel.CertificateMessageForDescribeCertificates + typealias DescribeDBClusterAutomatedBackupsFunctionType = ( + _ input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) async throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups typealias DescribeDBClusterBacktracksFunctionType = ( _ input: RDSModel.DescribeDBClusterBacktracksMessage) async throws -> RDSModel.DBClusterBacktrackMessageForDescribeDBClusterBacktracks typealias DescribeDBClusterEndpointsFunctionType = ( @@ -310,6 +314,8 @@ public protocol RDSClientProtocolV2 { _ input: RDSModel.StopDBInstanceAutomatedBackupsReplicationMessage) async throws -> RDSModel.StopDBInstanceAutomatedBackupsReplicationResultForStopDBInstanceAutomatedBackupsReplication typealias SwitchoverBlueGreenDeploymentFunctionType = ( _ input: RDSModel.SwitchoverBlueGreenDeploymentRequest) async throws -> RDSModel.SwitchoverBlueGreenDeploymentResponseForSwitchoverBlueGreenDeployment + typealias SwitchoverGlobalClusterFunctionType = ( + _ input: RDSModel.SwitchoverGlobalClusterMessage) async throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster typealias SwitchoverReadReplicaFunctionType = ( _ input: RDSModel.SwitchoverReadReplicaMessage) async throws -> RDSModel.SwitchoverReadReplicaResultForSwitchoverReadReplica @@ -698,11 +704,23 @@ public protocol RDSClientProtocolV2 { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ func deleteDBCluster( input: RDSModel.DeleteDBClusterMessage) async throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster + /** + Invokes the DeleteDBClusterAutomatedBackup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + func deleteDBClusterAutomatedBackup( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) async throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup + /** Invokes the DeleteDBClusterEndpoint operation suspending until the response is available before returning. @@ -908,6 +926,18 @@ public protocol RDSClientProtocolV2 { func describeCertificates( input: RDSModel.DescribeCertificatesMessage) async throws -> RDSModel.CertificateMessageForDescribeCertificates + /** + Invokes the DescribeDBClusterAutomatedBackups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + func describeDBClusterAutomatedBackups( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) async throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + /** Invokes the DescribeDBClusterBacktracks operation suspending until the response is available before returning. @@ -1777,7 +1807,7 @@ public protocol RDSClientProtocolV2 { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ func restoreDBClusterFromSnapshot( input: RDSModel.RestoreDBClusterFromSnapshotMessage) async throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot @@ -1789,7 +1819,7 @@ public protocol RDSClientProtocolV2 { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ func restoreDBClusterToPointInTime( input: RDSModel.RestoreDBClusterToPointInTimeMessage) async throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime @@ -1962,6 +1992,18 @@ public protocol RDSClientProtocolV2 { func switchoverBlueGreenDeployment( input: RDSModel.SwitchoverBlueGreenDeploymentRequest) async throws -> RDSModel.SwitchoverBlueGreenDeploymentResponseForSwitchoverBlueGreenDeployment + /** + Invokes the SwitchoverGlobalCluster operation suspending until the response is available before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + func switchoverGlobalCluster( + input: RDSModel.SwitchoverGlobalClusterMessage) async throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + /** Invokes the SwitchoverReadReplica operation suspending until the response is available before returning. diff --git a/Sources/RDSClient/RDSInvocationsReporting.swift b/Sources/RDSClient/RDSInvocationsReporting.swift index c5a6679..022ff54 100644 --- a/Sources/RDSClient/RDSInvocationsReporting.swift +++ b/Sources/RDSClient/RDSInvocationsReporting.swift @@ -62,6 +62,7 @@ public struct RDSInvocationsReporting public let deleteCustomDBEngineVersion: SmokeAWSHTTPClientInvocationReporting public let deleteDBCluster: SmokeAWSHTTPClientInvocationReporting + public let deleteDBClusterAutomatedBackup: SmokeAWSHTTPClientInvocationReporting public let deleteDBClusterEndpoint: SmokeAWSHTTPClientInvocationReporting public let deleteDBClusterParameterGroup: SmokeAWSHTTPClientInvocationReporting public let deleteDBClusterSnapshot: SmokeAWSHTTPClientInvocationReporting @@ -80,6 +81,7 @@ public struct RDSInvocationsReporting public let describeBlueGreenDeployments: SmokeAWSHTTPClientInvocationReporting public let describeCertificates: SmokeAWSHTTPClientInvocationReporting + public let describeDBClusterAutomatedBackups: SmokeAWSHTTPClientInvocationReporting public let describeDBClusterBacktracks: SmokeAWSHTTPClientInvocationReporting public let describeDBClusterEndpoints: SmokeAWSHTTPClientInvocationReporting public let describeDBClusterParameterGroups: SmokeAWSHTTPClientInvocationReporting @@ -169,6 +171,7 @@ public struct RDSInvocationsReporting public let stopDBInstanceAutomatedBackupsReplication: SmokeAWSHTTPClientInvocationReporting public let switchoverBlueGreenDeployment: SmokeAWSHTTPClientInvocationReporting + public let switchoverGlobalCluster: SmokeAWSHTTPClientInvocationReporting public let switchoverReadReplica: SmokeAWSHTTPClientInvocationReporting public init(reporting: InvocationReportingType, operationsReporting: RDSOperationsReporting) { @@ -238,6 +241,8 @@ public struct RDSInvocationsReporting BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the DeleteDBClusterEndpoint operation in a HTTP client. */ @@ -583,6 +596,19 @@ extension CertificateMessageForDescribeCertificates: HTTPResponseOutputProtocol } } +/** + Type to handle the output from the DescribeDBClusterAutomatedBackups operation in a HTTP client. + */ +extension DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups: HTTPResponseOutputProtocol { + public typealias BodyType = DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + public typealias HeadersType = DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the DescribeDBClusterBacktracks operation in a HTTP client. */ @@ -1701,6 +1727,19 @@ extension SwitchoverBlueGreenDeploymentResponseForSwitchoverBlueGreenDeployment: } } +/** + Type to handle the output from the SwitchoverGlobalCluster operation in a HTTP client. + */ +extension SwitchoverGlobalClusterResultForSwitchoverGlobalCluster: HTTPResponseOutputProtocol { + public typealias BodyType = SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + public typealias HeadersType = SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + return try bodyDecodableProvider() + } +} + /** Type to handle the output from the SwitchoverReadReplica operation in a HTTP client. */ diff --git a/Sources/RDSClient/RDSOperationsReporting.swift b/Sources/RDSClient/RDSOperationsReporting.swift index 2d8981d..cb9f44b 100644 --- a/Sources/RDSClient/RDSOperationsReporting.swift +++ b/Sources/RDSClient/RDSOperationsReporting.swift @@ -61,6 +61,7 @@ public struct RDSOperationsReporting { public let deleteBlueGreenDeployment: StandardSmokeAWSOperationReporting public let deleteCustomDBEngineVersion: StandardSmokeAWSOperationReporting public let deleteDBCluster: StandardSmokeAWSOperationReporting + public let deleteDBClusterAutomatedBackup: StandardSmokeAWSOperationReporting public let deleteDBClusterEndpoint: StandardSmokeAWSOperationReporting public let deleteDBClusterParameterGroup: StandardSmokeAWSOperationReporting public let deleteDBClusterSnapshot: StandardSmokeAWSOperationReporting @@ -79,6 +80,7 @@ public struct RDSOperationsReporting { public let describeAccountAttributes: StandardSmokeAWSOperationReporting public let describeBlueGreenDeployments: StandardSmokeAWSOperationReporting public let describeCertificates: StandardSmokeAWSOperationReporting + public let describeDBClusterAutomatedBackups: StandardSmokeAWSOperationReporting public let describeDBClusterBacktracks: StandardSmokeAWSOperationReporting public let describeDBClusterEndpoints: StandardSmokeAWSOperationReporting public let describeDBClusterParameterGroups: StandardSmokeAWSOperationReporting @@ -168,6 +170,7 @@ public struct RDSOperationsReporting { public let stopDBInstance: StandardSmokeAWSOperationReporting public let stopDBInstanceAutomatedBackupsReplication: StandardSmokeAWSOperationReporting public let switchoverBlueGreenDeployment: StandardSmokeAWSOperationReporting + public let switchoverGlobalCluster: StandardSmokeAWSOperationReporting public let switchoverReadReplica: StandardSmokeAWSOperationReporting public init(clientName: String, reportingConfiguration: SmokeAWSClientReportingConfiguration) { @@ -237,6 +240,8 @@ public struct RDSOperationsReporting { clientName: clientName, operation: .deleteCustomDBEngineVersion, configuration: reportingConfiguration) self.deleteDBCluster = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .deleteDBCluster, configuration: reportingConfiguration) + self.deleteDBClusterAutomatedBackup = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .deleteDBClusterAutomatedBackup, configuration: reportingConfiguration) self.deleteDBClusterEndpoint = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .deleteDBClusterEndpoint, configuration: reportingConfiguration) self.deleteDBClusterParameterGroup = StandardSmokeAWSOperationReporting( @@ -273,6 +278,8 @@ public struct RDSOperationsReporting { clientName: clientName, operation: .describeBlueGreenDeployments, configuration: reportingConfiguration) self.describeCertificates = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .describeCertificates, configuration: reportingConfiguration) + self.describeDBClusterAutomatedBackups = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .describeDBClusterAutomatedBackups, configuration: reportingConfiguration) self.describeDBClusterBacktracks = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .describeDBClusterBacktracks, configuration: reportingConfiguration) self.describeDBClusterEndpoints = StandardSmokeAWSOperationReporting( @@ -451,6 +458,8 @@ public struct RDSOperationsReporting { clientName: clientName, operation: .stopDBInstanceAutomatedBackupsReplication, configuration: reportingConfiguration) self.switchoverBlueGreenDeployment = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .switchoverBlueGreenDeployment, configuration: reportingConfiguration) + self.switchoverGlobalCluster = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .switchoverGlobalCluster, configuration: reportingConfiguration) self.switchoverReadReplica = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .switchoverReadReplica, configuration: reportingConfiguration) } diff --git a/Sources/RDSClient/ThrowingRDSClient.swift b/Sources/RDSClient/ThrowingRDSClient.swift index a065a3d..422891b 100644 --- a/Sources/RDSClient/ThrowingRDSClient.swift +++ b/Sources/RDSClient/ThrowingRDSClient.swift @@ -96,6 +96,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { let deleteCustomDBEngineVersionSyncOverride: DeleteCustomDBEngineVersionSyncType? let deleteDBClusterAsyncOverride: DeleteDBClusterAsyncType? let deleteDBClusterSyncOverride: DeleteDBClusterSyncType? + let deleteDBClusterAutomatedBackupAsyncOverride: DeleteDBClusterAutomatedBackupAsyncType? + let deleteDBClusterAutomatedBackupSyncOverride: DeleteDBClusterAutomatedBackupSyncType? let deleteDBClusterEndpointAsyncOverride: DeleteDBClusterEndpointAsyncType? let deleteDBClusterEndpointSyncOverride: DeleteDBClusterEndpointSyncType? let deleteDBClusterParameterGroupAsyncOverride: DeleteDBClusterParameterGroupAsyncType? @@ -132,6 +134,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { let describeBlueGreenDeploymentsSyncOverride: DescribeBlueGreenDeploymentsSyncType? let describeCertificatesAsyncOverride: DescribeCertificatesAsyncType? let describeCertificatesSyncOverride: DescribeCertificatesSyncType? + let describeDBClusterAutomatedBackupsAsyncOverride: DescribeDBClusterAutomatedBackupsAsyncType? + let describeDBClusterAutomatedBackupsSyncOverride: DescribeDBClusterAutomatedBackupsSyncType? let describeDBClusterBacktracksAsyncOverride: DescribeDBClusterBacktracksAsyncType? let describeDBClusterBacktracksSyncOverride: DescribeDBClusterBacktracksSyncType? let describeDBClusterEndpointsAsyncOverride: DescribeDBClusterEndpointsAsyncType? @@ -310,6 +314,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { let stopDBInstanceAutomatedBackupsReplicationSyncOverride: StopDBInstanceAutomatedBackupsReplicationSyncType? let switchoverBlueGreenDeploymentAsyncOverride: SwitchoverBlueGreenDeploymentAsyncType? let switchoverBlueGreenDeploymentSyncOverride: SwitchoverBlueGreenDeploymentSyncType? + let switchoverGlobalClusterAsyncOverride: SwitchoverGlobalClusterAsyncType? + let switchoverGlobalClusterSyncOverride: SwitchoverGlobalClusterSyncType? let switchoverReadReplicaAsyncOverride: SwitchoverReadReplicaAsyncType? let switchoverReadReplicaSyncOverride: SwitchoverReadReplicaSyncType? @@ -384,6 +390,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { deleteCustomDBEngineVersionSync: DeleteCustomDBEngineVersionSyncType? = nil, deleteDBClusterAsync: DeleteDBClusterAsyncType? = nil, deleteDBClusterSync: DeleteDBClusterSyncType? = nil, + deleteDBClusterAutomatedBackupAsync: DeleteDBClusterAutomatedBackupAsyncType? = nil, + deleteDBClusterAutomatedBackupSync: DeleteDBClusterAutomatedBackupSyncType? = nil, deleteDBClusterEndpointAsync: DeleteDBClusterEndpointAsyncType? = nil, deleteDBClusterEndpointSync: DeleteDBClusterEndpointSyncType? = nil, deleteDBClusterParameterGroupAsync: DeleteDBClusterParameterGroupAsyncType? = nil, @@ -420,6 +428,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { describeBlueGreenDeploymentsSync: DescribeBlueGreenDeploymentsSyncType? = nil, describeCertificatesAsync: DescribeCertificatesAsyncType? = nil, describeCertificatesSync: DescribeCertificatesSyncType? = nil, + describeDBClusterAutomatedBackupsAsync: DescribeDBClusterAutomatedBackupsAsyncType? = nil, + describeDBClusterAutomatedBackupsSync: DescribeDBClusterAutomatedBackupsSyncType? = nil, describeDBClusterBacktracksAsync: DescribeDBClusterBacktracksAsyncType? = nil, describeDBClusterBacktracksSync: DescribeDBClusterBacktracksSyncType? = nil, describeDBClusterEndpointsAsync: DescribeDBClusterEndpointsAsyncType? = nil, @@ -598,6 +608,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { stopDBInstanceAutomatedBackupsReplicationSync: StopDBInstanceAutomatedBackupsReplicationSyncType? = nil, switchoverBlueGreenDeploymentAsync: SwitchoverBlueGreenDeploymentAsyncType? = nil, switchoverBlueGreenDeploymentSync: SwitchoverBlueGreenDeploymentSyncType? = nil, + switchoverGlobalClusterAsync: SwitchoverGlobalClusterAsyncType? = nil, + switchoverGlobalClusterSync: SwitchoverGlobalClusterSyncType? = nil, switchoverReadReplicaAsync: SwitchoverReadReplicaAsyncType? = nil, switchoverReadReplicaSync: SwitchoverReadReplicaSyncType? = nil) { self.error = error @@ -667,6 +679,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { self.deleteCustomDBEngineVersionSyncOverride = deleteCustomDBEngineVersionSync self.deleteDBClusterAsyncOverride = deleteDBClusterAsync self.deleteDBClusterSyncOverride = deleteDBClusterSync + self.deleteDBClusterAutomatedBackupAsyncOverride = deleteDBClusterAutomatedBackupAsync + self.deleteDBClusterAutomatedBackupSyncOverride = deleteDBClusterAutomatedBackupSync self.deleteDBClusterEndpointAsyncOverride = deleteDBClusterEndpointAsync self.deleteDBClusterEndpointSyncOverride = deleteDBClusterEndpointSync self.deleteDBClusterParameterGroupAsyncOverride = deleteDBClusterParameterGroupAsync @@ -703,6 +717,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { self.describeBlueGreenDeploymentsSyncOverride = describeBlueGreenDeploymentsSync self.describeCertificatesAsyncOverride = describeCertificatesAsync self.describeCertificatesSyncOverride = describeCertificatesSync + self.describeDBClusterAutomatedBackupsAsyncOverride = describeDBClusterAutomatedBackupsAsync + self.describeDBClusterAutomatedBackupsSyncOverride = describeDBClusterAutomatedBackupsSync self.describeDBClusterBacktracksAsyncOverride = describeDBClusterBacktracksAsync self.describeDBClusterBacktracksSyncOverride = describeDBClusterBacktracksSync self.describeDBClusterEndpointsAsyncOverride = describeDBClusterEndpointsAsync @@ -881,6 +897,8 @@ public struct ThrowingRDSClient: RDSClientProtocol { self.stopDBInstanceAutomatedBackupsReplicationSyncOverride = stopDBInstanceAutomatedBackupsReplicationSync self.switchoverBlueGreenDeploymentAsyncOverride = switchoverBlueGreenDeploymentAsync self.switchoverBlueGreenDeploymentSyncOverride = switchoverBlueGreenDeploymentSync + self.switchoverGlobalClusterAsyncOverride = switchoverGlobalClusterAsync + self.switchoverGlobalClusterSyncOverride = switchoverGlobalClusterSync self.switchoverReadReplicaAsyncOverride = switchoverReadReplicaAsync self.switchoverReadReplicaSyncOverride = switchoverReadReplicaSync } @@ -2100,7 +2118,7 @@ public struct ThrowingRDSClient: RDSClientProtocol { - completion: The DeleteDBClusterResultForDeleteDBCluster object or an error will be passed to this callback when the operation is complete. The DeleteDBClusterResultForDeleteDBCluster object will be validated before being returned to caller. - The possible errors are: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + The possible errors are: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ public func deleteDBClusterAsync( input: RDSModel.DeleteDBClusterMessage, @@ -2119,7 +2137,7 @@ public struct ThrowingRDSClient: RDSClientProtocol { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ public func deleteDBClusterSync( input: RDSModel.DeleteDBClusterMessage) throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -2130,6 +2148,44 @@ public struct ThrowingRDSClient: RDSClientProtocol { throw error } + /** + Invokes the DeleteDBClusterAutomatedBackup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - completion: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object or an error will be passed to this + callback when the operation is complete. The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup + object will be validated before being returned to caller. + The possible errors are: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackupAsync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage, + completion: @escaping (Result) -> ()) throws { + if let deleteDBClusterAutomatedBackupAsyncOverride = deleteDBClusterAutomatedBackupAsyncOverride { + return try deleteDBClusterAutomatedBackupAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the DeleteDBClusterAutomatedBackup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackupSync( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + if let deleteDBClusterAutomatedBackupSyncOverride = deleteDBClusterAutomatedBackupSyncOverride { + return try deleteDBClusterAutomatedBackupSyncOverride(input) + } + + throw error + } + /** Invokes the DeleteDBClusterEndpoint operation returning immediately and passing the response to a callback. @@ -2797,6 +2853,44 @@ public struct ThrowingRDSClient: RDSClientProtocol { throw error } + /** + Invokes the DescribeDBClusterAutomatedBackups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - completion: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object or an error will be passed to this + callback when the operation is complete. The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups + object will be validated before being returned to caller. + The possible errors are: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackupsAsync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage, + completion: @escaping (Result) -> ()) throws { + if let describeDBClusterAutomatedBackupsAsyncOverride = describeDBClusterAutomatedBackupsAsyncOverride { + return try describeDBClusterAutomatedBackupsAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the DescribeDBClusterAutomatedBackups operation waiting for the response before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackupsSync( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + if let describeDBClusterAutomatedBackupsSyncOverride = describeDBClusterAutomatedBackupsSyncOverride { + return try describeDBClusterAutomatedBackupsSyncOverride(input) + } + + throw error + } + /** Invokes the DescribeDBClusterBacktracks operation returning immediately and passing the response to a callback. @@ -5554,7 +5648,7 @@ public struct ThrowingRDSClient: RDSClientProtocol { - completion: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object or an error will be passed to this callback when the operation is complete. The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object will be validated before being returned to caller. - The possible errors are: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + The possible errors are: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ public func restoreDBClusterFromSnapshotAsync( input: RDSModel.RestoreDBClusterFromSnapshotMessage, @@ -5573,7 +5667,7 @@ public struct ThrowingRDSClient: RDSClientProtocol { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ public func restoreDBClusterFromSnapshotSync( input: RDSModel.RestoreDBClusterFromSnapshotMessage) throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -5592,7 +5686,7 @@ public struct ThrowingRDSClient: RDSClientProtocol { - completion: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object or an error will be passed to this callback when the operation is complete. The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object will be validated before being returned to caller. - The possible errors are: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + The possible errors are: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ public func restoreDBClusterToPointInTimeAsync( input: RDSModel.RestoreDBClusterToPointInTimeMessage, @@ -5611,7 +5705,7 @@ public struct ThrowingRDSClient: RDSClientProtocol { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ public func restoreDBClusterToPointInTimeSync( input: RDSModel.RestoreDBClusterToPointInTimeMessage) throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -6154,6 +6248,44 @@ public struct ThrowingRDSClient: RDSClientProtocol { throw error } + /** + Invokes the SwitchoverGlobalCluster operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - completion: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object or an error will be passed to this + callback when the operation is complete. The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster + object will be validated before being returned to caller. + The possible errors are: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalClusterAsync( + input: RDSModel.SwitchoverGlobalClusterMessage, + completion: @escaping (Result) -> ()) throws { + if let switchoverGlobalClusterAsyncOverride = switchoverGlobalClusterAsyncOverride { + return try switchoverGlobalClusterAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the SwitchoverGlobalCluster operation waiting for the response before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalClusterSync( + input: RDSModel.SwitchoverGlobalClusterMessage) throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + if let switchoverGlobalClusterSyncOverride = switchoverGlobalClusterSyncOverride { + return try switchoverGlobalClusterSyncOverride(input) + } + + throw error + } + /** Invokes the SwitchoverReadReplica operation returning immediately and passing the response to a callback. diff --git a/Sources/RDSClient/ThrowingRDSClientV2.swift b/Sources/RDSClient/ThrowingRDSClientV2.swift index f8626c9..01fb222 100644 --- a/Sources/RDSClient/ThrowingRDSClientV2.swift +++ b/Sources/RDSClient/ThrowingRDSClientV2.swift @@ -64,6 +64,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { let deleteBlueGreenDeploymentOverride: DeleteBlueGreenDeploymentFunctionType? let deleteCustomDBEngineVersionOverride: DeleteCustomDBEngineVersionFunctionType? let deleteDBClusterOverride: DeleteDBClusterFunctionType? + let deleteDBClusterAutomatedBackupOverride: DeleteDBClusterAutomatedBackupFunctionType? let deleteDBClusterEndpointOverride: DeleteDBClusterEndpointFunctionType? let deleteDBClusterParameterGroupOverride: DeleteDBClusterParameterGroupFunctionType? let deleteDBClusterSnapshotOverride: DeleteDBClusterSnapshotFunctionType? @@ -82,6 +83,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { let describeAccountAttributesOverride: DescribeAccountAttributesFunctionType? let describeBlueGreenDeploymentsOverride: DescribeBlueGreenDeploymentsFunctionType? let describeCertificatesOverride: DescribeCertificatesFunctionType? + let describeDBClusterAutomatedBackupsOverride: DescribeDBClusterAutomatedBackupsFunctionType? let describeDBClusterBacktracksOverride: DescribeDBClusterBacktracksFunctionType? let describeDBClusterEndpointsOverride: DescribeDBClusterEndpointsFunctionType? let describeDBClusterParameterGroupsOverride: DescribeDBClusterParameterGroupsFunctionType? @@ -171,6 +173,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { let stopDBInstanceOverride: StopDBInstanceFunctionType? let stopDBInstanceAutomatedBackupsReplicationOverride: StopDBInstanceAutomatedBackupsReplicationFunctionType? let switchoverBlueGreenDeploymentOverride: SwitchoverBlueGreenDeploymentFunctionType? + let switchoverGlobalClusterOverride: SwitchoverGlobalClusterFunctionType? let switchoverReadReplicaOverride: SwitchoverReadReplicaFunctionType? /** @@ -211,6 +214,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { deleteBlueGreenDeployment: DeleteBlueGreenDeploymentFunctionType? = nil, deleteCustomDBEngineVersion: DeleteCustomDBEngineVersionFunctionType? = nil, deleteDBCluster: DeleteDBClusterFunctionType? = nil, + deleteDBClusterAutomatedBackup: DeleteDBClusterAutomatedBackupFunctionType? = nil, deleteDBClusterEndpoint: DeleteDBClusterEndpointFunctionType? = nil, deleteDBClusterParameterGroup: DeleteDBClusterParameterGroupFunctionType? = nil, deleteDBClusterSnapshot: DeleteDBClusterSnapshotFunctionType? = nil, @@ -229,6 +233,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { describeAccountAttributes: DescribeAccountAttributesFunctionType? = nil, describeBlueGreenDeployments: DescribeBlueGreenDeploymentsFunctionType? = nil, describeCertificates: DescribeCertificatesFunctionType? = nil, + describeDBClusterAutomatedBackups: DescribeDBClusterAutomatedBackupsFunctionType? = nil, describeDBClusterBacktracks: DescribeDBClusterBacktracksFunctionType? = nil, describeDBClusterEndpoints: DescribeDBClusterEndpointsFunctionType? = nil, describeDBClusterParameterGroups: DescribeDBClusterParameterGroupsFunctionType? = nil, @@ -318,6 +323,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { stopDBInstance: StopDBInstanceFunctionType? = nil, stopDBInstanceAutomatedBackupsReplication: StopDBInstanceAutomatedBackupsReplicationFunctionType? = nil, switchoverBlueGreenDeployment: SwitchoverBlueGreenDeploymentFunctionType? = nil, + switchoverGlobalCluster: SwitchoverGlobalClusterFunctionType? = nil, switchoverReadReplica: SwitchoverReadReplicaFunctionType? = nil) { self.error = error self.addRoleToDBClusterOverride = addRoleToDBCluster @@ -353,6 +359,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { self.deleteBlueGreenDeploymentOverride = deleteBlueGreenDeployment self.deleteCustomDBEngineVersionOverride = deleteCustomDBEngineVersion self.deleteDBClusterOverride = deleteDBCluster + self.deleteDBClusterAutomatedBackupOverride = deleteDBClusterAutomatedBackup self.deleteDBClusterEndpointOverride = deleteDBClusterEndpoint self.deleteDBClusterParameterGroupOverride = deleteDBClusterParameterGroup self.deleteDBClusterSnapshotOverride = deleteDBClusterSnapshot @@ -371,6 +378,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { self.describeAccountAttributesOverride = describeAccountAttributes self.describeBlueGreenDeploymentsOverride = describeBlueGreenDeployments self.describeCertificatesOverride = describeCertificates + self.describeDBClusterAutomatedBackupsOverride = describeDBClusterAutomatedBackups self.describeDBClusterBacktracksOverride = describeDBClusterBacktracks self.describeDBClusterEndpointsOverride = describeDBClusterEndpoints self.describeDBClusterParameterGroupsOverride = describeDBClusterParameterGroups @@ -460,6 +468,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { self.stopDBInstanceOverride = stopDBInstance self.stopDBInstanceAutomatedBackupsReplicationOverride = stopDBInstanceAutomatedBackupsReplication self.switchoverBlueGreenDeploymentOverride = switchoverBlueGreenDeployment + self.switchoverGlobalClusterOverride = switchoverGlobalCluster self.switchoverReadReplicaOverride = switchoverReadReplica } @@ -1040,7 +1049,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { - input: The validated DeleteDBClusterMessage object being passed to this operation. - Returns: The DeleteDBClusterResultForDeleteDBCluster object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. + - Throws: dBClusterAutomatedBackupQuotaExceeded, dBClusterNotFound, dBClusterSnapshotAlreadyExists, invalidDBClusterSnapshotState, invalidDBClusterState, snapshotQuotaExceeded. */ public func deleteDBCluster( input: RDSModel.DeleteDBClusterMessage) async throws -> RDSModel.DeleteDBClusterResultForDeleteDBCluster { @@ -1051,6 +1060,24 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { throw error } + /** + Invokes the DeleteDBClusterAutomatedBackup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteDBClusterAutomatedBackupMessage object being passed to this operation. + - Returns: The DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound, invalidDBClusterAutomatedBackupState. + */ + public func deleteDBClusterAutomatedBackup( + input: RDSModel.DeleteDBClusterAutomatedBackupMessage) async throws -> RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + if let deleteDBClusterAutomatedBackupOverride = deleteDBClusterAutomatedBackupOverride { + return try await deleteDBClusterAutomatedBackupOverride(input) + } + + throw error + } + /** Invokes the DeleteDBClusterEndpoint operation suspending until the response is available before returning. @@ -1364,6 +1391,24 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { throw error } + /** + Invokes the DescribeDBClusterAutomatedBackups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DescribeDBClusterAutomatedBackupsMessage object being passed to this operation. + - Returns: The DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterAutomatedBackupNotFound. + */ + public func describeDBClusterAutomatedBackups( + input: RDSModel.DescribeDBClusterAutomatedBackupsMessage) async throws -> RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + if let describeDBClusterAutomatedBackupsOverride = describeDBClusterAutomatedBackupsOverride { + return try await describeDBClusterAutomatedBackupsOverride(input) + } + + throw error + } + /** Invokes the DescribeDBClusterBacktracks operation suspending until the response is available before returning. @@ -2671,7 +2716,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { - input: The validated RestoreDBClusterFromSnapshotMessage object being passed to this operation. - Returns: The RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSnapshotNotFound, dBSubnetGroupDoesNotCoverEnoughAZs, dBSubnetGroupNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBInstanceState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded, storageQuotaExceeded. */ public func restoreDBClusterFromSnapshot( input: RDSModel.RestoreDBClusterFromSnapshotMessage) async throws -> RDSModel.RestoreDBClusterFromSnapshotResultForRestoreDBClusterFromSnapshot { @@ -2689,7 +2734,7 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { - input: The validated RestoreDBClusterToPointInTimeMessage object being passed to this operation. - Returns: The RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: dBClusterAlreadyExists, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. + - Throws: dBClusterAlreadyExists, dBClusterAutomatedBackupNotFound, dBClusterNotFound, dBClusterParameterGroupNotFound, dBClusterQuotaExceeded, dBClusterSnapshotNotFound, dBSubnetGroupNotFound, domainNotFound, insufficientDBClusterCapacity, insufficientStorageClusterCapacity, invalidDBClusterSnapshotState, invalidDBClusterState, invalidDBSnapshotState, invalidRestore, invalidSubnet, invalidVPCNetworkState, kMSKeyNotAccessible, optionGroupNotFound, storageQuotaExceeded. */ public func restoreDBClusterToPointInTime( input: RDSModel.RestoreDBClusterToPointInTimeMessage) async throws -> RDSModel.RestoreDBClusterToPointInTimeResultForRestoreDBClusterToPointInTime { @@ -2952,6 +2997,24 @@ public struct ThrowingRDSClientV2: RDSClientProtocolV2 { throw error } + /** + Invokes the SwitchoverGlobalCluster operation suspending until the response is available before returning. + + - Parameters: + - input: The validated SwitchoverGlobalClusterMessage object being passed to this operation. + - Returns: The SwitchoverGlobalClusterResultForSwitchoverGlobalCluster object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: dBClusterNotFound, globalClusterNotFound, invalidDBClusterState, invalidGlobalClusterState. + */ + public func switchoverGlobalCluster( + input: RDSModel.SwitchoverGlobalClusterMessage) async throws -> RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + if let switchoverGlobalClusterOverride = switchoverGlobalClusterOverride { + return try await switchoverGlobalClusterOverride(input) + } + + throw error + } + /** Invokes the SwitchoverReadReplica operation suspending until the response is available before returning. diff --git a/Sources/RDSModel/RDSModelDefaultInstances.swift b/Sources/RDSModel/RDSModelDefaultInstances.swift index 0777625..1b0870e 100644 --- a/Sources/RDSModel/RDSModelDefaultInstances.swift +++ b/Sources/RDSModel/RDSModelDefaultInstances.swift @@ -409,6 +409,7 @@ public extension CertificateMessage { static let __default: RDSModel.CertificateMessage = { let defaultInstance = RDSModel.CertificateMessage( certificates: nil, + defaultCertificateForNewLaunches: nil, marker: nil) return defaultInstance @@ -728,8 +729,10 @@ public extension CreateBlueGreenDeploymentRequest { source: "0", tags: nil, targetDBClusterParameterGroupName: nil, + targetDBInstanceClass: nil, targetDBParameterGroupName: nil, - targetEngineVersion: nil) + targetEngineVersion: nil, + upgradeTargetStorageConfig: nil) return defaultInstance }() @@ -784,7 +787,9 @@ public extension CreateCustomDBEngineVersionMessage { imageId: nil, kMSKeyId: nil, manifest: nil, - tags: nil) + sourceCustomDbEngineVersionIdentifier: nil, + tags: nil, + useAwsProvidedLatestImage: nil) return defaultInstance }() @@ -833,6 +838,7 @@ public extension CreateDBClusterMessage { enableGlobalWriteForwarding: nil, enableHttpEndpoint: nil, enableIAMDatabaseAuthentication: nil, + enableLocalWriteForwarding: nil, enablePerformanceInsights: nil, engine: "value", engineMode: nil, @@ -990,6 +996,8 @@ public extension CreateDBInstanceMessage { dBParameterGroupName: nil, dBSecurityGroups: nil, dBSubnetGroupName: nil, + dBSystemId: nil, + dedicatedLogVolume: nil, deletionProtection: nil, domain: nil, domainAuthSecretArn: nil, @@ -1053,6 +1061,7 @@ public extension CreateDBInstanceReadReplicaMessage { dBInstanceIdentifier: "value", dBParameterGroupName: nil, dBSubnetGroupName: nil, + dedicatedLogVolume: nil, deletionProtection: nil, domain: nil, domainAuthSecretArn: nil, @@ -1084,6 +1093,7 @@ public extension CreateDBInstanceReadReplicaMessage { storageThroughput: nil, storageType: nil, tags: nil, + upgradeStorageConfig: nil, useDefaultProcessorFeatures: nil, vpcSecurityGroupIds: nil) @@ -1575,6 +1585,7 @@ public extension DBCluster { autoMinorVersionUpgrade: nil, automaticRestartTime: nil, availabilityZones: nil, + awsBackupRecoveryPointArn: nil, backtrackConsumedChangeRecords: nil, backtrackWindow: nil, backupRetentionPeriod: nil, @@ -1613,6 +1624,7 @@ public extension DBCluster { iops: nil, kmsKeyId: nil, latestRestorableTime: nil, + localWriteForwardingStatus: nil, masterUserSecret: nil, masterUsername: nil, monitoringInterval: nil, @@ -1654,6 +1666,88 @@ public extension DBClusterAlreadyExistsFault { }() } +public extension DBClusterAutomatedBackup { + /** + Default instance of the DBClusterAutomatedBackup structure. + */ + static let __default: RDSModel.DBClusterAutomatedBackup = { + let defaultInstance = RDSModel.DBClusterAutomatedBackup( + allocatedStorage: nil, + availabilityZones: nil, + awsBackupRecoveryPointArn: nil, + backupRetentionPeriod: nil, + clusterCreateTime: nil, + dBClusterArn: nil, + dBClusterAutomatedBackupsArn: nil, + dBClusterIdentifier: nil, + dbClusterResourceId: nil, + engine: nil, + engineMode: nil, + engineVersion: nil, + iAMDatabaseAuthenticationEnabled: nil, + iops: nil, + kmsKeyId: nil, + licenseModel: nil, + masterUsername: nil, + port: nil, + region: nil, + restoreWindow: nil, + status: nil, + storageEncrypted: nil, + storageType: nil, + vpcId: nil) + + return defaultInstance + }() +} + +public extension DBClusterAutomatedBackupMessage { + /** + Default instance of the DBClusterAutomatedBackupMessage structure. + */ + static let __default: RDSModel.DBClusterAutomatedBackupMessage = { + let defaultInstance = RDSModel.DBClusterAutomatedBackupMessage( + dBClusterAutomatedBackups: nil, + marker: nil) + + return defaultInstance + }() +} + +public extension DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups { + /** + Default instance of the DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups structure. + */ + static let __default: RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups = { + let defaultInstance = RDSModel.DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups( + describeDBClusterAutomatedBackupsResult: DBClusterAutomatedBackupMessage.__default) + + return defaultInstance + }() +} + +public extension DBClusterAutomatedBackupNotFoundFault { + /** + Default instance of the DBClusterAutomatedBackupNotFoundFault structure. + */ + static let __default: RDSModel.DBClusterAutomatedBackupNotFoundFault = { + let defaultInstance = RDSModel.DBClusterAutomatedBackupNotFoundFault() + + return defaultInstance + }() +} + +public extension DBClusterAutomatedBackupQuotaExceededFault { + /** + Default instance of the DBClusterAutomatedBackupQuotaExceededFault structure. + */ + static let __default: RDSModel.DBClusterAutomatedBackupQuotaExceededFault = { + let defaultInstance = RDSModel.DBClusterAutomatedBackupQuotaExceededFault() + + return defaultInstance + }() +} + public extension DBClusterBacktrack { /** Default instance of the DBClusterBacktrack structure. @@ -2109,6 +2203,7 @@ public extension DBClusterSnapshot { dBClusterSnapshotArn: nil, dBClusterSnapshotIdentifier: nil, dBSystemId: nil, + dbClusterResourceId: nil, engine: nil, engineMode: nil, engineVersion: nil, @@ -2236,6 +2331,7 @@ public extension DBEngineVersion { supportsBabelfish: nil, supportsCertificateRotationWithoutRestart: nil, supportsGlobalDatabases: nil, + supportsLocalWriteForwarding: nil, supportsLogExportsToCloudwatchLogs: nil, supportsParallelQuery: nil, supportsReadReplica: nil, @@ -2347,6 +2443,7 @@ public extension DBInstance { dBSystemId: nil, dbInstancePort: nil, dbiResourceId: nil, + dedicatedLogVolume: nil, deletionProtection: nil, domainMemberships: nil, enabledCloudwatchLogsExports: nil, @@ -2357,6 +2454,7 @@ public extension DBInstance { iAMDatabaseAuthenticationEnabled: nil, instanceCreateTime: nil, iops: nil, + isStorageConfigUpgradeAvailable: nil, kmsKeyId: nil, latestRestorableTime: nil, licenseModel: nil, @@ -2371,6 +2469,7 @@ public extension DBInstance { networkType: nil, optionGroupMemberships: nil, pendingModifiedValues: nil, + percentProgress: nil, performanceInsightsEnabled: nil, performanceInsightsKMSKeyId: nil, performanceInsightsRetentionPeriod: nil, @@ -2418,6 +2517,7 @@ public extension DBInstanceAutomatedBackup { let defaultInstance = RDSModel.DBInstanceAutomatedBackup( allocatedStorage: nil, availabilityZone: nil, + awsBackupRecoveryPointArn: nil, backupRetentionPeriod: nil, backupTarget: nil, dBInstanceArn: nil, @@ -2425,6 +2525,7 @@ public extension DBInstanceAutomatedBackup { dBInstanceAutomatedBackupsReplications: nil, dBInstanceIdentifier: nil, dbiResourceId: nil, + dedicatedLogVolume: nil, encrypted: nil, engine: nil, engineVersion: nil, @@ -3060,7 +3161,9 @@ public extension DBSnapshot { dBInstanceIdentifier: nil, dBSnapshotArn: nil, dBSnapshotIdentifier: nil, + dBSystemId: nil, dbiResourceId: nil, + dedicatedLogVolume: nil, encrypted: nil, engine: nil, engineVersion: nil, @@ -3336,6 +3439,42 @@ public extension DeleteCustomDBEngineVersionMessage { }() } +public extension DeleteDBClusterAutomatedBackupMessage { + /** + Default instance of the DeleteDBClusterAutomatedBackupMessage structure. + */ + static let __default: RDSModel.DeleteDBClusterAutomatedBackupMessage = { + let defaultInstance = RDSModel.DeleteDBClusterAutomatedBackupMessage( + dbClusterResourceId: "value") + + return defaultInstance + }() +} + +public extension DeleteDBClusterAutomatedBackupResult { + /** + Default instance of the DeleteDBClusterAutomatedBackupResult structure. + */ + static let __default: RDSModel.DeleteDBClusterAutomatedBackupResult = { + let defaultInstance = RDSModel.DeleteDBClusterAutomatedBackupResult( + dBClusterAutomatedBackup: nil) + + return defaultInstance + }() +} + +public extension DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup { + /** + Default instance of the DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup structure. + */ + static let __default: RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup = { + let defaultInstance = RDSModel.DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup( + deleteDBClusterAutomatedBackupResult: DeleteDBClusterAutomatedBackupResult.__default) + + return defaultInstance + }() +} + public extension DeleteDBClusterEndpointMessage { /** Default instance of the DeleteDBClusterEndpointMessage structure. @@ -3355,6 +3494,7 @@ public extension DeleteDBClusterMessage { static let __default: RDSModel.DeleteDBClusterMessage = { let defaultInstance = RDSModel.DeleteDBClusterMessage( dBClusterIdentifier: "value", + deleteAutomatedBackups: nil, finalDBSnapshotIdentifier: nil, skipFinalSnapshot: nil) @@ -3842,6 +3982,22 @@ public extension DescribeCertificatesMessage { }() } +public extension DescribeDBClusterAutomatedBackupsMessage { + /** + Default instance of the DescribeDBClusterAutomatedBackupsMessage structure. + */ + static let __default: RDSModel.DescribeDBClusterAutomatedBackupsMessage = { + let defaultInstance = RDSModel.DescribeDBClusterAutomatedBackupsMessage( + dBClusterIdentifier: nil, + dbClusterResourceId: nil, + filters: nil, + marker: nil, + maxRecords: nil) + + return defaultInstance + }() +} + public extension DescribeDBClusterBacktracksMessage { /** Default instance of the DescribeDBClusterBacktracksMessage structure. @@ -3949,6 +4105,7 @@ public extension DescribeDBClusterSnapshotsMessage { let defaultInstance = RDSModel.DescribeDBClusterSnapshotsMessage( dBClusterIdentifier: nil, dBClusterSnapshotIdentifier: nil, + dbClusterResourceId: nil, filters: nil, includePublic: nil, includeShared: nil, @@ -5099,7 +5256,9 @@ public extension FailoverGlobalClusterMessage { */ static let __default: RDSModel.FailoverGlobalClusterMessage = { let defaultInstance = RDSModel.FailoverGlobalClusterMessage( + allowDataLoss: nil, globalClusterIdentifier: "0", + switchover: nil, targetDbClusterIdentifier: "0") return defaultInstance @@ -5137,6 +5296,7 @@ public extension FailoverState { static let __default: RDSModel.FailoverState = { let defaultInstance = RDSModel.FailoverState( fromDbClusterArn: nil, + isDataLossAllowed: nil, status: nil, toDbClusterArn: nil) @@ -5199,7 +5359,8 @@ public extension GlobalClusterMember { dBClusterArn: nil, globalWriteForwardingStatus: nil, isWriter: nil, - readers: nil) + readers: nil, + synchronizationStatus: nil) return defaultInstance }() @@ -5364,6 +5525,17 @@ public extension InvalidCustomDBEngineVersionStateFault { }() } +public extension InvalidDBClusterAutomatedBackupStateFault { + /** + Default instance of the InvalidDBClusterAutomatedBackupStateFault structure. + */ + static let __default: RDSModel.InvalidDBClusterAutomatedBackupStateFault = { + let defaultInstance = RDSModel.InvalidDBClusterAutomatedBackupStateFault() + + return defaultInstance + }() +} + public extension InvalidDBClusterCapacityFault { /** Default instance of the InvalidDBClusterCapacityFault structure. @@ -5814,6 +5986,7 @@ public extension ModifyDBClusterMessage { allowMajorVersionUpgrade: nil, applyImmediately: nil, autoMinorVersionUpgrade: nil, + awsBackupRecoveryPointArn: nil, backtrackWindow: nil, backupRetentionPeriod: nil, cloudwatchLogsExportConfiguration: nil, @@ -5828,6 +6001,7 @@ public extension ModifyDBClusterMessage { enableGlobalWriteForwarding: nil, enableHttpEndpoint: nil, enableIAMDatabaseAuthentication: nil, + enableLocalWriteForwarding: nil, enablePerformanceInsights: nil, engineMode: nil, engineVersion: nil, @@ -5954,6 +6128,7 @@ public extension ModifyDBInstanceMessage { dBPortNumber: nil, dBSecurityGroups: nil, dBSubnetGroupName: nil, + dedicatedLogVolume: nil, deletionProtection: nil, disableDomain: nil, domain: nil, @@ -6668,6 +6843,7 @@ public extension OrderableDBInstanceOption { supportedEngineModes: nil, supportedNetworkTypes: nil, supportsClusters: nil, + supportsDedicatedLogVolume: nil, supportsEnhancedMonitoring: nil, supportsGlobalDatabases: nil, supportsIAMDatabaseAuthentication: nil, @@ -6810,6 +6986,7 @@ public extension PendingModifiedValues { dBInstanceClass: nil, dBInstanceIdentifier: nil, dBSubnetGroupName: nil, + dedicatedLogVolume: nil, engine: nil, engineVersion: nil, iAMDatabaseAuthenticationEnabled: nil, @@ -7586,7 +7763,8 @@ public extension RestoreDBClusterToPointInTimeMessage { restoreType: nil, scalingConfiguration: nil, serverlessV2ScalingConfiguration: nil, - sourceDBClusterIdentifier: "value", + sourceDBClusterIdentifier: nil, + sourceDbClusterResourceId: nil, storageType: nil, tags: nil, useLatestRestorableTime: nil, @@ -7639,6 +7817,7 @@ public extension RestoreDBInstanceFromDBSnapshotMessage { dBParameterGroupName: nil, dBSnapshotIdentifier: nil, dBSubnetGroupName: nil, + dedicatedLogVolume: nil, deletionProtection: nil, domain: nil, domainAuthSecretArn: nil, @@ -7711,6 +7890,7 @@ public extension RestoreDBInstanceFromS3Message { dBParameterGroupName: nil, dBSecurityGroups: nil, dBSubnetGroupName: nil, + dedicatedLogVolume: nil, deletionProtection: nil, enableCloudwatchLogsExports: nil, enableIAMDatabaseAuthentication: nil, @@ -7793,6 +7973,7 @@ public extension RestoreDBInstanceToPointInTimeMessage { dBName: nil, dBParameterGroupName: nil, dBSubnetGroupName: nil, + dedicatedLogVolume: nil, deletionProtection: nil, domain: nil, domainAuthSecretArn: nil, @@ -8561,6 +8742,43 @@ public extension SwitchoverDetail { }() } +public extension SwitchoverGlobalClusterMessage { + /** + Default instance of the SwitchoverGlobalClusterMessage structure. + */ + static let __default: RDSModel.SwitchoverGlobalClusterMessage = { + let defaultInstance = RDSModel.SwitchoverGlobalClusterMessage( + globalClusterIdentifier: "0", + targetDbClusterIdentifier: "0") + + return defaultInstance + }() +} + +public extension SwitchoverGlobalClusterResult { + /** + Default instance of the SwitchoverGlobalClusterResult structure. + */ + static let __default: RDSModel.SwitchoverGlobalClusterResult = { + let defaultInstance = RDSModel.SwitchoverGlobalClusterResult( + globalCluster: nil) + + return defaultInstance + }() +} + +public extension SwitchoverGlobalClusterResultForSwitchoverGlobalCluster { + /** + Default instance of the SwitchoverGlobalClusterResultForSwitchoverGlobalCluster structure. + */ + static let __default: RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster = { + let defaultInstance = RDSModel.SwitchoverGlobalClusterResultForSwitchoverGlobalCluster( + switchoverGlobalClusterResult: SwitchoverGlobalClusterResult.__default) + + return defaultInstance + }() +} + public extension SwitchoverReadReplicaMessage { /** Default instance of the SwitchoverReadReplicaMessage structure. @@ -8674,6 +8892,7 @@ public extension UpgradeTarget { supportedEngineModes: nil, supportsBabelfish: nil, supportsGlobalDatabases: nil, + supportsLocalWriteForwarding: nil, supportsParallelQuery: nil) return defaultInstance @@ -8721,6 +8940,7 @@ public extension ValidDBInstanceModificationsMessage { static let __default: RDSModel.ValidDBInstanceModificationsMessage = { let defaultInstance = RDSModel.ValidDBInstanceModificationsMessage( storage: nil, + supportsDedicatedLogVolume: nil, validProcessorFeatures: nil) return defaultInstance diff --git a/Sources/RDSModel/RDSModelErrors.swift b/Sources/RDSModel/RDSModelErrors.swift index 82b14b6..247613e 100644 --- a/Sources/RDSModel/RDSModelErrors.swift +++ b/Sources/RDSModel/RDSModelErrors.swift @@ -46,6 +46,8 @@ private let customDBEngineVersionAlreadyExistsIdentity = "CustomDBEngineVersionA private let customDBEngineVersionNotFoundIdentity = "CustomDBEngineVersionNotFoundFault" private let customDBEngineVersionQuotaExceededIdentity = "CustomDBEngineVersionQuotaExceededFault" private let dBClusterAlreadyExistsIdentity = "DBClusterAlreadyExistsFault" +private let dBClusterAutomatedBackupNotFoundIdentity = "DBClusterAutomatedBackupNotFoundFault" +private let dBClusterAutomatedBackupQuotaExceededIdentity = "DBClusterAutomatedBackupQuotaExceededFault" private let dBClusterBacktrackNotFoundIdentity = "DBClusterBacktrackNotFoundFault" private let dBClusterEndpointAlreadyExistsIdentity = "DBClusterEndpointAlreadyExistsFault" private let dBClusterEndpointNotFoundIdentity = "DBClusterEndpointNotFoundFault" @@ -108,6 +110,7 @@ private let insufficientDBInstanceCapacityIdentity = "InsufficientDBInstanceCapa private let insufficientStorageClusterCapacityIdentity = "InsufficientStorageClusterCapacity" private let invalidBlueGreenDeploymentStateIdentity = "InvalidBlueGreenDeploymentStateFault" private let invalidCustomDBEngineVersionStateIdentity = "InvalidCustomDBEngineVersionStateFault" +private let invalidDBClusterAutomatedBackupStateIdentity = "InvalidDBClusterAutomatedBackupStateFault" private let invalidDBClusterCapacityIdentity = "InvalidDBClusterCapacityFault" private let invalidDBClusterEndpointStateIdentity = "InvalidDBClusterEndpointStateFault" private let invalidDBClusterSnapshotStateIdentity = "InvalidDBClusterSnapshotStateFault" @@ -175,6 +178,8 @@ public enum RDSError: Swift.Error, Decodable { case customDBEngineVersionNotFound(CustomDBEngineVersionNotFoundFault) case customDBEngineVersionQuotaExceeded(CustomDBEngineVersionQuotaExceededFault) case dBClusterAlreadyExists(DBClusterAlreadyExistsFault) + case dBClusterAutomatedBackupNotFound(DBClusterAutomatedBackupNotFoundFault) + case dBClusterAutomatedBackupQuotaExceeded(DBClusterAutomatedBackupQuotaExceededFault) case dBClusterBacktrackNotFound(DBClusterBacktrackNotFoundFault) case dBClusterEndpointAlreadyExists(DBClusterEndpointAlreadyExistsFault) case dBClusterEndpointNotFound(DBClusterEndpointNotFoundFault) @@ -237,6 +242,7 @@ public enum RDSError: Swift.Error, Decodable { case insufficientStorageClusterCapacity(InsufficientStorageClusterCapacityFault) case invalidBlueGreenDeploymentState(InvalidBlueGreenDeploymentStateFault) case invalidCustomDBEngineVersionState(InvalidCustomDBEngineVersionStateFault) + case invalidDBClusterAutomatedBackupState(InvalidDBClusterAutomatedBackupStateFault) case invalidDBClusterCapacity(InvalidDBClusterCapacityFault) case invalidDBClusterEndpointState(InvalidDBClusterEndpointStateFault) case invalidDBClusterSnapshotState(InvalidDBClusterSnapshotStateFault) @@ -346,6 +352,12 @@ public enum RDSError: Swift.Error, Decodable { case dBClusterAlreadyExistsIdentity: let errorPayload = try DBClusterAlreadyExistsFault(from: decoder) self = RDSError.dBClusterAlreadyExists(errorPayload) + case dBClusterAutomatedBackupNotFoundIdentity: + let errorPayload = try DBClusterAutomatedBackupNotFoundFault(from: decoder) + self = RDSError.dBClusterAutomatedBackupNotFound(errorPayload) + case dBClusterAutomatedBackupQuotaExceededIdentity: + let errorPayload = try DBClusterAutomatedBackupQuotaExceededFault(from: decoder) + self = RDSError.dBClusterAutomatedBackupQuotaExceeded(errorPayload) case dBClusterBacktrackNotFoundIdentity: let errorPayload = try DBClusterBacktrackNotFoundFault(from: decoder) self = RDSError.dBClusterBacktrackNotFound(errorPayload) @@ -532,6 +544,9 @@ public enum RDSError: Swift.Error, Decodable { case invalidCustomDBEngineVersionStateIdentity: let errorPayload = try InvalidCustomDBEngineVersionStateFault(from: decoder) self = RDSError.invalidCustomDBEngineVersionState(errorPayload) + case invalidDBClusterAutomatedBackupStateIdentity: + let errorPayload = try InvalidDBClusterAutomatedBackupStateFault(from: decoder) + self = RDSError.invalidDBClusterAutomatedBackupState(errorPayload) case invalidDBClusterCapacityIdentity: let errorPayload = try InvalidDBClusterCapacityFault(from: decoder) self = RDSError.invalidDBClusterCapacity(errorPayload) diff --git a/Sources/RDSModel/RDSModelOperations.swift b/Sources/RDSModel/RDSModelOperations.swift index b7be784..aa2145c 100644 --- a/Sources/RDSModel/RDSModelOperations.swift +++ b/Sources/RDSModel/RDSModelOperations.swift @@ -59,6 +59,7 @@ public enum RDSModelOperations: String, Hashable, CustomStringConvertible { case deleteBlueGreenDeployment = "DeleteBlueGreenDeployment" case deleteCustomDBEngineVersion = "DeleteCustomDBEngineVersion" case deleteDBCluster = "DeleteDBCluster" + case deleteDBClusterAutomatedBackup = "DeleteDBClusterAutomatedBackup" case deleteDBClusterEndpoint = "DeleteDBClusterEndpoint" case deleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" case deleteDBClusterSnapshot = "DeleteDBClusterSnapshot" @@ -77,6 +78,7 @@ public enum RDSModelOperations: String, Hashable, CustomStringConvertible { case describeAccountAttributes = "DescribeAccountAttributes" case describeBlueGreenDeployments = "DescribeBlueGreenDeployments" case describeCertificates = "DescribeCertificates" + case describeDBClusterAutomatedBackups = "DescribeDBClusterAutomatedBackups" case describeDBClusterBacktracks = "DescribeDBClusterBacktracks" case describeDBClusterEndpoints = "DescribeDBClusterEndpoints" case describeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" @@ -166,6 +168,7 @@ public enum RDSModelOperations: String, Hashable, CustomStringConvertible { case stopDBInstance = "StopDBInstance" case stopDBInstanceAutomatedBackupsReplication = "StopDBInstanceAutomatedBackupsReplication" case switchoverBlueGreenDeployment = "SwitchoverBlueGreenDeployment" + case switchoverGlobalCluster = "SwitchoverGlobalCluster" case switchoverReadReplica = "SwitchoverReadReplica" public var description: String { @@ -240,6 +243,8 @@ public enum RDSModelOperations: String, Hashable, CustomStringConvertible { return "/" case .deleteDBCluster: return "/" + case .deleteDBClusterAutomatedBackup: + return "/" case .deleteDBClusterEndpoint: return "/" case .deleteDBClusterParameterGroup: @@ -276,6 +281,8 @@ public enum RDSModelOperations: String, Hashable, CustomStringConvertible { return "/" case .describeCertificates: return "/" + case .describeDBClusterAutomatedBackups: + return "/" case .describeDBClusterBacktracks: return "/" case .describeDBClusterEndpoints: @@ -454,6 +461,8 @@ public enum RDSModelOperations: String, Hashable, CustomStringConvertible { return "/" case .switchoverBlueGreenDeployment: return "/" + case .switchoverGlobalCluster: + return "/" case .switchoverReadReplica: return "/" } diff --git a/Sources/RDSModel/RDSModelStructures.swift b/Sources/RDSModel/RDSModelStructures.swift index 1da1864..dc55900 100644 --- a/Sources/RDSModel/RDSModelStructures.swift +++ b/Sources/RDSModel/RDSModelStructures.swift @@ -586,16 +586,20 @@ public struct CertificateDetails: Codable, Equatable { public struct CertificateMessage: Codable, Equatable { public var certificates: CertificateList? + public var defaultCertificateForNewLaunches: String? public var marker: String? public init(certificates: CertificateList? = nil, + defaultCertificateForNewLaunches: String? = nil, marker: String? = nil) { self.certificates = certificates + self.defaultCertificateForNewLaunches = defaultCertificateForNewLaunches self.marker = marker } enum CodingKeys: String, CodingKey { case certificates = "Certificates" + case defaultCertificateForNewLaunches = "DefaultCertificateForNewLaunches" case marker = "Marker" } @@ -1104,21 +1108,27 @@ public struct CreateBlueGreenDeploymentRequest: Codable, Equatable { public var source: DatabaseArn public var tags: TagList? public var targetDBClusterParameterGroupName: TargetDBClusterParameterGroupName? + public var targetDBInstanceClass: TargetDBInstanceClass? public var targetDBParameterGroupName: TargetDBParameterGroupName? public var targetEngineVersion: TargetEngineVersion? + public var upgradeTargetStorageConfig: BooleanOptional? public init(blueGreenDeploymentName: BlueGreenDeploymentName, source: DatabaseArn, tags: TagList? = nil, targetDBClusterParameterGroupName: TargetDBClusterParameterGroupName? = nil, + targetDBInstanceClass: TargetDBInstanceClass? = nil, targetDBParameterGroupName: TargetDBParameterGroupName? = nil, - targetEngineVersion: TargetEngineVersion? = nil) { + targetEngineVersion: TargetEngineVersion? = nil, + upgradeTargetStorageConfig: BooleanOptional? = nil) { self.blueGreenDeploymentName = blueGreenDeploymentName self.source = source self.tags = tags self.targetDBClusterParameterGroupName = targetDBClusterParameterGroupName + self.targetDBInstanceClass = targetDBInstanceClass self.targetDBParameterGroupName = targetDBParameterGroupName self.targetEngineVersion = targetEngineVersion + self.upgradeTargetStorageConfig = upgradeTargetStorageConfig } enum CodingKeys: String, CodingKey { @@ -1126,14 +1136,17 @@ public struct CreateBlueGreenDeploymentRequest: Codable, Equatable { case source = "Source" case tags = "Tags" case targetDBClusterParameterGroupName = "TargetDBClusterParameterGroupName" + case targetDBInstanceClass = "TargetDBInstanceClass" case targetDBParameterGroupName = "TargetDBParameterGroupName" case targetEngineVersion = "TargetEngineVersion" + case upgradeTargetStorageConfig = "UpgradeTargetStorageConfig" } public func validate() throws { try blueGreenDeploymentName.validateAsBlueGreenDeploymentName() try source.validateAsDatabaseArn() try targetDBClusterParameterGroupName?.validateAsTargetDBClusterParameterGroupName() + try targetDBInstanceClass?.validateAsTargetDBInstanceClass() try targetDBParameterGroupName?.validateAsTargetDBParameterGroupName() try targetEngineVersion?.validateAsTargetEngineVersion() } @@ -1189,7 +1202,9 @@ public struct CreateCustomDBEngineVersionMessage: Codable, Equatable { public var imageId: String255? public var kMSKeyId: KmsKeyIdOrArn? public var manifest: CustomDBEngineVersionManifest? + public var sourceCustomDbEngineVersionIdentifier: String255? public var tags: TagList? + public var useAwsProvidedLatestImage: BooleanOptional? public init(databaseInstallationFilesS3BucketName: BucketName? = nil, databaseInstallationFilesS3Prefix: String255? = nil, @@ -1199,7 +1214,9 @@ public struct CreateCustomDBEngineVersionMessage: Codable, Equatable { imageId: String255? = nil, kMSKeyId: KmsKeyIdOrArn? = nil, manifest: CustomDBEngineVersionManifest? = nil, - tags: TagList? = nil) { + sourceCustomDbEngineVersionIdentifier: String255? = nil, + tags: TagList? = nil, + useAwsProvidedLatestImage: BooleanOptional? = nil) { self.databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketName self.databaseInstallationFilesS3Prefix = databaseInstallationFilesS3Prefix self.description = description @@ -1208,7 +1225,9 @@ public struct CreateCustomDBEngineVersionMessage: Codable, Equatable { self.imageId = imageId self.kMSKeyId = kMSKeyId self.manifest = manifest + self.sourceCustomDbEngineVersionIdentifier = sourceCustomDbEngineVersionIdentifier self.tags = tags + self.useAwsProvidedLatestImage = useAwsProvidedLatestImage } enum CodingKeys: String, CodingKey { @@ -1220,7 +1239,9 @@ public struct CreateCustomDBEngineVersionMessage: Codable, Equatable { case imageId = "ImageId" case kMSKeyId = "KMSKeyId" case manifest = "Manifest" + case sourceCustomDbEngineVersionIdentifier = "SourceCustomDbEngineVersionIdentifier" case tags = "Tags" + case useAwsProvidedLatestImage = "UseAwsProvidedLatestImage" } public func validate() throws { @@ -1232,6 +1253,7 @@ public struct CreateCustomDBEngineVersionMessage: Codable, Equatable { try imageId?.validateAsString255() try kMSKeyId?.validateAsKmsKeyIdOrArn() try manifest?.validateAsCustomDBEngineVersionManifest() + try sourceCustomDbEngineVersionIdentifier?.validateAsString255() } } @@ -1291,6 +1313,7 @@ public struct CreateDBClusterMessage: Codable, Equatable { public var enableGlobalWriteForwarding: BooleanOptional? public var enableHttpEndpoint: BooleanOptional? public var enableIAMDatabaseAuthentication: BooleanOptional? + public var enableLocalWriteForwarding: BooleanOptional? public var enablePerformanceInsights: BooleanOptional? public var engine: String public var engineMode: String? @@ -1341,6 +1364,7 @@ public struct CreateDBClusterMessage: Codable, Equatable { enableGlobalWriteForwarding: BooleanOptional? = nil, enableHttpEndpoint: BooleanOptional? = nil, enableIAMDatabaseAuthentication: BooleanOptional? = nil, + enableLocalWriteForwarding: BooleanOptional? = nil, enablePerformanceInsights: BooleanOptional? = nil, engine: String, engineMode: String? = nil, @@ -1390,6 +1414,7 @@ public struct CreateDBClusterMessage: Codable, Equatable { self.enableGlobalWriteForwarding = enableGlobalWriteForwarding self.enableHttpEndpoint = enableHttpEndpoint self.enableIAMDatabaseAuthentication = enableIAMDatabaseAuthentication + self.enableLocalWriteForwarding = enableLocalWriteForwarding self.enablePerformanceInsights = enablePerformanceInsights self.engine = engine self.engineMode = engineMode @@ -1442,6 +1467,7 @@ public struct CreateDBClusterMessage: Codable, Equatable { case enableGlobalWriteForwarding = "EnableGlobalWriteForwarding" case enableHttpEndpoint = "EnableHttpEndpoint" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enableLocalWriteForwarding = "EnableLocalWriteForwarding" case enablePerformanceInsights = "EnablePerformanceInsights" case engine = "Engine" case engineMode = "EngineMode" @@ -1642,6 +1668,8 @@ public struct CreateDBInstanceMessage: Codable, Equatable { public var dBParameterGroupName: String? public var dBSecurityGroups: DBSecurityGroupNameList? public var dBSubnetGroupName: String? + public var dBSystemId: String? + public var dedicatedLogVolume: BooleanOptional? public var deletionProtection: BooleanOptional? public var domain: String? public var domainAuthSecretArn: String? @@ -1702,6 +1730,8 @@ public struct CreateDBInstanceMessage: Codable, Equatable { dBParameterGroupName: String? = nil, dBSecurityGroups: DBSecurityGroupNameList? = nil, dBSubnetGroupName: String? = nil, + dBSystemId: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, deletionProtection: BooleanOptional? = nil, domain: String? = nil, domainAuthSecretArn: String? = nil, @@ -1761,6 +1791,8 @@ public struct CreateDBInstanceMessage: Codable, Equatable { self.dBParameterGroupName = dBParameterGroupName self.dBSecurityGroups = dBSecurityGroups self.dBSubnetGroupName = dBSubnetGroupName + self.dBSystemId = dBSystemId + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.domain = domain self.domainAuthSecretArn = domainAuthSecretArn @@ -1823,6 +1855,8 @@ public struct CreateDBInstanceMessage: Codable, Equatable { case dBParameterGroupName = "DBParameterGroupName" case dBSecurityGroups = "DBSecurityGroups" case dBSubnetGroupName = "DBSubnetGroupName" + case dBSystemId = "DBSystemId" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case domain = "Domain" case domainAuthSecretArn = "DomainAuthSecretArn" @@ -1882,6 +1916,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { public var dBInstanceIdentifier: String public var dBParameterGroupName: String? public var dBSubnetGroupName: String? + public var dedicatedLogVolume: BooleanOptional? public var deletionProtection: BooleanOptional? public var domain: String? public var domainAuthSecretArn: String? @@ -1913,6 +1948,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { public var storageThroughput: IntegerOptional? public var storageType: String? public var tags: TagList? + public var upgradeStorageConfig: BooleanOptional? public var useDefaultProcessorFeatures: BooleanOptional? public var vpcSecurityGroupIds: VpcSecurityGroupIdList? @@ -1925,6 +1961,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { dBInstanceIdentifier: String, dBParameterGroupName: String? = nil, dBSubnetGroupName: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, deletionProtection: BooleanOptional? = nil, domain: String? = nil, domainAuthSecretArn: String? = nil, @@ -1956,6 +1993,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { storageThroughput: IntegerOptional? = nil, storageType: String? = nil, tags: TagList? = nil, + upgradeStorageConfig: BooleanOptional? = nil, useDefaultProcessorFeatures: BooleanOptional? = nil, vpcSecurityGroupIds: VpcSecurityGroupIdList? = nil) { self.allocatedStorage = allocatedStorage @@ -1967,6 +2005,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { self.dBInstanceIdentifier = dBInstanceIdentifier self.dBParameterGroupName = dBParameterGroupName self.dBSubnetGroupName = dBSubnetGroupName + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.domain = domain self.domainAuthSecretArn = domainAuthSecretArn @@ -1998,6 +2037,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { self.storageThroughput = storageThroughput self.storageType = storageType self.tags = tags + self.upgradeStorageConfig = upgradeStorageConfig self.useDefaultProcessorFeatures = useDefaultProcessorFeatures self.vpcSecurityGroupIds = vpcSecurityGroupIds } @@ -2012,6 +2052,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { case dBInstanceIdentifier = "DBInstanceIdentifier" case dBParameterGroupName = "DBParameterGroupName" case dBSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case domain = "Domain" case domainAuthSecretArn = "DomainAuthSecretArn" @@ -2043,6 +2084,7 @@ public struct CreateDBInstanceReadReplicaMessage: Codable, Equatable { case storageThroughput = "StorageThroughput" case storageType = "StorageType" case tags = "Tags" + case upgradeStorageConfig = "UpgradeStorageConfig" case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" case vpcSecurityGroupIds = "VpcSecurityGroupIds" } @@ -2765,6 +2807,7 @@ public struct DBCluster: Codable, Equatable { public var autoMinorVersionUpgrade: Boolean? public var automaticRestartTime: TStamp? public var availabilityZones: AvailabilityZones? + public var awsBackupRecoveryPointArn: String? public var backtrackConsumedChangeRecords: LongOptional? public var backtrackWindow: LongOptional? public var backupRetentionPeriod: IntegerOptional? @@ -2803,6 +2846,7 @@ public struct DBCluster: Codable, Equatable { public var iops: IntegerOptional? public var kmsKeyId: String? public var latestRestorableTime: TStamp? + public var localWriteForwardingStatus: LocalWriteForwardingStatus? public var masterUserSecret: MasterUserSecret? public var masterUsername: String? public var monitoringInterval: IntegerOptional? @@ -2838,6 +2882,7 @@ public struct DBCluster: Codable, Equatable { autoMinorVersionUpgrade: Boolean? = nil, automaticRestartTime: TStamp? = nil, availabilityZones: AvailabilityZones? = nil, + awsBackupRecoveryPointArn: String? = nil, backtrackConsumedChangeRecords: LongOptional? = nil, backtrackWindow: LongOptional? = nil, backupRetentionPeriod: IntegerOptional? = nil, @@ -2876,6 +2921,7 @@ public struct DBCluster: Codable, Equatable { iops: IntegerOptional? = nil, kmsKeyId: String? = nil, latestRestorableTime: TStamp? = nil, + localWriteForwardingStatus: LocalWriteForwardingStatus? = nil, masterUserSecret: MasterUserSecret? = nil, masterUsername: String? = nil, monitoringInterval: IntegerOptional? = nil, @@ -2910,6 +2956,7 @@ public struct DBCluster: Codable, Equatable { self.autoMinorVersionUpgrade = autoMinorVersionUpgrade self.automaticRestartTime = automaticRestartTime self.availabilityZones = availabilityZones + self.awsBackupRecoveryPointArn = awsBackupRecoveryPointArn self.backtrackConsumedChangeRecords = backtrackConsumedChangeRecords self.backtrackWindow = backtrackWindow self.backupRetentionPeriod = backupRetentionPeriod @@ -2948,6 +2995,7 @@ public struct DBCluster: Codable, Equatable { self.iops = iops self.kmsKeyId = kmsKeyId self.latestRestorableTime = latestRestorableTime + self.localWriteForwardingStatus = localWriteForwardingStatus self.masterUserSecret = masterUserSecret self.masterUsername = masterUsername self.monitoringInterval = monitoringInterval @@ -2985,6 +3033,7 @@ public struct DBCluster: Codable, Equatable { case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" case automaticRestartTime = "AutomaticRestartTime" case availabilityZones = "AvailabilityZones" + case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" case backtrackConsumedChangeRecords = "BacktrackConsumedChangeRecords" case backtrackWindow = "BacktrackWindow" case backupRetentionPeriod = "BackupRetentionPeriod" @@ -3023,6 +3072,7 @@ public struct DBCluster: Codable, Equatable { case iops = "Iops" case kmsKeyId = "KmsKeyId" case latestRestorableTime = "LatestRestorableTime" + case localWriteForwardingStatus = "LocalWriteForwardingStatus" case masterUserSecret = "MasterUserSecret" case masterUsername = "MasterUsername" case monitoringInterval = "MonitoringInterval" @@ -3067,6 +3117,167 @@ public struct DBClusterAlreadyExistsFault: Codable, Equatable { } } +public struct DBClusterAutomatedBackup: Codable, Equatable { + public var allocatedStorage: Integer? + public var availabilityZones: AvailabilityZones? + public var awsBackupRecoveryPointArn: String? + public var backupRetentionPeriod: IntegerOptional? + public var clusterCreateTime: TStamp? + public var dBClusterArn: String? + public var dBClusterAutomatedBackupsArn: String? + public var dBClusterIdentifier: String? + public var dbClusterResourceId: String? + public var engine: String? + public var engineMode: String? + public var engineVersion: String? + public var iAMDatabaseAuthenticationEnabled: Boolean? + public var iops: IntegerOptional? + public var kmsKeyId: String? + public var licenseModel: String? + public var masterUsername: String? + public var port: Integer? + public var region: String? + public var restoreWindow: RestoreWindow? + public var status: String? + public var storageEncrypted: Boolean? + public var storageType: String? + public var vpcId: String? + + public init(allocatedStorage: Integer? = nil, + availabilityZones: AvailabilityZones? = nil, + awsBackupRecoveryPointArn: String? = nil, + backupRetentionPeriod: IntegerOptional? = nil, + clusterCreateTime: TStamp? = nil, + dBClusterArn: String? = nil, + dBClusterAutomatedBackupsArn: String? = nil, + dBClusterIdentifier: String? = nil, + dbClusterResourceId: String? = nil, + engine: String? = nil, + engineMode: String? = nil, + engineVersion: String? = nil, + iAMDatabaseAuthenticationEnabled: Boolean? = nil, + iops: IntegerOptional? = nil, + kmsKeyId: String? = nil, + licenseModel: String? = nil, + masterUsername: String? = nil, + port: Integer? = nil, + region: String? = nil, + restoreWindow: RestoreWindow? = nil, + status: String? = nil, + storageEncrypted: Boolean? = nil, + storageType: String? = nil, + vpcId: String? = nil) { + self.allocatedStorage = allocatedStorage + self.availabilityZones = availabilityZones + self.awsBackupRecoveryPointArn = awsBackupRecoveryPointArn + self.backupRetentionPeriod = backupRetentionPeriod + self.clusterCreateTime = clusterCreateTime + self.dBClusterArn = dBClusterArn + self.dBClusterAutomatedBackupsArn = dBClusterAutomatedBackupsArn + self.dBClusterIdentifier = dBClusterIdentifier + self.dbClusterResourceId = dbClusterResourceId + self.engine = engine + self.engineMode = engineMode + self.engineVersion = engineVersion + self.iAMDatabaseAuthenticationEnabled = iAMDatabaseAuthenticationEnabled + self.iops = iops + self.kmsKeyId = kmsKeyId + self.licenseModel = licenseModel + self.masterUsername = masterUsername + self.port = port + self.region = region + self.restoreWindow = restoreWindow + self.status = status + self.storageEncrypted = storageEncrypted + self.storageType = storageType + self.vpcId = vpcId + } + + enum CodingKeys: String, CodingKey { + case allocatedStorage = "AllocatedStorage" + case availabilityZones = "AvailabilityZones" + case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" + case backupRetentionPeriod = "BackupRetentionPeriod" + case clusterCreateTime = "ClusterCreateTime" + case dBClusterArn = "DBClusterArn" + case dBClusterAutomatedBackupsArn = "DBClusterAutomatedBackupsArn" + case dBClusterIdentifier = "DBClusterIdentifier" + case dbClusterResourceId = "DbClusterResourceId" + case engine = "Engine" + case engineMode = "EngineMode" + case engineVersion = "EngineVersion" + case iAMDatabaseAuthenticationEnabled = "IAMDatabaseAuthenticationEnabled" + case iops = "Iops" + case kmsKeyId = "KmsKeyId" + case licenseModel = "LicenseModel" + case masterUsername = "MasterUsername" + case port = "Port" + case region = "Region" + case restoreWindow = "RestoreWindow" + case status = "Status" + case storageEncrypted = "StorageEncrypted" + case storageType = "StorageType" + case vpcId = "VpcId" + } + + public func validate() throws { + try restoreWindow?.validate() + } +} + +public struct DBClusterAutomatedBackupMessage: Codable, Equatable { + public var dBClusterAutomatedBackups: DBClusterAutomatedBackupList? + public var marker: String? + + public init(dBClusterAutomatedBackups: DBClusterAutomatedBackupList? = nil, + marker: String? = nil) { + self.dBClusterAutomatedBackups = dBClusterAutomatedBackups + self.marker = marker + } + + enum CodingKeys: String, CodingKey { + case dBClusterAutomatedBackups = "DBClusterAutomatedBackups" + case marker = "Marker" + } + + public func validate() throws { + } +} + +public struct DBClusterAutomatedBackupMessageForDescribeDBClusterAutomatedBackups: Codable, Equatable { + public var describeDBClusterAutomatedBackupsResult: DBClusterAutomatedBackupMessage + + public init(describeDBClusterAutomatedBackupsResult: DBClusterAutomatedBackupMessage) { + self.describeDBClusterAutomatedBackupsResult = describeDBClusterAutomatedBackupsResult + } + + enum CodingKeys: String, CodingKey { + case describeDBClusterAutomatedBackupsResult = "DescribeDBClusterAutomatedBackupsResult" + } + + public func validate() throws { + try describeDBClusterAutomatedBackupsResult.validate() + } +} + +public struct DBClusterAutomatedBackupNotFoundFault: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + +public struct DBClusterAutomatedBackupQuotaExceededFault: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + public struct DBClusterBacktrack: Codable, Equatable { public var backtrackIdentifier: String? public var backtrackRequestCreationTime: TStamp? @@ -3680,6 +3891,7 @@ public struct DBClusterSnapshot: Codable, Equatable { public var dBClusterSnapshotArn: String? public var dBClusterSnapshotIdentifier: String? public var dBSystemId: String? + public var dbClusterResourceId: String? public var engine: String? public var engineMode: String? public var engineVersion: String? @@ -3705,6 +3917,7 @@ public struct DBClusterSnapshot: Codable, Equatable { dBClusterSnapshotArn: String? = nil, dBClusterSnapshotIdentifier: String? = nil, dBSystemId: String? = nil, + dbClusterResourceId: String? = nil, engine: String? = nil, engineMode: String? = nil, engineVersion: String? = nil, @@ -3729,6 +3942,7 @@ public struct DBClusterSnapshot: Codable, Equatable { self.dBClusterSnapshotArn = dBClusterSnapshotArn self.dBClusterSnapshotIdentifier = dBClusterSnapshotIdentifier self.dBSystemId = dBSystemId + self.dbClusterResourceId = dbClusterResourceId self.engine = engine self.engineMode = engineMode self.engineVersion = engineVersion @@ -3756,6 +3970,7 @@ public struct DBClusterSnapshot: Codable, Equatable { case dBClusterSnapshotArn = "DBClusterSnapshotArn" case dBClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" case dBSystemId = "DBSystemId" + case dbClusterResourceId = "DbClusterResourceId" case engine = "Engine" case engineMode = "EngineMode" case engineVersion = "EngineVersion" @@ -3897,6 +4112,7 @@ public struct DBEngineVersion: Codable, Equatable { public var supportsBabelfish: Boolean? public var supportsCertificateRotationWithoutRestart: BooleanOptional? public var supportsGlobalDatabases: Boolean? + public var supportsLocalWriteForwarding: BooleanOptional? public var supportsLogExportsToCloudwatchLogs: Boolean? public var supportsParallelQuery: Boolean? public var supportsReadReplica: Boolean? @@ -3929,6 +4145,7 @@ public struct DBEngineVersion: Codable, Equatable { supportsBabelfish: Boolean? = nil, supportsCertificateRotationWithoutRestart: BooleanOptional? = nil, supportsGlobalDatabases: Boolean? = nil, + supportsLocalWriteForwarding: BooleanOptional? = nil, supportsLogExportsToCloudwatchLogs: Boolean? = nil, supportsParallelQuery: Boolean? = nil, supportsReadReplica: Boolean? = nil, @@ -3960,6 +4177,7 @@ public struct DBEngineVersion: Codable, Equatable { self.supportsBabelfish = supportsBabelfish self.supportsCertificateRotationWithoutRestart = supportsCertificateRotationWithoutRestart self.supportsGlobalDatabases = supportsGlobalDatabases + self.supportsLocalWriteForwarding = supportsLocalWriteForwarding self.supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogs self.supportsParallelQuery = supportsParallelQuery self.supportsReadReplica = supportsReadReplica @@ -3994,6 +4212,7 @@ public struct DBEngineVersion: Codable, Equatable { case supportsBabelfish = "SupportsBabelfish" case supportsCertificateRotationWithoutRestart = "SupportsCertificateRotationWithoutRestart" case supportsGlobalDatabases = "SupportsGlobalDatabases" + case supportsLocalWriteForwarding = "SupportsLocalWriteForwarding" case supportsLogExportsToCloudwatchLogs = "SupportsLogExportsToCloudwatchLogs" case supportsParallelQuery = "SupportsParallelQuery" case supportsReadReplica = "SupportsReadReplica" @@ -4126,6 +4345,7 @@ public struct DBInstance: Codable, Equatable { public var dBSystemId: String? public var dbInstancePort: Integer? public var dbiResourceId: String? + public var dedicatedLogVolume: Boolean? public var deletionProtection: Boolean? public var domainMemberships: DomainMembershipList? public var enabledCloudwatchLogsExports: LogTypeList? @@ -4136,6 +4356,7 @@ public struct DBInstance: Codable, Equatable { public var iAMDatabaseAuthenticationEnabled: Boolean? public var instanceCreateTime: TStamp? public var iops: IntegerOptional? + public var isStorageConfigUpgradeAvailable: BooleanOptional? public var kmsKeyId: String? public var latestRestorableTime: TStamp? public var licenseModel: String? @@ -4150,6 +4371,7 @@ public struct DBInstance: Codable, Equatable { public var networkType: String? public var optionGroupMemberships: OptionGroupMembershipList? public var pendingModifiedValues: PendingModifiedValues? + public var percentProgress: String? public var performanceInsightsEnabled: BooleanOptional? public var performanceInsightsKMSKeyId: String? public var performanceInsightsRetentionPeriod: IntegerOptional? @@ -4208,6 +4430,7 @@ public struct DBInstance: Codable, Equatable { dBSystemId: String? = nil, dbInstancePort: Integer? = nil, dbiResourceId: String? = nil, + dedicatedLogVolume: Boolean? = nil, deletionProtection: Boolean? = nil, domainMemberships: DomainMembershipList? = nil, enabledCloudwatchLogsExports: LogTypeList? = nil, @@ -4218,6 +4441,7 @@ public struct DBInstance: Codable, Equatable { iAMDatabaseAuthenticationEnabled: Boolean? = nil, instanceCreateTime: TStamp? = nil, iops: IntegerOptional? = nil, + isStorageConfigUpgradeAvailable: BooleanOptional? = nil, kmsKeyId: String? = nil, latestRestorableTime: TStamp? = nil, licenseModel: String? = nil, @@ -4232,6 +4456,7 @@ public struct DBInstance: Codable, Equatable { networkType: String? = nil, optionGroupMemberships: OptionGroupMembershipList? = nil, pendingModifiedValues: PendingModifiedValues? = nil, + percentProgress: String? = nil, performanceInsightsEnabled: BooleanOptional? = nil, performanceInsightsKMSKeyId: String? = nil, performanceInsightsRetentionPeriod: IntegerOptional? = nil, @@ -4289,6 +4514,7 @@ public struct DBInstance: Codable, Equatable { self.dBSystemId = dBSystemId self.dbInstancePort = dbInstancePort self.dbiResourceId = dbiResourceId + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.domainMemberships = domainMemberships self.enabledCloudwatchLogsExports = enabledCloudwatchLogsExports @@ -4299,6 +4525,7 @@ public struct DBInstance: Codable, Equatable { self.iAMDatabaseAuthenticationEnabled = iAMDatabaseAuthenticationEnabled self.instanceCreateTime = instanceCreateTime self.iops = iops + self.isStorageConfigUpgradeAvailable = isStorageConfigUpgradeAvailable self.kmsKeyId = kmsKeyId self.latestRestorableTime = latestRestorableTime self.licenseModel = licenseModel @@ -4313,6 +4540,7 @@ public struct DBInstance: Codable, Equatable { self.networkType = networkType self.optionGroupMemberships = optionGroupMemberships self.pendingModifiedValues = pendingModifiedValues + self.percentProgress = percentProgress self.performanceInsightsEnabled = performanceInsightsEnabled self.performanceInsightsKMSKeyId = performanceInsightsKMSKeyId self.performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriod @@ -4373,6 +4601,7 @@ public struct DBInstance: Codable, Equatable { case dBSystemId = "DBSystemId" case dbInstancePort = "DbInstancePort" case dbiResourceId = "DbiResourceId" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case domainMemberships = "DomainMemberships" case enabledCloudwatchLogsExports = "EnabledCloudwatchLogsExports" @@ -4383,6 +4612,7 @@ public struct DBInstance: Codable, Equatable { case iAMDatabaseAuthenticationEnabled = "IAMDatabaseAuthenticationEnabled" case instanceCreateTime = "InstanceCreateTime" case iops = "Iops" + case isStorageConfigUpgradeAvailable = "IsStorageConfigUpgradeAvailable" case kmsKeyId = "KmsKeyId" case latestRestorableTime = "LatestRestorableTime" case licenseModel = "LicenseModel" @@ -4397,6 +4627,7 @@ public struct DBInstance: Codable, Equatable { case networkType = "NetworkType" case optionGroupMemberships = "OptionGroupMemberships" case pendingModifiedValues = "PendingModifiedValues" + case percentProgress = "PercentProgress" case performanceInsightsEnabled = "PerformanceInsightsEnabled" case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" @@ -4444,6 +4675,7 @@ public struct DBInstanceAlreadyExistsFault: Codable, Equatable { public struct DBInstanceAutomatedBackup: Codable, Equatable { public var allocatedStorage: Integer? public var availabilityZone: String? + public var awsBackupRecoveryPointArn: String? public var backupRetentionPeriod: IntegerOptional? public var backupTarget: String? public var dBInstanceArn: String? @@ -4451,6 +4683,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { public var dBInstanceAutomatedBackupsReplications: DBInstanceAutomatedBackupsReplicationList? public var dBInstanceIdentifier: String? public var dbiResourceId: String? + public var dedicatedLogVolume: BooleanOptional? public var encrypted: Boolean? public var engine: String? public var engineVersion: String? @@ -4473,6 +4706,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { public init(allocatedStorage: Integer? = nil, availabilityZone: String? = nil, + awsBackupRecoveryPointArn: String? = nil, backupRetentionPeriod: IntegerOptional? = nil, backupTarget: String? = nil, dBInstanceArn: String? = nil, @@ -4480,6 +4714,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { dBInstanceAutomatedBackupsReplications: DBInstanceAutomatedBackupsReplicationList? = nil, dBInstanceIdentifier: String? = nil, dbiResourceId: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, encrypted: Boolean? = nil, engine: String? = nil, engineVersion: String? = nil, @@ -4501,6 +4736,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { vpcId: String? = nil) { self.allocatedStorage = allocatedStorage self.availabilityZone = availabilityZone + self.awsBackupRecoveryPointArn = awsBackupRecoveryPointArn self.backupRetentionPeriod = backupRetentionPeriod self.backupTarget = backupTarget self.dBInstanceArn = dBInstanceArn @@ -4508,6 +4744,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { self.dBInstanceAutomatedBackupsReplications = dBInstanceAutomatedBackupsReplications self.dBInstanceIdentifier = dBInstanceIdentifier self.dbiResourceId = dbiResourceId + self.dedicatedLogVolume = dedicatedLogVolume self.encrypted = encrypted self.engine = engine self.engineVersion = engineVersion @@ -4532,6 +4769,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { enum CodingKeys: String, CodingKey { case allocatedStorage = "AllocatedStorage" case availabilityZone = "AvailabilityZone" + case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" case backupRetentionPeriod = "BackupRetentionPeriod" case backupTarget = "BackupTarget" case dBInstanceArn = "DBInstanceArn" @@ -4539,6 +4777,7 @@ public struct DBInstanceAutomatedBackup: Codable, Equatable { case dBInstanceAutomatedBackupsReplications = "DBInstanceAutomatedBackupsReplications" case dBInstanceIdentifier = "DBInstanceIdentifier" case dbiResourceId = "DbiResourceId" + case dedicatedLogVolume = "DedicatedLogVolume" case encrypted = "Encrypted" case engine = "Engine" case engineVersion = "EngineVersion" @@ -5383,7 +5622,9 @@ public struct DBSnapshot: Codable, Equatable { public var dBInstanceIdentifier: String? public var dBSnapshotArn: String? public var dBSnapshotIdentifier: String? + public var dBSystemId: String? public var dbiResourceId: String? + public var dedicatedLogVolume: Boolean? public var encrypted: Boolean? public var engine: String? public var engineVersion: String? @@ -5417,7 +5658,9 @@ public struct DBSnapshot: Codable, Equatable { dBInstanceIdentifier: String? = nil, dBSnapshotArn: String? = nil, dBSnapshotIdentifier: String? = nil, + dBSystemId: String? = nil, dbiResourceId: String? = nil, + dedicatedLogVolume: Boolean? = nil, encrypted: Boolean? = nil, engine: String? = nil, engineVersion: String? = nil, @@ -5450,7 +5693,9 @@ public struct DBSnapshot: Codable, Equatable { self.dBInstanceIdentifier = dBInstanceIdentifier self.dBSnapshotArn = dBSnapshotArn self.dBSnapshotIdentifier = dBSnapshotIdentifier + self.dBSystemId = dBSystemId self.dbiResourceId = dbiResourceId + self.dedicatedLogVolume = dedicatedLogVolume self.encrypted = encrypted self.engine = engine self.engineVersion = engineVersion @@ -5486,7 +5731,9 @@ public struct DBSnapshot: Codable, Equatable { case dBInstanceIdentifier = "DBInstanceIdentifier" case dBSnapshotArn = "DBSnapshotArn" case dBSnapshotIdentifier = "DBSnapshotIdentifier" + case dBSystemId = "DBSystemId" case dbiResourceId = "DbiResourceId" + case dedicatedLogVolume = "DedicatedLogVolume" case encrypted = "Encrypted" case engine = "Engine" case engineVersion = "EngineVersion" @@ -5821,6 +6068,53 @@ public struct DeleteCustomDBEngineVersionMessage: Codable, Equatable { } } +public struct DeleteDBClusterAutomatedBackupMessage: Codable, Equatable { + public var dbClusterResourceId: String + + public init(dbClusterResourceId: String) { + self.dbClusterResourceId = dbClusterResourceId + } + + enum CodingKeys: String, CodingKey { + case dbClusterResourceId = "DbClusterResourceId" + } + + public func validate() throws { + } +} + +public struct DeleteDBClusterAutomatedBackupResult: Codable, Equatable { + public var dBClusterAutomatedBackup: DBClusterAutomatedBackup? + + public init(dBClusterAutomatedBackup: DBClusterAutomatedBackup? = nil) { + self.dBClusterAutomatedBackup = dBClusterAutomatedBackup + } + + enum CodingKeys: String, CodingKey { + case dBClusterAutomatedBackup = "DBClusterAutomatedBackup" + } + + public func validate() throws { + try dBClusterAutomatedBackup?.validate() + } +} + +public struct DeleteDBClusterAutomatedBackupResultForDeleteDBClusterAutomatedBackup: Codable, Equatable { + public var deleteDBClusterAutomatedBackupResult: DeleteDBClusterAutomatedBackupResult + + public init(deleteDBClusterAutomatedBackupResult: DeleteDBClusterAutomatedBackupResult) { + self.deleteDBClusterAutomatedBackupResult = deleteDBClusterAutomatedBackupResult + } + + enum CodingKeys: String, CodingKey { + case deleteDBClusterAutomatedBackupResult = "DeleteDBClusterAutomatedBackupResult" + } + + public func validate() throws { + try deleteDBClusterAutomatedBackupResult.validate() + } +} + public struct DeleteDBClusterEndpointMessage: Codable, Equatable { public var dBClusterEndpointIdentifier: String @@ -5838,19 +6132,23 @@ public struct DeleteDBClusterEndpointMessage: Codable, Equatable { public struct DeleteDBClusterMessage: Codable, Equatable { public var dBClusterIdentifier: String + public var deleteAutomatedBackups: BooleanOptional? public var finalDBSnapshotIdentifier: String? public var skipFinalSnapshot: Boolean? public init(dBClusterIdentifier: String, + deleteAutomatedBackups: BooleanOptional? = nil, finalDBSnapshotIdentifier: String? = nil, skipFinalSnapshot: Boolean? = nil) { self.dBClusterIdentifier = dBClusterIdentifier + self.deleteAutomatedBackups = deleteAutomatedBackups self.finalDBSnapshotIdentifier = finalDBSnapshotIdentifier self.skipFinalSnapshot = skipFinalSnapshot } enum CodingKeys: String, CodingKey { case dBClusterIdentifier = "DBClusterIdentifier" + case deleteAutomatedBackups = "DeleteAutomatedBackups" case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" case skipFinalSnapshot = "SkipFinalSnapshot" } @@ -6511,6 +6809,37 @@ public struct DescribeCertificatesMessage: Codable, Equatable { } } +public struct DescribeDBClusterAutomatedBackupsMessage: Codable, Equatable { + public var dBClusterIdentifier: String? + public var dbClusterResourceId: String? + public var filters: FilterList? + public var marker: String? + public var maxRecords: IntegerOptional? + + public init(dBClusterIdentifier: String? = nil, + dbClusterResourceId: String? = nil, + filters: FilterList? = nil, + marker: String? = nil, + maxRecords: IntegerOptional? = nil) { + self.dBClusterIdentifier = dBClusterIdentifier + self.dbClusterResourceId = dbClusterResourceId + self.filters = filters + self.marker = marker + self.maxRecords = maxRecords + } + + enum CodingKeys: String, CodingKey { + case dBClusterIdentifier = "DBClusterIdentifier" + case dbClusterResourceId = "DbClusterResourceId" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + } + + public func validate() throws { + } +} + public struct DescribeDBClusterBacktracksMessage: Codable, Equatable { public var backtrackIdentifier: String? public var dBClusterIdentifier: String @@ -6681,6 +7010,7 @@ public struct DescribeDBClusterSnapshotAttributesResultForDescribeDBClusterSnaps public struct DescribeDBClusterSnapshotsMessage: Codable, Equatable { public var dBClusterIdentifier: String? public var dBClusterSnapshotIdentifier: String? + public var dbClusterResourceId: String? public var filters: FilterList? public var includePublic: Boolean? public var includeShared: Boolean? @@ -6690,6 +7020,7 @@ public struct DescribeDBClusterSnapshotsMessage: Codable, Equatable { public init(dBClusterIdentifier: String? = nil, dBClusterSnapshotIdentifier: String? = nil, + dbClusterResourceId: String? = nil, filters: FilterList? = nil, includePublic: Boolean? = nil, includeShared: Boolean? = nil, @@ -6698,6 +7029,7 @@ public struct DescribeDBClusterSnapshotsMessage: Codable, Equatable { snapshotType: String? = nil) { self.dBClusterIdentifier = dBClusterIdentifier self.dBClusterSnapshotIdentifier = dBClusterSnapshotIdentifier + self.dbClusterResourceId = dbClusterResourceId self.filters = filters self.includePublic = includePublic self.includeShared = includeShared @@ -6709,6 +7041,7 @@ public struct DescribeDBClusterSnapshotsMessage: Codable, Equatable { enum CodingKeys: String, CodingKey { case dBClusterIdentifier = "DBClusterIdentifier" case dBClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case dbClusterResourceId = "DbClusterResourceId" case filters = "Filters" case includePublic = "IncludePublic" case includeShared = "IncludeShared" @@ -8666,17 +8999,25 @@ public struct FailoverDBClusterResultForFailoverDBCluster: Codable, Equatable { } public struct FailoverGlobalClusterMessage: Codable, Equatable { + public var allowDataLoss: BooleanOptional? public var globalClusterIdentifier: GlobalClusterIdentifier + public var switchover: BooleanOptional? public var targetDbClusterIdentifier: DBClusterIdentifier - public init(globalClusterIdentifier: GlobalClusterIdentifier, + public init(allowDataLoss: BooleanOptional? = nil, + globalClusterIdentifier: GlobalClusterIdentifier, + switchover: BooleanOptional? = nil, targetDbClusterIdentifier: DBClusterIdentifier) { + self.allowDataLoss = allowDataLoss self.globalClusterIdentifier = globalClusterIdentifier + self.switchover = switchover self.targetDbClusterIdentifier = targetDbClusterIdentifier } enum CodingKeys: String, CodingKey { + case allowDataLoss = "AllowDataLoss" case globalClusterIdentifier = "GlobalClusterIdentifier" + case switchover = "Switchover" case targetDbClusterIdentifier = "TargetDbClusterIdentifier" } @@ -8720,19 +9061,23 @@ public struct FailoverGlobalClusterResultForFailoverGlobalCluster: Codable, Equa public struct FailoverState: Codable, Equatable { public var fromDbClusterArn: String? + public var isDataLossAllowed: Boolean? public var status: FailoverStatus? public var toDbClusterArn: String? public init(fromDbClusterArn: String? = nil, + isDataLossAllowed: Boolean? = nil, status: FailoverStatus? = nil, toDbClusterArn: String? = nil) { self.fromDbClusterArn = fromDbClusterArn + self.isDataLossAllowed = isDataLossAllowed self.status = status self.toDbClusterArn = toDbClusterArn } enum CodingKeys: String, CodingKey { case fromDbClusterArn = "FromDbClusterArn" + case isDataLossAllowed = "IsDataLossAllowed" case status = "Status" case toDbClusterArn = "ToDbClusterArn" } @@ -8830,15 +9175,18 @@ public struct GlobalClusterMember: Codable, Equatable { public var globalWriteForwardingStatus: WriteForwardingStatus? public var isWriter: Boolean? public var readers: ReadersArnList? + public var synchronizationStatus: GlobalClusterMemberSynchronizationStatus? public init(dBClusterArn: String? = nil, globalWriteForwardingStatus: WriteForwardingStatus? = nil, isWriter: Boolean? = nil, - readers: ReadersArnList? = nil) { + readers: ReadersArnList? = nil, + synchronizationStatus: GlobalClusterMemberSynchronizationStatus? = nil) { self.dBClusterArn = dBClusterArn self.globalWriteForwardingStatus = globalWriteForwardingStatus self.isWriter = isWriter self.readers = readers + self.synchronizationStatus = synchronizationStatus } enum CodingKeys: String, CodingKey { @@ -8846,6 +9194,7 @@ public struct GlobalClusterMember: Codable, Equatable { case globalWriteForwardingStatus = "GlobalWriteForwardingStatus" case isWriter = "IsWriter" case readers = "Readers" + case synchronizationStatus = "SynchronizationStatus" } public func validate() throws { @@ -9005,6 +9354,15 @@ public struct InvalidCustomDBEngineVersionStateFault: Codable, Equatable { } } +public struct InvalidDBClusterAutomatedBackupStateFault: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + public struct InvalidDBClusterCapacityFault: Codable, Equatable { public init() { @@ -9502,6 +9860,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { public var allowMajorVersionUpgrade: Boolean? public var applyImmediately: Boolean? public var autoMinorVersionUpgrade: BooleanOptional? + public var awsBackupRecoveryPointArn: AwsBackupRecoveryPointArn? public var backtrackWindow: LongOptional? public var backupRetentionPeriod: IntegerOptional? public var cloudwatchLogsExportConfiguration: CloudwatchLogsExportConfiguration? @@ -9516,6 +9875,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { public var enableGlobalWriteForwarding: BooleanOptional? public var enableHttpEndpoint: BooleanOptional? public var enableIAMDatabaseAuthentication: BooleanOptional? + public var enableLocalWriteForwarding: BooleanOptional? public var enablePerformanceInsights: BooleanOptional? public var engineMode: String? public var engineVersion: String? @@ -9544,6 +9904,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { allowMajorVersionUpgrade: Boolean? = nil, applyImmediately: Boolean? = nil, autoMinorVersionUpgrade: BooleanOptional? = nil, + awsBackupRecoveryPointArn: AwsBackupRecoveryPointArn? = nil, backtrackWindow: LongOptional? = nil, backupRetentionPeriod: IntegerOptional? = nil, cloudwatchLogsExportConfiguration: CloudwatchLogsExportConfiguration? = nil, @@ -9558,6 +9919,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { enableGlobalWriteForwarding: BooleanOptional? = nil, enableHttpEndpoint: BooleanOptional? = nil, enableIAMDatabaseAuthentication: BooleanOptional? = nil, + enableLocalWriteForwarding: BooleanOptional? = nil, enablePerformanceInsights: BooleanOptional? = nil, engineMode: String? = nil, engineVersion: String? = nil, @@ -9585,6 +9947,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { self.allowMajorVersionUpgrade = allowMajorVersionUpgrade self.applyImmediately = applyImmediately self.autoMinorVersionUpgrade = autoMinorVersionUpgrade + self.awsBackupRecoveryPointArn = awsBackupRecoveryPointArn self.backtrackWindow = backtrackWindow self.backupRetentionPeriod = backupRetentionPeriod self.cloudwatchLogsExportConfiguration = cloudwatchLogsExportConfiguration @@ -9599,6 +9962,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { self.enableGlobalWriteForwarding = enableGlobalWriteForwarding self.enableHttpEndpoint = enableHttpEndpoint self.enableIAMDatabaseAuthentication = enableIAMDatabaseAuthentication + self.enableLocalWriteForwarding = enableLocalWriteForwarding self.enablePerformanceInsights = enablePerformanceInsights self.engineMode = engineMode self.engineVersion = engineVersion @@ -9629,6 +9993,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" case applyImmediately = "ApplyImmediately" case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" case backtrackWindow = "BacktrackWindow" case backupRetentionPeriod = "BackupRetentionPeriod" case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" @@ -9643,6 +10008,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { case enableGlobalWriteForwarding = "EnableGlobalWriteForwarding" case enableHttpEndpoint = "EnableHttpEndpoint" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enableLocalWriteForwarding = "EnableLocalWriteForwarding" case enablePerformanceInsights = "EnablePerformanceInsights" case engineMode = "EngineMode" case engineVersion = "EngineVersion" @@ -9668,6 +10034,7 @@ public struct ModifyDBClusterMessage: Codable, Equatable { } public func validate() throws { + try awsBackupRecoveryPointArn?.validateAsAwsBackupRecoveryPointArn() try cloudwatchLogsExportConfiguration?.validate() try scalingConfiguration?.validate() try serverlessV2ScalingConfiguration?.validate() @@ -9802,6 +10169,7 @@ public struct ModifyDBInstanceMessage: Codable, Equatable { public var dBPortNumber: IntegerOptional? public var dBSecurityGroups: DBSecurityGroupNameList? public var dBSubnetGroupName: String? + public var dedicatedLogVolume: BooleanOptional? public var deletionProtection: BooleanOptional? public var disableDomain: BooleanOptional? public var domain: String? @@ -9861,6 +10229,7 @@ public struct ModifyDBInstanceMessage: Codable, Equatable { dBPortNumber: IntegerOptional? = nil, dBSecurityGroups: DBSecurityGroupNameList? = nil, dBSubnetGroupName: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, deletionProtection: BooleanOptional? = nil, disableDomain: BooleanOptional? = nil, domain: String? = nil, @@ -9919,6 +10288,7 @@ public struct ModifyDBInstanceMessage: Codable, Equatable { self.dBPortNumber = dBPortNumber self.dBSecurityGroups = dBSecurityGroups self.dBSubnetGroupName = dBSubnetGroupName + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.disableDomain = disableDomain self.domain = domain @@ -9980,6 +10350,7 @@ public struct ModifyDBInstanceMessage: Codable, Equatable { case dBPortNumber = "DBPortNumber" case dBSecurityGroups = "DBSecurityGroups" case dBSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case disableDomain = "DisableDomain" case domain = "Domain" @@ -11102,6 +11473,7 @@ public struct OrderableDBInstanceOption: Codable, Equatable { public var supportedEngineModes: EngineModeList? public var supportedNetworkTypes: StringList? public var supportsClusters: Boolean? + public var supportsDedicatedLogVolume: Boolean? public var supportsEnhancedMonitoring: Boolean? public var supportsGlobalDatabases: Boolean? public var supportsIAMDatabaseAuthentication: Boolean? @@ -11138,6 +11510,7 @@ public struct OrderableDBInstanceOption: Codable, Equatable { supportedEngineModes: EngineModeList? = nil, supportedNetworkTypes: StringList? = nil, supportsClusters: Boolean? = nil, + supportsDedicatedLogVolume: Boolean? = nil, supportsEnhancedMonitoring: Boolean? = nil, supportsGlobalDatabases: Boolean? = nil, supportsIAMDatabaseAuthentication: Boolean? = nil, @@ -11173,6 +11546,7 @@ public struct OrderableDBInstanceOption: Codable, Equatable { self.supportedEngineModes = supportedEngineModes self.supportedNetworkTypes = supportedNetworkTypes self.supportsClusters = supportsClusters + self.supportsDedicatedLogVolume = supportsDedicatedLogVolume self.supportsEnhancedMonitoring = supportsEnhancedMonitoring self.supportsGlobalDatabases = supportsGlobalDatabases self.supportsIAMDatabaseAuthentication = supportsIAMDatabaseAuthentication @@ -11211,6 +11585,7 @@ public struct OrderableDBInstanceOption: Codable, Equatable { case supportedEngineModes = "SupportedEngineModes" case supportedNetworkTypes = "SupportedNetworkTypes" case supportsClusters = "SupportsClusters" + case supportsDedicatedLogVolume = "SupportsDedicatedLogVolume" case supportsEnhancedMonitoring = "SupportsEnhancedMonitoring" case supportsGlobalDatabases = "SupportsGlobalDatabases" case supportsIAMDatabaseAuthentication = "SupportsIAMDatabaseAuthentication" @@ -11429,6 +11804,7 @@ public struct PendingModifiedValues: Codable, Equatable { public var dBInstanceClass: String? public var dBInstanceIdentifier: String? public var dBSubnetGroupName: String? + public var dedicatedLogVolume: BooleanOptional? public var engine: String? public var engineVersion: String? public var iAMDatabaseAuthenticationEnabled: BooleanOptional? @@ -11450,6 +11826,7 @@ public struct PendingModifiedValues: Codable, Equatable { dBInstanceClass: String? = nil, dBInstanceIdentifier: String? = nil, dBSubnetGroupName: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, engine: String? = nil, engineVersion: String? = nil, iAMDatabaseAuthenticationEnabled: BooleanOptional? = nil, @@ -11470,6 +11847,7 @@ public struct PendingModifiedValues: Codable, Equatable { self.dBInstanceClass = dBInstanceClass self.dBInstanceIdentifier = dBInstanceIdentifier self.dBSubnetGroupName = dBSubnetGroupName + self.dedicatedLogVolume = dedicatedLogVolume self.engine = engine self.engineVersion = engineVersion self.iAMDatabaseAuthenticationEnabled = iAMDatabaseAuthenticationEnabled @@ -11493,6 +11871,7 @@ public struct PendingModifiedValues: Codable, Equatable { case dBInstanceClass = "DBInstanceClass" case dBInstanceIdentifier = "DBInstanceIdentifier" case dBSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" case engine = "Engine" case engineVersion = "EngineVersion" case iAMDatabaseAuthenticationEnabled = "IAMDatabaseAuthenticationEnabled" @@ -12750,7 +13129,8 @@ public struct RestoreDBClusterToPointInTimeMessage: Codable, Equatable { public var restoreType: String? public var scalingConfiguration: ScalingConfiguration? public var serverlessV2ScalingConfiguration: ServerlessV2ScalingConfiguration? - public var sourceDBClusterIdentifier: String + public var sourceDBClusterIdentifier: String? + public var sourceDbClusterResourceId: String? public var storageType: String? public var tags: TagList? public var useLatestRestorableTime: Boolean? @@ -12778,7 +13158,8 @@ public struct RestoreDBClusterToPointInTimeMessage: Codable, Equatable { restoreType: String? = nil, scalingConfiguration: ScalingConfiguration? = nil, serverlessV2ScalingConfiguration: ServerlessV2ScalingConfiguration? = nil, - sourceDBClusterIdentifier: String, + sourceDBClusterIdentifier: String? = nil, + sourceDbClusterResourceId: String? = nil, storageType: String? = nil, tags: TagList? = nil, useLatestRestorableTime: Boolean? = nil, @@ -12806,6 +13187,7 @@ public struct RestoreDBClusterToPointInTimeMessage: Codable, Equatable { self.scalingConfiguration = scalingConfiguration self.serverlessV2ScalingConfiguration = serverlessV2ScalingConfiguration self.sourceDBClusterIdentifier = sourceDBClusterIdentifier + self.sourceDbClusterResourceId = sourceDbClusterResourceId self.storageType = storageType self.tags = tags self.useLatestRestorableTime = useLatestRestorableTime @@ -12836,6 +13218,7 @@ public struct RestoreDBClusterToPointInTimeMessage: Codable, Equatable { case scalingConfiguration = "ScalingConfiguration" case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case sourceDbClusterResourceId = "SourceDbClusterResourceId" case storageType = "StorageType" case tags = "Tags" case useLatestRestorableTime = "UseLatestRestorableTime" @@ -12894,6 +13277,7 @@ public struct RestoreDBInstanceFromDBSnapshotMessage: Codable, Equatable { public var dBParameterGroupName: String? public var dBSnapshotIdentifier: String? public var dBSubnetGroupName: String? + public var dedicatedLogVolume: BooleanOptional? public var deletionProtection: BooleanOptional? public var domain: String? public var domainAuthSecretArn: String? @@ -12934,6 +13318,7 @@ public struct RestoreDBInstanceFromDBSnapshotMessage: Codable, Equatable { dBParameterGroupName: String? = nil, dBSnapshotIdentifier: String? = nil, dBSubnetGroupName: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, deletionProtection: BooleanOptional? = nil, domain: String? = nil, domainAuthSecretArn: String? = nil, @@ -12973,6 +13358,7 @@ public struct RestoreDBInstanceFromDBSnapshotMessage: Codable, Equatable { self.dBParameterGroupName = dBParameterGroupName self.dBSnapshotIdentifier = dBSnapshotIdentifier self.dBSubnetGroupName = dBSubnetGroupName + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.domain = domain self.domainAuthSecretArn = domainAuthSecretArn @@ -13015,6 +13401,7 @@ public struct RestoreDBInstanceFromDBSnapshotMessage: Codable, Equatable { case dBParameterGroupName = "DBParameterGroupName" case dBSnapshotIdentifier = "DBSnapshotIdentifier" case dBSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case domain = "Domain" case domainAuthSecretArn = "DomainAuthSecretArn" @@ -13091,6 +13478,7 @@ public struct RestoreDBInstanceFromS3Message: Codable, Equatable { public var dBParameterGroupName: String? public var dBSecurityGroups: DBSecurityGroupNameList? public var dBSubnetGroupName: String? + public var dedicatedLogVolume: BooleanOptional? public var deletionProtection: BooleanOptional? public var enableCloudwatchLogsExports: LogTypeList? public var enableIAMDatabaseAuthentication: BooleanOptional? @@ -13140,6 +13528,7 @@ public struct RestoreDBInstanceFromS3Message: Codable, Equatable { dBParameterGroupName: String? = nil, dBSecurityGroups: DBSecurityGroupNameList? = nil, dBSubnetGroupName: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, deletionProtection: BooleanOptional? = nil, enableCloudwatchLogsExports: LogTypeList? = nil, enableIAMDatabaseAuthentication: BooleanOptional? = nil, @@ -13188,6 +13577,7 @@ public struct RestoreDBInstanceFromS3Message: Codable, Equatable { self.dBParameterGroupName = dBParameterGroupName self.dBSecurityGroups = dBSecurityGroups self.dBSubnetGroupName = dBSubnetGroupName + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.enableCloudwatchLogsExports = enableCloudwatchLogsExports self.enableIAMDatabaseAuthentication = enableIAMDatabaseAuthentication @@ -13239,6 +13629,7 @@ public struct RestoreDBInstanceFromS3Message: Codable, Equatable { case dBParameterGroupName = "DBParameterGroupName" case dBSecurityGroups = "DBSecurityGroups" case dBSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" @@ -13325,6 +13716,7 @@ public struct RestoreDBInstanceToPointInTimeMessage: Codable, Equatable { public var dBName: String? public var dBParameterGroupName: String? public var dBSubnetGroupName: String? + public var dedicatedLogVolume: BooleanOptional? public var deletionProtection: BooleanOptional? public var domain: String? public var domainAuthSecretArn: String? @@ -13369,6 +13761,7 @@ public struct RestoreDBInstanceToPointInTimeMessage: Codable, Equatable { dBName: String? = nil, dBParameterGroupName: String? = nil, dBSubnetGroupName: String? = nil, + dedicatedLogVolume: BooleanOptional? = nil, deletionProtection: BooleanOptional? = nil, domain: String? = nil, domainAuthSecretArn: String? = nil, @@ -13412,6 +13805,7 @@ public struct RestoreDBInstanceToPointInTimeMessage: Codable, Equatable { self.dBName = dBName self.dBParameterGroupName = dBParameterGroupName self.dBSubnetGroupName = dBSubnetGroupName + self.dedicatedLogVolume = dedicatedLogVolume self.deletionProtection = deletionProtection self.domain = domain self.domainAuthSecretArn = domainAuthSecretArn @@ -13458,6 +13852,7 @@ public struct RestoreDBInstanceToPointInTimeMessage: Codable, Equatable { case dBName = "DBName" case dBParameterGroupName = "DBParameterGroupName" case dBSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case domain = "Domain" case domainAuthSecretArn = "DomainAuthSecretArn" @@ -14500,6 +14895,59 @@ public struct SwitchoverDetail: Codable, Equatable { } } +public struct SwitchoverGlobalClusterMessage: Codable, Equatable { + public var globalClusterIdentifier: GlobalClusterIdentifier + public var targetDbClusterIdentifier: DBClusterIdentifier + + public init(globalClusterIdentifier: GlobalClusterIdentifier, + targetDbClusterIdentifier: DBClusterIdentifier) { + self.globalClusterIdentifier = globalClusterIdentifier + self.targetDbClusterIdentifier = targetDbClusterIdentifier + } + + enum CodingKeys: String, CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + case targetDbClusterIdentifier = "TargetDbClusterIdentifier" + } + + public func validate() throws { + try globalClusterIdentifier.validateAsGlobalClusterIdentifier() + try targetDbClusterIdentifier.validateAsDBClusterIdentifier() + } +} + +public struct SwitchoverGlobalClusterResult: Codable, Equatable { + public var globalCluster: GlobalCluster? + + public init(globalCluster: GlobalCluster? = nil) { + self.globalCluster = globalCluster + } + + enum CodingKeys: String, CodingKey { + case globalCluster = "GlobalCluster" + } + + public func validate() throws { + try globalCluster?.validate() + } +} + +public struct SwitchoverGlobalClusterResultForSwitchoverGlobalCluster: Codable, Equatable { + public var switchoverGlobalClusterResult: SwitchoverGlobalClusterResult + + public init(switchoverGlobalClusterResult: SwitchoverGlobalClusterResult) { + self.switchoverGlobalClusterResult = switchoverGlobalClusterResult + } + + enum CodingKeys: String, CodingKey { + case switchoverGlobalClusterResult = "SwitchoverGlobalClusterResult" + } + + public func validate() throws { + try switchoverGlobalClusterResult.validate() + } +} + public struct SwitchoverReadReplicaMessage: Codable, Equatable { public var dBInstanceIdentifier: String @@ -14644,6 +15092,7 @@ public struct UpgradeTarget: Codable, Equatable { public var supportedEngineModes: EngineModeList? public var supportsBabelfish: BooleanOptional? public var supportsGlobalDatabases: BooleanOptional? + public var supportsLocalWriteForwarding: BooleanOptional? public var supportsParallelQuery: BooleanOptional? public init(autoUpgrade: Boolean? = nil, @@ -14654,6 +15103,7 @@ public struct UpgradeTarget: Codable, Equatable { supportedEngineModes: EngineModeList? = nil, supportsBabelfish: BooleanOptional? = nil, supportsGlobalDatabases: BooleanOptional? = nil, + supportsLocalWriteForwarding: BooleanOptional? = nil, supportsParallelQuery: BooleanOptional? = nil) { self.autoUpgrade = autoUpgrade self.description = description @@ -14663,6 +15113,7 @@ public struct UpgradeTarget: Codable, Equatable { self.supportedEngineModes = supportedEngineModes self.supportsBabelfish = supportsBabelfish self.supportsGlobalDatabases = supportsGlobalDatabases + self.supportsLocalWriteForwarding = supportsLocalWriteForwarding self.supportsParallelQuery = supportsParallelQuery } @@ -14675,6 +15126,7 @@ public struct UpgradeTarget: Codable, Equatable { case supportedEngineModes = "SupportedEngineModes" case supportsBabelfish = "SupportsBabelfish" case supportsGlobalDatabases = "SupportsGlobalDatabases" + case supportsLocalWriteForwarding = "SupportsLocalWriteForwarding" case supportsParallelQuery = "SupportsParallelQuery" } @@ -14754,16 +15206,20 @@ public struct UserAuthConfigInfo: Codable, Equatable { public struct ValidDBInstanceModificationsMessage: Codable, Equatable { public var storage: ValidStorageOptionsList? + public var supportsDedicatedLogVolume: Boolean? public var validProcessorFeatures: AvailableProcessorFeatureList? public init(storage: ValidStorageOptionsList? = nil, + supportsDedicatedLogVolume: Boolean? = nil, validProcessorFeatures: AvailableProcessorFeatureList? = nil) { self.storage = storage + self.supportsDedicatedLogVolume = supportsDedicatedLogVolume self.validProcessorFeatures = validProcessorFeatures } enum CodingKeys: String, CodingKey { case storage = "Storage" + case supportsDedicatedLogVolume = "SupportsDedicatedLogVolume" case validProcessorFeatures = "ValidProcessorFeatures" } diff --git a/Sources/RDSModel/RDSModelTypes.swift b/Sources/RDSModel/RDSModelTypes.swift index 8c5c53e..c47153c 100644 --- a/Sources/RDSModel/RDSModelTypes.swift +++ b/Sources/RDSModel/RDSModelTypes.swift @@ -269,6 +269,11 @@ public enum CustomEngineVersionStatus: String, Codable, CustomStringConvertible public static let __default: CustomEngineVersionStatus = .available } +/** + Type definition for the DBClusterAutomatedBackupList field. + */ +public typealias DBClusterAutomatedBackupList = [DBClusterAutomatedBackup] + /** Type definition for the DBClusterBacktrackList field. */ @@ -601,6 +606,20 @@ public typealias GlobalClusterList = [GlobalCluster] */ public typealias GlobalClusterMemberList = [GlobalClusterMember] +/** + Enumeration restricting the values of the GlobalClusterMemberSynchronizationStatus field. + */ +public enum GlobalClusterMemberSynchronizationStatus: String, Codable, CustomStringConvertible { + case connected + case pendingResync = "pending-resync" + + public var description: String { + return rawValue + } + + public static let __default: GlobalClusterMemberSynchronizationStatus = .connected +} + /** Enumeration restricting the values of the IAMAuthMode field. */ @@ -641,6 +660,23 @@ public typealias KeyList = [String] */ public typealias KmsKeyIdOrArn = String +/** + Enumeration restricting the values of the LocalWriteForwardingStatus field. + */ +public enum LocalWriteForwardingStatus: String, Codable, CustomStringConvertible { + case disabled + case disabling + case enabled + case enabling + case requested + + public var description: String { + return rawValue + } + + public static let __default: LocalWriteForwardingStatus = .disabled +} + /** Type definition for the LogTypeList field. */ @@ -896,6 +932,11 @@ public typealias TagList = [Tag] */ public typealias TargetDBClusterParameterGroupName = String +/** + Type definition for the TargetDBInstanceClass field. + */ +public typealias TargetDBInstanceClass = String + /** Type definition for the TargetDBParameterGroupName field. */ @@ -1388,6 +1429,27 @@ extension RDSModel.TargetDBClusterParameterGroupName { } } +/** + Validation for the TargetDBInstanceClass field. +*/ +extension RDSModel.TargetDBInstanceClass { + public func validateAsTargetDBInstanceClass() throws { + if self.count < 5 { + throw RDSError.validationError(reason: "The provided value to TargetDBInstanceClass violated the minimum length constraint.") + } + + if self.count > 20 { + throw RDSError.validationError(reason: "The provided value to TargetDBInstanceClass violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "db\\.[0-9a-z]{2,6}\\.[0-9a-z]{4,9}", options: .regularExpression), + matchingRange == startIndex.. SchedulerError { + return error.asUnrecognizedSchedulerError() + } +} + +/** + AWS Client for the Scheduler service. + */ +public struct AWSSchedulerClient: SchedulerClientProtocol { + let httpClient: HTTPOperationsClient + let ownsHttpClients: Bool + let awsRegion: AWSRegion + let service: String + let target: String? + let retryConfiguration: HTTPClientRetryConfiguration + let retryOnErrorProvider: (SmokeHTTPClient.HTTPClientError) -> Bool + let credentialsProvider: CredentialsProvider + + public let reporting: InvocationReportingType + + let operationsReporting: SchedulerOperationsReporting + let invocationsReporting: SchedulerInvocationsReporting + + public init(credentialsProvider: CredentialsProvider, awsRegion: AWSRegion, + reporting: InvocationReportingType, + endpointHostName: String, + endpointPort: Int = 443, + requiresTLS: Bool? = nil, + service: String = "scheduler", + contentType: String = "application/x-amz-rest-json-1.1", + target: String? = nil, + connectionTimeoutSeconds: Int64 = 10, + retryConfiguration: HTTPClientRetryConfiguration = .default, + eventLoopProvider: HTTPClient.EventLoopGroupProvider = .createNew, + connectionPoolConfiguration: HTTPClient.Configuration.ConnectionPool? = nil, + reportingConfiguration: SmokeAWSClientReportingConfiguration + = SmokeAWSClientReportingConfiguration() ) { + let useTLS = requiresTLS ?? AWSHTTPClientDelegate.requiresTLS(forEndpointPort: endpointPort) + let clientDelegate = JSONAWSHttpClientDelegate(requiresTLS: useTLS, + errorTypeHTTPHeader: "x-amzn-ErrorType") + + self.httpClient = HTTPOperationsClient( + endpointHostName: endpointHostName, + endpointPort: endpointPort, + contentType: contentType, + clientDelegate: clientDelegate, + connectionTimeoutSeconds: connectionTimeoutSeconds, + eventLoopProvider: eventLoopProvider, + connectionPoolConfiguration: connectionPoolConfiguration) + self.ownsHttpClients = true + self.awsRegion = awsRegion + self.service = service + self.target = target + self.credentialsProvider = credentialsProvider + self.retryConfiguration = retryConfiguration + self.reporting = reporting + self.retryOnErrorProvider = { error in error.isRetriable() } + self.operationsReporting = SchedulerOperationsReporting(clientName: "AWSSchedulerClient", reportingConfiguration: reportingConfiguration) + self.invocationsReporting = SchedulerInvocationsReporting(reporting: reporting, operationsReporting: self.operationsReporting) + } + + internal init(credentialsProvider: CredentialsProvider, awsRegion: AWSRegion, + reporting: InvocationReportingType, + httpClient: HTTPOperationsClient, + service: String, + target: String?, + retryOnErrorProvider: @escaping (SmokeHTTPClient.HTTPClientError) -> Bool, + retryConfiguration: HTTPClientRetryConfiguration, + operationsReporting: SchedulerOperationsReporting) { + self.httpClient = httpClient + self.ownsHttpClients = false + self.awsRegion = awsRegion + self.service = service + self.target = target + self.credentialsProvider = credentialsProvider + self.retryConfiguration = retryConfiguration + self.reporting = reporting + self.retryOnErrorProvider = retryOnErrorProvider + self.operationsReporting = operationsReporting + self.invocationsReporting = SchedulerInvocationsReporting(reporting: reporting, operationsReporting: self.operationsReporting) + } + + /** + Gracefully shuts down this client. This function is idempotent and + will handle being called multiple times. Will block until shutdown is complete. + */ + public func syncShutdown() throws { + if self.ownsHttpClients { + try self.httpClient.syncShutdown() + } + } + + // renamed `syncShutdown` to make it clearer this version of shutdown will block. + @available(*, deprecated, renamed: "syncShutdown") + public func close() throws { + if self.ownsHttpClients { + try self.httpClient.close() + } + } + + /** + Gracefully shuts down this client. This function is idempotent and + will handle being called multiple times. Will return when shutdown is complete. + */ + #if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + public func shutdown() async throws { + if self.ownsHttpClients { + try await self.httpClient.shutdown() + } + } + #endif + + /** + Invokes the CreateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - completion: The CreateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleAsync( + input: SchedulerModel.CreateScheduleInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.createSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.createSchedule, + handlerDelegate: handlerDelegate) + let requestInput = CreateScheduleOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the CreateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleSync( + input: SchedulerModel.CreateScheduleInput) throws -> SchedulerModel.CreateScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.createSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.createSchedule, + handlerDelegate: handlerDelegate) + let requestInput = CreateScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the CreateScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - completion: The CreateScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroupAsync( + input: SchedulerModel.CreateScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.createScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.createScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = CreateScheduleGroupOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the CreateScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroupSync( + input: SchedulerModel.CreateScheduleGroupInput) throws -> SchedulerModel.CreateScheduleGroupOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.createScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.createScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = CreateScheduleGroupOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the DeleteSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - completion: The DeleteScheduleOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleAsync( + input: SchedulerModel.DeleteScheduleInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.deleteSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteSchedule, + handlerDelegate: handlerDelegate) + let requestInput = DeleteScheduleOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .DELETE, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the DeleteSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleSync( + input: SchedulerModel.DeleteScheduleInput) throws -> SchedulerModel.DeleteScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.deleteSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteSchedule, + handlerDelegate: handlerDelegate) + let requestInput = DeleteScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .DELETE, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the DeleteScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - completion: The DeleteScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroupAsync( + input: SchedulerModel.DeleteScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.deleteScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = DeleteScheduleGroupOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .DELETE, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the DeleteScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroupSync( + input: SchedulerModel.DeleteScheduleGroupInput) throws -> SchedulerModel.DeleteScheduleGroupOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.deleteScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = DeleteScheduleGroupOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .DELETE, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the GetSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - completion: The GetScheduleOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleAsync( + input: SchedulerModel.GetScheduleInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.getSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getSchedule, + handlerDelegate: handlerDelegate) + let requestInput = GetScheduleOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .GET, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the GetSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleSync( + input: SchedulerModel.GetScheduleInput) throws -> SchedulerModel.GetScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.getSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getSchedule, + handlerDelegate: handlerDelegate) + let requestInput = GetScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the GetScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - completion: The GetScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroupAsync( + input: SchedulerModel.GetScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.getScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = GetScheduleGroupOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .GET, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the GetScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroupSync( + input: SchedulerModel.GetScheduleGroupInput) throws -> SchedulerModel.GetScheduleGroupOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.getScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = GetScheduleGroupOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the ListScheduleGroups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - completion: The ListScheduleGroupsOutput object or an error will be passed to this + callback when the operation is complete. The ListScheduleGroupsOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, throttling, validation. + */ + public func listScheduleGroupsAsync( + input: SchedulerModel.ListScheduleGroupsInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listScheduleGroups.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listScheduleGroups, + handlerDelegate: handlerDelegate) + let requestInput = ListScheduleGroupsOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedule-groups", + httpMethod: .GET, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the ListScheduleGroups operation waiting for the response before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + public func listScheduleGroupsSync( + input: SchedulerModel.ListScheduleGroupsInput) throws -> SchedulerModel.ListScheduleGroupsOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listScheduleGroups.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listScheduleGroups, + handlerDelegate: handlerDelegate) + let requestInput = ListScheduleGroupsOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedule-groups", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the ListSchedules operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - completion: The ListSchedulesOutput object or an error will be passed to this + callback when the operation is complete. The ListSchedulesOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedulesAsync( + input: SchedulerModel.ListSchedulesInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listSchedules.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listSchedules, + handlerDelegate: handlerDelegate) + let requestInput = ListSchedulesOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedules", + httpMethod: .GET, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the ListSchedules operation waiting for the response before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedulesSync( + input: SchedulerModel.ListSchedulesInput) throws -> SchedulerModel.ListSchedulesOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listSchedules.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listSchedules, + handlerDelegate: handlerDelegate) + let requestInput = ListSchedulesOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedules", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the ListTagsForResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - completion: The ListTagsForResourceOutput object or an error will be passed to this + callback when the operation is complete. The ListTagsForResourceOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResourceAsync( + input: SchedulerModel.ListTagsForResourceInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listTagsForResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listTagsForResource, + handlerDelegate: handlerDelegate) + let requestInput = ListTagsForResourceOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .GET, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the ListTagsForResource operation waiting for the response before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResourceSync( + input: SchedulerModel.ListTagsForResourceInput) throws -> SchedulerModel.ListTagsForResourceOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listTagsForResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listTagsForResource, + handlerDelegate: handlerDelegate) + let requestInput = ListTagsForResourceOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the TagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - completion: The TagResourceOutput object or an error will be passed to this + callback when the operation is complete. The TagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResourceAsync( + input: SchedulerModel.TagResourceInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.tagResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.tagResource, + handlerDelegate: handlerDelegate) + let requestInput = TagResourceOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .POST, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the TagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResourceSync( + input: SchedulerModel.TagResourceInput) throws -> SchedulerModel.TagResourceOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.tagResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.tagResource, + handlerDelegate: handlerDelegate) + let requestInput = TagResourceOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the UntagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - completion: The UntagResourceOutput object or an error will be passed to this + callback when the operation is complete. The UntagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResourceAsync( + input: SchedulerModel.UntagResourceInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.untagResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.untagResource, + handlerDelegate: handlerDelegate) + let requestInput = UntagResourceOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .DELETE, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the UntagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResourceSync( + input: SchedulerModel.UntagResourceInput) throws -> SchedulerModel.UntagResourceOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.untagResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.untagResource, + handlerDelegate: handlerDelegate) + let requestInput = UntagResourceOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .DELETE, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the UpdateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - completion: The UpdateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The UpdateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateScheduleAsync( + input: SchedulerModel.UpdateScheduleInput, + completion: @escaping (Result) -> ()) throws { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.updateSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.updateSchedule, + handlerDelegate: handlerDelegate) + let requestInput = UpdateScheduleOperationHTTPRequestInput(encodable: input) + + _ = try httpClient.executeOperationAsyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .PUT, + input: requestInput, + completion: completion, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } + + /** + Invokes the UpdateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateScheduleSync( + input: SchedulerModel.UpdateScheduleInput) throws -> SchedulerModel.UpdateScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.updateSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.updateSchedule, + handlerDelegate: handlerDelegate) + let requestInput = UpdateScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try httpClient.executeSyncRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .PUT, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + #if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + + /** + Invokes the CreateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createSchedule( + input: SchedulerModel.CreateScheduleInput) async throws -> SchedulerModel.CreateScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.createSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.createSchedule, + handlerDelegate: handlerDelegate) + let requestInput = CreateScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the CreateScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroup( + input: SchedulerModel.CreateScheduleGroupInput) async throws -> SchedulerModel.CreateScheduleGroupOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.createScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.createScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = CreateScheduleGroupOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the DeleteSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteSchedule( + input: SchedulerModel.DeleteScheduleInput) async throws -> SchedulerModel.DeleteScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.deleteSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteSchedule, + handlerDelegate: handlerDelegate) + let requestInput = DeleteScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .DELETE, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the DeleteScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroup( + input: SchedulerModel.DeleteScheduleGroupInput) async throws -> SchedulerModel.DeleteScheduleGroupOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.deleteScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.deleteScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = DeleteScheduleGroupOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .DELETE, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the GetSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getSchedule( + input: SchedulerModel.GetScheduleInput) async throws -> SchedulerModel.GetScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.getSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getSchedule, + handlerDelegate: handlerDelegate) + let requestInput = GetScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the GetScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroup( + input: SchedulerModel.GetScheduleGroupInput) async throws -> SchedulerModel.GetScheduleGroupOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.getScheduleGroup.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.getScheduleGroup, + handlerDelegate: handlerDelegate) + let requestInput = GetScheduleGroupOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedule-groups/{Name}", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the ListScheduleGroups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + public func listScheduleGroups( + input: SchedulerModel.ListScheduleGroupsInput) async throws -> SchedulerModel.ListScheduleGroupsOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listScheduleGroups.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listScheduleGroups, + handlerDelegate: handlerDelegate) + let requestInput = ListScheduleGroupsOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedule-groups", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the ListSchedules operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedules( + input: SchedulerModel.ListSchedulesInput) async throws -> SchedulerModel.ListSchedulesOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listSchedules.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listSchedules, + handlerDelegate: handlerDelegate) + let requestInput = ListSchedulesOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedules", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the ListTagsForResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResource( + input: SchedulerModel.ListTagsForResourceInput) async throws -> SchedulerModel.ListTagsForResourceOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.listTagsForResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listTagsForResource, + handlerDelegate: handlerDelegate) + let requestInput = ListTagsForResourceOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .GET, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the TagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResource( + input: SchedulerModel.TagResourceInput) async throws -> SchedulerModel.TagResourceOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.tagResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.tagResource, + handlerDelegate: handlerDelegate) + let requestInput = TagResourceOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .POST, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the UntagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResource( + input: SchedulerModel.UntagResourceInput) async throws -> SchedulerModel.UntagResourceOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.untagResource.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.untagResource, + handlerDelegate: handlerDelegate) + let requestInput = UntagResourceOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/tags/{ResourceArn}", + httpMethod: .DELETE, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + + /** + Invokes the UpdateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateSchedule( + input: SchedulerModel.UpdateScheduleInput) async throws -> SchedulerModel.UpdateScheduleOutput { + let handlerDelegate = AWSClientInvocationDelegate( + credentialsProvider: credentialsProvider, + awsRegion: awsRegion, + service: service, + operation: SchedulerModelOperations.updateSchedule.rawValue, + target: target) + + let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.updateSchedule, + handlerDelegate: handlerDelegate) + let requestInput = UpdateScheduleOperationHTTPRequestInput(encodable: input) + + do { + return try await httpClient.executeRetriableWithOutput( + endpointPath: "/schedules/{Name}", + httpMethod: .PUT, + input: requestInput, + invocationContext: invocationContext, + retryConfiguration: retryConfiguration, + retryOnError: retryOnErrorProvider) + } catch { + let typedError: SchedulerError = error.asTypedError() + throw typedError + } + } + #endif +} diff --git a/Sources/SchedulerClient/AWSSchedulerClientGenerator.swift b/Sources/SchedulerClient/AWSSchedulerClientGenerator.swift new file mode 100644 index 0000000..d72812e --- /dev/null +++ b/Sources/SchedulerClient/AWSSchedulerClientGenerator.swift @@ -0,0 +1,141 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// AWSSchedulerClientGenerator.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient +import SmokeAWSHttp +import NIO +import NIOHTTP1 +import AsyncHTTPClient +import Logging + +/** + AWS Client Generator for the Scheduler service. + */ +public struct AWSSchedulerClientGenerator { + let httpClient: HTTPOperationsClient + let awsRegion: AWSRegion + let service: String + let target: String? + let retryConfiguration: HTTPClientRetryConfiguration + let retryOnErrorProvider: (SmokeHTTPClient.HTTPClientError) -> Bool + let credentialsProvider: CredentialsProvider + + let operationsReporting: SchedulerOperationsReporting + + public init(credentialsProvider: CredentialsProvider, awsRegion: AWSRegion, + endpointHostName: String, + endpointPort: Int = 443, + requiresTLS: Bool? = nil, + service: String = "scheduler", + contentType: String = "application/x-amz-rest-json-1.1", + target: String? = nil, + connectionTimeoutSeconds: Int64 = 10, + retryConfiguration: HTTPClientRetryConfiguration = .default, + eventLoopProvider: HTTPClient.EventLoopGroupProvider = .createNew, + connectionPoolConfiguration: HTTPClient.Configuration.ConnectionPool? = nil, + reportingConfiguration: SmokeAWSClientReportingConfiguration + = SmokeAWSClientReportingConfiguration() ) { + let useTLS = requiresTLS ?? AWSHTTPClientDelegate.requiresTLS(forEndpointPort: endpointPort) + let clientDelegate = JSONAWSHttpClientDelegate(requiresTLS: useTLS, + errorTypeHTTPHeader: "x-amzn-ErrorType") + + self.httpClient = HTTPOperationsClient( + endpointHostName: endpointHostName, + endpointPort: endpointPort, + contentType: contentType, + clientDelegate: clientDelegate, + connectionTimeoutSeconds: connectionTimeoutSeconds, + eventLoopProvider: eventLoopProvider, + connectionPoolConfiguration: connectionPoolConfiguration) + self.awsRegion = awsRegion + self.service = service + self.target = target + self.credentialsProvider = credentialsProvider + self.retryConfiguration = retryConfiguration + self.retryOnErrorProvider = { error in error.isRetriable() } + self.operationsReporting = SchedulerOperationsReporting(clientName: "AWSSchedulerClient", reportingConfiguration: reportingConfiguration) + } + + /** + Gracefully shuts down this client. This function is idempotent and + will handle being called multiple times. Will block until shutdown is complete. + */ + public func syncShutdown() throws { + try self.httpClient.syncShutdown() + } + + // renamed `syncShutdown` to make it clearer this version of shutdown will block. + @available(*, deprecated, renamed: "syncShutdown") + public func close() throws { + try self.httpClient.close() + } + + /** + Gracefully shuts down this client. This function is idempotent and + will handle being called multiple times. Will return when shutdown is complete. + */ + #if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + public func shutdown() async throws { + try await self.httpClient.shutdown() + } + #endif + + public func with( + reporting: NewInvocationReportingType) -> AWSSchedulerClient { + return AWSSchedulerClient( + credentialsProvider: self.credentialsProvider, + awsRegion: self.awsRegion, + reporting: reporting, + httpClient: self.httpClient, + service: self.service, + target: self.target, + retryOnErrorProvider: self.retryOnErrorProvider, + retryConfiguration: self.retryConfiguration, + operationsReporting: self.operationsReporting) + } + + public func with( + logger: Logging.Logger, + internalRequestId: String = "none", + traceContext: NewTraceContextType) -> AWSSchedulerClient> { + let reporting = StandardHTTPClientCoreInvocationReporting( + logger: logger, + internalRequestId: internalRequestId, + traceContext: traceContext) + + return with(reporting: reporting) + } + + public func with( + logger: Logging.Logger, + internalRequestId: String = "none") -> AWSSchedulerClient> { + let reporting = StandardHTTPClientCoreInvocationReporting( + logger: logger, + internalRequestId: internalRequestId, + traceContext: AWSClientInvocationTraceContext()) + + return with(reporting: reporting) + } +} diff --git a/Sources/SchedulerClient/MockSchedulerClient.swift b/Sources/SchedulerClient/MockSchedulerClient.swift new file mode 100644 index 0000000..96091fc --- /dev/null +++ b/Sources/SchedulerClient/MockSchedulerClient.swift @@ -0,0 +1,591 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// MockSchedulerClient.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient + +/** + Mock Client for the Scheduler service by default returns the `__default` property of its return type. + */ +public struct MockSchedulerClient: SchedulerClientProtocol { + let createScheduleAsyncOverride: CreateScheduleAsyncType? + let createScheduleSyncOverride: CreateScheduleSyncType? + let createScheduleGroupAsyncOverride: CreateScheduleGroupAsyncType? + let createScheduleGroupSyncOverride: CreateScheduleGroupSyncType? + let deleteScheduleAsyncOverride: DeleteScheduleAsyncType? + let deleteScheduleSyncOverride: DeleteScheduleSyncType? + let deleteScheduleGroupAsyncOverride: DeleteScheduleGroupAsyncType? + let deleteScheduleGroupSyncOverride: DeleteScheduleGroupSyncType? + let getScheduleAsyncOverride: GetScheduleAsyncType? + let getScheduleSyncOverride: GetScheduleSyncType? + let getScheduleGroupAsyncOverride: GetScheduleGroupAsyncType? + let getScheduleGroupSyncOverride: GetScheduleGroupSyncType? + let listScheduleGroupsAsyncOverride: ListScheduleGroupsAsyncType? + let listScheduleGroupsSyncOverride: ListScheduleGroupsSyncType? + let listSchedulesAsyncOverride: ListSchedulesAsyncType? + let listSchedulesSyncOverride: ListSchedulesSyncType? + let listTagsForResourceAsyncOverride: ListTagsForResourceAsyncType? + let listTagsForResourceSyncOverride: ListTagsForResourceSyncType? + let tagResourceAsyncOverride: TagResourceAsyncType? + let tagResourceSyncOverride: TagResourceSyncType? + let untagResourceAsyncOverride: UntagResourceAsyncType? + let untagResourceSyncOverride: UntagResourceSyncType? + let updateScheduleAsyncOverride: UpdateScheduleAsyncType? + let updateScheduleSyncOverride: UpdateScheduleSyncType? + + /** + Initializer that creates an instance of this clients. The behavior of individual + functions can be overridden by passing them to this initializer. + */ + public init( + createScheduleAsync: CreateScheduleAsyncType? = nil, + createScheduleSync: CreateScheduleSyncType? = nil, + createScheduleGroupAsync: CreateScheduleGroupAsyncType? = nil, + createScheduleGroupSync: CreateScheduleGroupSyncType? = nil, + deleteScheduleAsync: DeleteScheduleAsyncType? = nil, + deleteScheduleSync: DeleteScheduleSyncType? = nil, + deleteScheduleGroupAsync: DeleteScheduleGroupAsyncType? = nil, + deleteScheduleGroupSync: DeleteScheduleGroupSyncType? = nil, + getScheduleAsync: GetScheduleAsyncType? = nil, + getScheduleSync: GetScheduleSyncType? = nil, + getScheduleGroupAsync: GetScheduleGroupAsyncType? = nil, + getScheduleGroupSync: GetScheduleGroupSyncType? = nil, + listScheduleGroupsAsync: ListScheduleGroupsAsyncType? = nil, + listScheduleGroupsSync: ListScheduleGroupsSyncType? = nil, + listSchedulesAsync: ListSchedulesAsyncType? = nil, + listSchedulesSync: ListSchedulesSyncType? = nil, + listTagsForResourceAsync: ListTagsForResourceAsyncType? = nil, + listTagsForResourceSync: ListTagsForResourceSyncType? = nil, + tagResourceAsync: TagResourceAsyncType? = nil, + tagResourceSync: TagResourceSyncType? = nil, + untagResourceAsync: UntagResourceAsyncType? = nil, + untagResourceSync: UntagResourceSyncType? = nil, + updateScheduleAsync: UpdateScheduleAsyncType? = nil, + updateScheduleSync: UpdateScheduleSyncType? = nil) { + self.createScheduleAsyncOverride = createScheduleAsync + self.createScheduleSyncOverride = createScheduleSync + self.createScheduleGroupAsyncOverride = createScheduleGroupAsync + self.createScheduleGroupSyncOverride = createScheduleGroupSync + self.deleteScheduleAsyncOverride = deleteScheduleAsync + self.deleteScheduleSyncOverride = deleteScheduleSync + self.deleteScheduleGroupAsyncOverride = deleteScheduleGroupAsync + self.deleteScheduleGroupSyncOverride = deleteScheduleGroupSync + self.getScheduleAsyncOverride = getScheduleAsync + self.getScheduleSyncOverride = getScheduleSync + self.getScheduleGroupAsyncOverride = getScheduleGroupAsync + self.getScheduleGroupSyncOverride = getScheduleGroupSync + self.listScheduleGroupsAsyncOverride = listScheduleGroupsAsync + self.listScheduleGroupsSyncOverride = listScheduleGroupsSync + self.listSchedulesAsyncOverride = listSchedulesAsync + self.listSchedulesSyncOverride = listSchedulesSync + self.listTagsForResourceAsyncOverride = listTagsForResourceAsync + self.listTagsForResourceSyncOverride = listTagsForResourceSync + self.tagResourceAsyncOverride = tagResourceAsync + self.tagResourceSyncOverride = tagResourceSync + self.untagResourceAsyncOverride = untagResourceAsync + self.untagResourceSyncOverride = untagResourceSync + self.updateScheduleAsyncOverride = updateScheduleAsync + self.updateScheduleSyncOverride = updateScheduleSync + } + + /** + Invokes the CreateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - completion: The CreateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleAsync( + input: SchedulerModel.CreateScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let createScheduleAsyncOverride = createScheduleAsyncOverride { + return try createScheduleAsyncOverride(input, completion) + } + + let result = CreateScheduleOutput.__default + + completion(.success(result)) + } + + /** + Invokes the CreateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleSync( + input: SchedulerModel.CreateScheduleInput) throws -> SchedulerModel.CreateScheduleOutput { + if let createScheduleSyncOverride = createScheduleSyncOverride { + return try createScheduleSyncOverride(input) + } + + return CreateScheduleOutput.__default + } + + /** + Invokes the CreateScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - completion: The CreateScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroupAsync( + input: SchedulerModel.CreateScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + if let createScheduleGroupAsyncOverride = createScheduleGroupAsyncOverride { + return try createScheduleGroupAsyncOverride(input, completion) + } + + let result = CreateScheduleGroupOutput.__default + + completion(.success(result)) + } + + /** + Invokes the CreateScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroupSync( + input: SchedulerModel.CreateScheduleGroupInput) throws -> SchedulerModel.CreateScheduleGroupOutput { + if let createScheduleGroupSyncOverride = createScheduleGroupSyncOverride { + return try createScheduleGroupSyncOverride(input) + } + + return CreateScheduleGroupOutput.__default + } + + /** + Invokes the DeleteSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - completion: The DeleteScheduleOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleAsync( + input: SchedulerModel.DeleteScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let deleteScheduleAsyncOverride = deleteScheduleAsyncOverride { + return try deleteScheduleAsyncOverride(input, completion) + } + + let result = DeleteScheduleOutput.__default + + completion(.success(result)) + } + + /** + Invokes the DeleteSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleSync( + input: SchedulerModel.DeleteScheduleInput) throws -> SchedulerModel.DeleteScheduleOutput { + if let deleteScheduleSyncOverride = deleteScheduleSyncOverride { + return try deleteScheduleSyncOverride(input) + } + + return DeleteScheduleOutput.__default + } + + /** + Invokes the DeleteScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - completion: The DeleteScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroupAsync( + input: SchedulerModel.DeleteScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + if let deleteScheduleGroupAsyncOverride = deleteScheduleGroupAsyncOverride { + return try deleteScheduleGroupAsyncOverride(input, completion) + } + + let result = DeleteScheduleGroupOutput.__default + + completion(.success(result)) + } + + /** + Invokes the DeleteScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroupSync( + input: SchedulerModel.DeleteScheduleGroupInput) throws -> SchedulerModel.DeleteScheduleGroupOutput { + if let deleteScheduleGroupSyncOverride = deleteScheduleGroupSyncOverride { + return try deleteScheduleGroupSyncOverride(input) + } + + return DeleteScheduleGroupOutput.__default + } + + /** + Invokes the GetSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - completion: The GetScheduleOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleAsync( + input: SchedulerModel.GetScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let getScheduleAsyncOverride = getScheduleAsyncOverride { + return try getScheduleAsyncOverride(input, completion) + } + + let result = GetScheduleOutput.__default + + completion(.success(result)) + } + + /** + Invokes the GetSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleSync( + input: SchedulerModel.GetScheduleInput) throws -> SchedulerModel.GetScheduleOutput { + if let getScheduleSyncOverride = getScheduleSyncOverride { + return try getScheduleSyncOverride(input) + } + + return GetScheduleOutput.__default + } + + /** + Invokes the GetScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - completion: The GetScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroupAsync( + input: SchedulerModel.GetScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + if let getScheduleGroupAsyncOverride = getScheduleGroupAsyncOverride { + return try getScheduleGroupAsyncOverride(input, completion) + } + + let result = GetScheduleGroupOutput.__default + + completion(.success(result)) + } + + /** + Invokes the GetScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroupSync( + input: SchedulerModel.GetScheduleGroupInput) throws -> SchedulerModel.GetScheduleGroupOutput { + if let getScheduleGroupSyncOverride = getScheduleGroupSyncOverride { + return try getScheduleGroupSyncOverride(input) + } + + return GetScheduleGroupOutput.__default + } + + /** + Invokes the ListScheduleGroups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - completion: The ListScheduleGroupsOutput object or an error will be passed to this + callback when the operation is complete. The ListScheduleGroupsOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, throttling, validation. + */ + public func listScheduleGroupsAsync( + input: SchedulerModel.ListScheduleGroupsInput, + completion: @escaping (Result) -> ()) throws { + if let listScheduleGroupsAsyncOverride = listScheduleGroupsAsyncOverride { + return try listScheduleGroupsAsyncOverride(input, completion) + } + + let result = ListScheduleGroupsOutput.__default + + completion(.success(result)) + } + + /** + Invokes the ListScheduleGroups operation waiting for the response before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + public func listScheduleGroupsSync( + input: SchedulerModel.ListScheduleGroupsInput) throws -> SchedulerModel.ListScheduleGroupsOutput { + if let listScheduleGroupsSyncOverride = listScheduleGroupsSyncOverride { + return try listScheduleGroupsSyncOverride(input) + } + + return ListScheduleGroupsOutput.__default + } + + /** + Invokes the ListSchedules operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - completion: The ListSchedulesOutput object or an error will be passed to this + callback when the operation is complete. The ListSchedulesOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedulesAsync( + input: SchedulerModel.ListSchedulesInput, + completion: @escaping (Result) -> ()) throws { + if let listSchedulesAsyncOverride = listSchedulesAsyncOverride { + return try listSchedulesAsyncOverride(input, completion) + } + + let result = ListSchedulesOutput.__default + + completion(.success(result)) + } + + /** + Invokes the ListSchedules operation waiting for the response before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedulesSync( + input: SchedulerModel.ListSchedulesInput) throws -> SchedulerModel.ListSchedulesOutput { + if let listSchedulesSyncOverride = listSchedulesSyncOverride { + return try listSchedulesSyncOverride(input) + } + + return ListSchedulesOutput.__default + } + + /** + Invokes the ListTagsForResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - completion: The ListTagsForResourceOutput object or an error will be passed to this + callback when the operation is complete. The ListTagsForResourceOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResourceAsync( + input: SchedulerModel.ListTagsForResourceInput, + completion: @escaping (Result) -> ()) throws { + if let listTagsForResourceAsyncOverride = listTagsForResourceAsyncOverride { + return try listTagsForResourceAsyncOverride(input, completion) + } + + let result = ListTagsForResourceOutput.__default + + completion(.success(result)) + } + + /** + Invokes the ListTagsForResource operation waiting for the response before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResourceSync( + input: SchedulerModel.ListTagsForResourceInput) throws -> SchedulerModel.ListTagsForResourceOutput { + if let listTagsForResourceSyncOverride = listTagsForResourceSyncOverride { + return try listTagsForResourceSyncOverride(input) + } + + return ListTagsForResourceOutput.__default + } + + /** + Invokes the TagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - completion: The TagResourceOutput object or an error will be passed to this + callback when the operation is complete. The TagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResourceAsync( + input: SchedulerModel.TagResourceInput, + completion: @escaping (Result) -> ()) throws { + if let tagResourceAsyncOverride = tagResourceAsyncOverride { + return try tagResourceAsyncOverride(input, completion) + } + + let result = TagResourceOutput.__default + + completion(.success(result)) + } + + /** + Invokes the TagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResourceSync( + input: SchedulerModel.TagResourceInput) throws -> SchedulerModel.TagResourceOutput { + if let tagResourceSyncOverride = tagResourceSyncOverride { + return try tagResourceSyncOverride(input) + } + + return TagResourceOutput.__default + } + + /** + Invokes the UntagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - completion: The UntagResourceOutput object or an error will be passed to this + callback when the operation is complete. The UntagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResourceAsync( + input: SchedulerModel.UntagResourceInput, + completion: @escaping (Result) -> ()) throws { + if let untagResourceAsyncOverride = untagResourceAsyncOverride { + return try untagResourceAsyncOverride(input, completion) + } + + let result = UntagResourceOutput.__default + + completion(.success(result)) + } + + /** + Invokes the UntagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResourceSync( + input: SchedulerModel.UntagResourceInput) throws -> SchedulerModel.UntagResourceOutput { + if let untagResourceSyncOverride = untagResourceSyncOverride { + return try untagResourceSyncOverride(input) + } + + return UntagResourceOutput.__default + } + + /** + Invokes the UpdateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - completion: The UpdateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The UpdateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateScheduleAsync( + input: SchedulerModel.UpdateScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let updateScheduleAsyncOverride = updateScheduleAsyncOverride { + return try updateScheduleAsyncOverride(input, completion) + } + + let result = UpdateScheduleOutput.__default + + completion(.success(result)) + } + + /** + Invokes the UpdateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateScheduleSync( + input: SchedulerModel.UpdateScheduleInput) throws -> SchedulerModel.UpdateScheduleOutput { + if let updateScheduleSyncOverride = updateScheduleSyncOverride { + return try updateScheduleSyncOverride(input) + } + + return UpdateScheduleOutput.__default + } +} diff --git a/Sources/SchedulerClient/MockSchedulerClientV2.swift b/Sources/SchedulerClient/MockSchedulerClientV2.swift new file mode 100644 index 0000000..dc44926 --- /dev/null +++ b/Sources/SchedulerClient/MockSchedulerClientV2.swift @@ -0,0 +1,293 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// MockSchedulerClientV2.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient + +/** + Mock Client for the Scheduler service by default returns the `__default` property of its return type. + */ +public struct MockSchedulerClientV2: SchedulerClientProtocolV2 { +#if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + let createScheduleOverride: CreateScheduleFunctionType? + let createScheduleGroupOverride: CreateScheduleGroupFunctionType? + let deleteScheduleOverride: DeleteScheduleFunctionType? + let deleteScheduleGroupOverride: DeleteScheduleGroupFunctionType? + let getScheduleOverride: GetScheduleFunctionType? + let getScheduleGroupOverride: GetScheduleGroupFunctionType? + let listScheduleGroupsOverride: ListScheduleGroupsFunctionType? + let listSchedulesOverride: ListSchedulesFunctionType? + let listTagsForResourceOverride: ListTagsForResourceFunctionType? + let tagResourceOverride: TagResourceFunctionType? + let untagResourceOverride: UntagResourceFunctionType? + let updateScheduleOverride: UpdateScheduleFunctionType? + + /** + Initializer that creates an instance of this clients. The behavior of individual + functions can be overridden by passing them to this initializer. + */ + public init( + createSchedule: CreateScheduleFunctionType? = nil, + createScheduleGroup: CreateScheduleGroupFunctionType? = nil, + deleteSchedule: DeleteScheduleFunctionType? = nil, + deleteScheduleGroup: DeleteScheduleGroupFunctionType? = nil, + getSchedule: GetScheduleFunctionType? = nil, + getScheduleGroup: GetScheduleGroupFunctionType? = nil, + listScheduleGroups: ListScheduleGroupsFunctionType? = nil, + listSchedules: ListSchedulesFunctionType? = nil, + listTagsForResource: ListTagsForResourceFunctionType? = nil, + tagResource: TagResourceFunctionType? = nil, + untagResource: UntagResourceFunctionType? = nil, + updateSchedule: UpdateScheduleFunctionType? = nil) { + self.createScheduleOverride = createSchedule + self.createScheduleGroupOverride = createScheduleGroup + self.deleteScheduleOverride = deleteSchedule + self.deleteScheduleGroupOverride = deleteScheduleGroup + self.getScheduleOverride = getSchedule + self.getScheduleGroupOverride = getScheduleGroup + self.listScheduleGroupsOverride = listScheduleGroups + self.listSchedulesOverride = listSchedules + self.listTagsForResourceOverride = listTagsForResource + self.tagResourceOverride = tagResource + self.untagResourceOverride = untagResource + self.updateScheduleOverride = updateSchedule + } + + /** + Invokes the CreateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createSchedule( + input: SchedulerModel.CreateScheduleInput) async throws -> SchedulerModel.CreateScheduleOutput { + if let createScheduleOverride = createScheduleOverride { + return try await createScheduleOverride(input) + } + + return CreateScheduleOutput.__default + } + + /** + Invokes the CreateScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroup( + input: SchedulerModel.CreateScheduleGroupInput) async throws -> SchedulerModel.CreateScheduleGroupOutput { + if let createScheduleGroupOverride = createScheduleGroupOverride { + return try await createScheduleGroupOverride(input) + } + + return CreateScheduleGroupOutput.__default + } + + /** + Invokes the DeleteSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteSchedule( + input: SchedulerModel.DeleteScheduleInput) async throws -> SchedulerModel.DeleteScheduleOutput { + if let deleteScheduleOverride = deleteScheduleOverride { + return try await deleteScheduleOverride(input) + } + + return DeleteScheduleOutput.__default + } + + /** + Invokes the DeleteScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroup( + input: SchedulerModel.DeleteScheduleGroupInput) async throws -> SchedulerModel.DeleteScheduleGroupOutput { + if let deleteScheduleGroupOverride = deleteScheduleGroupOverride { + return try await deleteScheduleGroupOverride(input) + } + + return DeleteScheduleGroupOutput.__default + } + + /** + Invokes the GetSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getSchedule( + input: SchedulerModel.GetScheduleInput) async throws -> SchedulerModel.GetScheduleOutput { + if let getScheduleOverride = getScheduleOverride { + return try await getScheduleOverride(input) + } + + return GetScheduleOutput.__default + } + + /** + Invokes the GetScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroup( + input: SchedulerModel.GetScheduleGroupInput) async throws -> SchedulerModel.GetScheduleGroupOutput { + if let getScheduleGroupOverride = getScheduleGroupOverride { + return try await getScheduleGroupOverride(input) + } + + return GetScheduleGroupOutput.__default + } + + /** + Invokes the ListScheduleGroups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + public func listScheduleGroups( + input: SchedulerModel.ListScheduleGroupsInput) async throws -> SchedulerModel.ListScheduleGroupsOutput { + if let listScheduleGroupsOverride = listScheduleGroupsOverride { + return try await listScheduleGroupsOverride(input) + } + + return ListScheduleGroupsOutput.__default + } + + /** + Invokes the ListSchedules operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedules( + input: SchedulerModel.ListSchedulesInput) async throws -> SchedulerModel.ListSchedulesOutput { + if let listSchedulesOverride = listSchedulesOverride { + return try await listSchedulesOverride(input) + } + + return ListSchedulesOutput.__default + } + + /** + Invokes the ListTagsForResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResource( + input: SchedulerModel.ListTagsForResourceInput) async throws -> SchedulerModel.ListTagsForResourceOutput { + if let listTagsForResourceOverride = listTagsForResourceOverride { + return try await listTagsForResourceOverride(input) + } + + return ListTagsForResourceOutput.__default + } + + /** + Invokes the TagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResource( + input: SchedulerModel.TagResourceInput) async throws -> SchedulerModel.TagResourceOutput { + if let tagResourceOverride = tagResourceOverride { + return try await tagResourceOverride(input) + } + + return TagResourceOutput.__default + } + + /** + Invokes the UntagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResource( + input: SchedulerModel.UntagResourceInput) async throws -> SchedulerModel.UntagResourceOutput { + if let untagResourceOverride = untagResourceOverride { + return try await untagResourceOverride(input) + } + + return UntagResourceOutput.__default + } + + /** + Invokes the UpdateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateSchedule( + input: SchedulerModel.UpdateScheduleInput) async throws -> SchedulerModel.UpdateScheduleOutput { + if let updateScheduleOverride = updateScheduleOverride { + return try await updateScheduleOverride(input) + } + + return UpdateScheduleOutput.__default + } +#endif +} diff --git a/Sources/SchedulerClient/SchedulerClientProtocol+async.swift b/Sources/SchedulerClient/SchedulerClientProtocol+async.swift new file mode 100644 index 0000000..0652ffc --- /dev/null +++ b/Sources/SchedulerClient/SchedulerClientProtocol+async.swift @@ -0,0 +1,358 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerClientProtocol+async.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel + +#if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + +/** + Async extensions for the SchedulerClientProtocol type. + */ +public extension SchedulerClientProtocol { + + /** + Invokes the CreateSchedule operation and asynchronously returning the response. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + func createSchedule(input: SchedulerModel.CreateScheduleInput) async throws + -> SchedulerModel.CreateScheduleOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try createScheduleAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the CreateScheduleGroup operation and asynchronously returning the response. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + func createScheduleGroup(input: SchedulerModel.CreateScheduleGroupInput) async throws + -> SchedulerModel.CreateScheduleGroupOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try createScheduleGroupAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the DeleteSchedule operation and asynchronously returning the response. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteSchedule(input: SchedulerModel.DeleteScheduleInput) async throws + -> SchedulerModel.DeleteScheduleOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try deleteScheduleAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the DeleteScheduleGroup operation and asynchronously returning the response. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteScheduleGroup(input: SchedulerModel.DeleteScheduleGroupInput) async throws + -> SchedulerModel.DeleteScheduleGroupOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try deleteScheduleGroupAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the GetSchedule operation and asynchronously returning the response. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func getSchedule(input: SchedulerModel.GetScheduleInput) async throws + -> SchedulerModel.GetScheduleOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try getScheduleAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the GetScheduleGroup operation and asynchronously returning the response. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func getScheduleGroup(input: SchedulerModel.GetScheduleGroupInput) async throws + -> SchedulerModel.GetScheduleGroupOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try getScheduleGroupAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the ListScheduleGroups operation and asynchronously returning the response. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + func listScheduleGroups(input: SchedulerModel.ListScheduleGroupsInput) async throws + -> SchedulerModel.ListScheduleGroupsOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try listScheduleGroupsAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the ListSchedules operation and asynchronously returning the response. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func listSchedules(input: SchedulerModel.ListSchedulesInput) async throws + -> SchedulerModel.ListSchedulesOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try listSchedulesAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the ListTagsForResource operation and asynchronously returning the response. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func listTagsForResource(input: SchedulerModel.ListTagsForResourceInput) async throws + -> SchedulerModel.ListTagsForResourceOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try listTagsForResourceAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the TagResource operation and asynchronously returning the response. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func tagResource(input: SchedulerModel.TagResourceInput) async throws + -> SchedulerModel.TagResourceOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try tagResourceAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the UntagResource operation and asynchronously returning the response. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func untagResource(input: SchedulerModel.UntagResourceInput) async throws + -> SchedulerModel.UntagResourceOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try untagResourceAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } + + /** + Invokes the UpdateSchedule operation and asynchronously returning the response. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func updateSchedule(input: SchedulerModel.UpdateScheduleInput) async throws + -> SchedulerModel.UpdateScheduleOutput { + return try await withCheckedThrowingContinuation { cont in + do { + try updateScheduleAsync(input: input) { result in + switch result { + case .failure(let error): + cont.resume(throwing: error) + case .success(let response): + cont.resume(returning: response) + } + } + } catch { + cont.resume(throwing: error) + } + } + } +} + +#endif diff --git a/Sources/SchedulerClient/SchedulerClientProtocol.swift b/Sources/SchedulerClient/SchedulerClientProtocol.swift new file mode 100644 index 0000000..8a1db48 --- /dev/null +++ b/Sources/SchedulerClient/SchedulerClientProtocol.swift @@ -0,0 +1,404 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerClientProtocol.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient + +/** + Client Protocol for the Scheduler service. + */ +public protocol SchedulerClientProtocol: SchedulerClientProtocolV2 { + typealias CreateScheduleSyncType = ( + _ input: SchedulerModel.CreateScheduleInput) throws -> SchedulerModel.CreateScheduleOutput + typealias CreateScheduleAsyncType = ( + _ input: SchedulerModel.CreateScheduleInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias CreateScheduleGroupSyncType = ( + _ input: SchedulerModel.CreateScheduleGroupInput) throws -> SchedulerModel.CreateScheduleGroupOutput + typealias CreateScheduleGroupAsyncType = ( + _ input: SchedulerModel.CreateScheduleGroupInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias DeleteScheduleSyncType = ( + _ input: SchedulerModel.DeleteScheduleInput) throws -> SchedulerModel.DeleteScheduleOutput + typealias DeleteScheduleAsyncType = ( + _ input: SchedulerModel.DeleteScheduleInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias DeleteScheduleGroupSyncType = ( + _ input: SchedulerModel.DeleteScheduleGroupInput) throws -> SchedulerModel.DeleteScheduleGroupOutput + typealias DeleteScheduleGroupAsyncType = ( + _ input: SchedulerModel.DeleteScheduleGroupInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias GetScheduleSyncType = ( + _ input: SchedulerModel.GetScheduleInput) throws -> SchedulerModel.GetScheduleOutput + typealias GetScheduleAsyncType = ( + _ input: SchedulerModel.GetScheduleInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias GetScheduleGroupSyncType = ( + _ input: SchedulerModel.GetScheduleGroupInput) throws -> SchedulerModel.GetScheduleGroupOutput + typealias GetScheduleGroupAsyncType = ( + _ input: SchedulerModel.GetScheduleGroupInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias ListScheduleGroupsSyncType = ( + _ input: SchedulerModel.ListScheduleGroupsInput) throws -> SchedulerModel.ListScheduleGroupsOutput + typealias ListScheduleGroupsAsyncType = ( + _ input: SchedulerModel.ListScheduleGroupsInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias ListSchedulesSyncType = ( + _ input: SchedulerModel.ListSchedulesInput) throws -> SchedulerModel.ListSchedulesOutput + typealias ListSchedulesAsyncType = ( + _ input: SchedulerModel.ListSchedulesInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias ListTagsForResourceSyncType = ( + _ input: SchedulerModel.ListTagsForResourceInput) throws -> SchedulerModel.ListTagsForResourceOutput + typealias ListTagsForResourceAsyncType = ( + _ input: SchedulerModel.ListTagsForResourceInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias TagResourceSyncType = ( + _ input: SchedulerModel.TagResourceInput) throws -> SchedulerModel.TagResourceOutput + typealias TagResourceAsyncType = ( + _ input: SchedulerModel.TagResourceInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias UntagResourceSyncType = ( + _ input: SchedulerModel.UntagResourceInput) throws -> SchedulerModel.UntagResourceOutput + typealias UntagResourceAsyncType = ( + _ input: SchedulerModel.UntagResourceInput, + _ completion: @escaping (Result) -> ()) throws -> () + typealias UpdateScheduleSyncType = ( + _ input: SchedulerModel.UpdateScheduleInput) throws -> SchedulerModel.UpdateScheduleOutput + typealias UpdateScheduleAsyncType = ( + _ input: SchedulerModel.UpdateScheduleInput, + _ completion: @escaping (Result) -> ()) throws -> () + + /** + Invokes the CreateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - completion: The CreateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + func createScheduleAsync( + input: SchedulerModel.CreateScheduleInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the CreateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + func createScheduleSync( + input: SchedulerModel.CreateScheduleInput) throws -> SchedulerModel.CreateScheduleOutput + + /** + Invokes the CreateScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - completion: The CreateScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + func createScheduleGroupAsync( + input: SchedulerModel.CreateScheduleGroupInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the CreateScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + func createScheduleGroupSync( + input: SchedulerModel.CreateScheduleGroupInput) throws -> SchedulerModel.CreateScheduleGroupOutput + + /** + Invokes the DeleteSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - completion: The DeleteScheduleOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteScheduleAsync( + input: SchedulerModel.DeleteScheduleInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the DeleteSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteScheduleSync( + input: SchedulerModel.DeleteScheduleInput) throws -> SchedulerModel.DeleteScheduleOutput + + /** + Invokes the DeleteScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - completion: The DeleteScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteScheduleGroupAsync( + input: SchedulerModel.DeleteScheduleGroupInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the DeleteScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteScheduleGroupSync( + input: SchedulerModel.DeleteScheduleGroupInput) throws -> SchedulerModel.DeleteScheduleGroupOutput + + /** + Invokes the GetSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - completion: The GetScheduleOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + func getScheduleAsync( + input: SchedulerModel.GetScheduleInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the GetSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func getScheduleSync( + input: SchedulerModel.GetScheduleInput) throws -> SchedulerModel.GetScheduleOutput + + /** + Invokes the GetScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - completion: The GetScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + func getScheduleGroupAsync( + input: SchedulerModel.GetScheduleGroupInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the GetScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func getScheduleGroupSync( + input: SchedulerModel.GetScheduleGroupInput) throws -> SchedulerModel.GetScheduleGroupOutput + + /** + Invokes the ListScheduleGroups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - completion: The ListScheduleGroupsOutput object or an error will be passed to this + callback when the operation is complete. The ListScheduleGroupsOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, throttling, validation. + */ + func listScheduleGroupsAsync( + input: SchedulerModel.ListScheduleGroupsInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the ListScheduleGroups operation waiting for the response before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + func listScheduleGroupsSync( + input: SchedulerModel.ListScheduleGroupsInput) throws -> SchedulerModel.ListScheduleGroupsOutput + + /** + Invokes the ListSchedules operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - completion: The ListSchedulesOutput object or an error will be passed to this + callback when the operation is complete. The ListSchedulesOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + func listSchedulesAsync( + input: SchedulerModel.ListSchedulesInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the ListSchedules operation waiting for the response before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func listSchedulesSync( + input: SchedulerModel.ListSchedulesInput) throws -> SchedulerModel.ListSchedulesOutput + + /** + Invokes the ListTagsForResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - completion: The ListTagsForResourceOutput object or an error will be passed to this + callback when the operation is complete. The ListTagsForResourceOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + func listTagsForResourceAsync( + input: SchedulerModel.ListTagsForResourceInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the ListTagsForResource operation waiting for the response before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func listTagsForResourceSync( + input: SchedulerModel.ListTagsForResourceInput) throws -> SchedulerModel.ListTagsForResourceOutput + + /** + Invokes the TagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - completion: The TagResourceOutput object or an error will be passed to this + callback when the operation is complete. The TagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func tagResourceAsync( + input: SchedulerModel.TagResourceInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the TagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func tagResourceSync( + input: SchedulerModel.TagResourceInput) throws -> SchedulerModel.TagResourceOutput + + /** + Invokes the UntagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - completion: The UntagResourceOutput object or an error will be passed to this + callback when the operation is complete. The UntagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func untagResourceAsync( + input: SchedulerModel.UntagResourceInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the UntagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func untagResourceSync( + input: SchedulerModel.UntagResourceInput) throws -> SchedulerModel.UntagResourceOutput + + /** + Invokes the UpdateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - completion: The UpdateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The UpdateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func updateScheduleAsync( + input: SchedulerModel.UpdateScheduleInput, + completion: @escaping (Result) -> ()) throws + + /** + Invokes the UpdateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func updateScheduleSync( + input: SchedulerModel.UpdateScheduleInput) throws -> SchedulerModel.UpdateScheduleOutput +} diff --git a/Sources/SchedulerClient/SchedulerClientProtocolV2.swift b/Sources/SchedulerClient/SchedulerClientProtocolV2.swift new file mode 100644 index 0000000..e37763b --- /dev/null +++ b/Sources/SchedulerClient/SchedulerClientProtocolV2.swift @@ -0,0 +1,202 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerClientProtocolV2.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient + +/** + Client Protocol for the Scheduler service. + */ +public protocol SchedulerClientProtocolV2 { +#if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + typealias CreateScheduleFunctionType = ( + _ input: SchedulerModel.CreateScheduleInput) async throws -> SchedulerModel.CreateScheduleOutput + typealias CreateScheduleGroupFunctionType = ( + _ input: SchedulerModel.CreateScheduleGroupInput) async throws -> SchedulerModel.CreateScheduleGroupOutput + typealias DeleteScheduleFunctionType = ( + _ input: SchedulerModel.DeleteScheduleInput) async throws -> SchedulerModel.DeleteScheduleOutput + typealias DeleteScheduleGroupFunctionType = ( + _ input: SchedulerModel.DeleteScheduleGroupInput) async throws -> SchedulerModel.DeleteScheduleGroupOutput + typealias GetScheduleFunctionType = ( + _ input: SchedulerModel.GetScheduleInput) async throws -> SchedulerModel.GetScheduleOutput + typealias GetScheduleGroupFunctionType = ( + _ input: SchedulerModel.GetScheduleGroupInput) async throws -> SchedulerModel.GetScheduleGroupOutput + typealias ListScheduleGroupsFunctionType = ( + _ input: SchedulerModel.ListScheduleGroupsInput) async throws -> SchedulerModel.ListScheduleGroupsOutput + typealias ListSchedulesFunctionType = ( + _ input: SchedulerModel.ListSchedulesInput) async throws -> SchedulerModel.ListSchedulesOutput + typealias ListTagsForResourceFunctionType = ( + _ input: SchedulerModel.ListTagsForResourceInput) async throws -> SchedulerModel.ListTagsForResourceOutput + typealias TagResourceFunctionType = ( + _ input: SchedulerModel.TagResourceInput) async throws -> SchedulerModel.TagResourceOutput + typealias UntagResourceFunctionType = ( + _ input: SchedulerModel.UntagResourceInput) async throws -> SchedulerModel.UntagResourceOutput + typealias UpdateScheduleFunctionType = ( + _ input: SchedulerModel.UpdateScheduleInput) async throws -> SchedulerModel.UpdateScheduleOutput + + /** + Invokes the CreateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + func createSchedule( + input: SchedulerModel.CreateScheduleInput) async throws -> SchedulerModel.CreateScheduleOutput + + /** + Invokes the CreateScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + func createScheduleGroup( + input: SchedulerModel.CreateScheduleGroupInput) async throws -> SchedulerModel.CreateScheduleGroupOutput + + /** + Invokes the DeleteSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteSchedule( + input: SchedulerModel.DeleteScheduleInput) async throws -> SchedulerModel.DeleteScheduleOutput + + /** + Invokes the DeleteScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func deleteScheduleGroup( + input: SchedulerModel.DeleteScheduleGroupInput) async throws -> SchedulerModel.DeleteScheduleGroupOutput + + /** + Invokes the GetSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func getSchedule( + input: SchedulerModel.GetScheduleInput) async throws -> SchedulerModel.GetScheduleOutput + + /** + Invokes the GetScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func getScheduleGroup( + input: SchedulerModel.GetScheduleGroupInput) async throws -> SchedulerModel.GetScheduleGroupOutput + + /** + Invokes the ListScheduleGroups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + func listScheduleGroups( + input: SchedulerModel.ListScheduleGroupsInput) async throws -> SchedulerModel.ListScheduleGroupsOutput + + /** + Invokes the ListSchedules operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func listSchedules( + input: SchedulerModel.ListSchedulesInput) async throws -> SchedulerModel.ListSchedulesOutput + + /** + Invokes the ListTagsForResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + func listTagsForResource( + input: SchedulerModel.ListTagsForResourceInput) async throws -> SchedulerModel.ListTagsForResourceOutput + + /** + Invokes the TagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func tagResource( + input: SchedulerModel.TagResourceInput) async throws -> SchedulerModel.TagResourceOutput + + /** + Invokes the UntagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func untagResource( + input: SchedulerModel.UntagResourceInput) async throws -> SchedulerModel.UntagResourceOutput + + /** + Invokes the UpdateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + func updateSchedule( + input: SchedulerModel.UpdateScheduleInput) async throws -> SchedulerModel.UpdateScheduleOutput +#endif +} diff --git a/Sources/SchedulerClient/SchedulerInvocationsReporting.swift b/Sources/SchedulerClient/SchedulerInvocationsReporting.swift new file mode 100644 index 0000000..90f2db6 --- /dev/null +++ b/Sources/SchedulerClient/SchedulerInvocationsReporting.swift @@ -0,0 +1,71 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerInvocationsReporting.swift +// SchedulerClient +// + +import Foundation +import SmokeHTTPClient +import SmokeAWSHttp +import SchedulerModel + +/** + Invocations reporting for the SchedulerModel. + */ +public struct SchedulerInvocationsReporting { + public let createSchedule: SmokeAWSHTTPClientInvocationReporting + public let createScheduleGroup: SmokeAWSHTTPClientInvocationReporting + public let deleteSchedule: SmokeAWSHTTPClientInvocationReporting + public let deleteScheduleGroup: SmokeAWSHTTPClientInvocationReporting + public let getSchedule: SmokeAWSHTTPClientInvocationReporting + public let getScheduleGroup: SmokeAWSHTTPClientInvocationReporting + public let listScheduleGroups: SmokeAWSHTTPClientInvocationReporting + public let listSchedules: SmokeAWSHTTPClientInvocationReporting + public let listTagsForResource: SmokeAWSHTTPClientInvocationReporting + public let tagResource: SmokeAWSHTTPClientInvocationReporting + public let untagResource: SmokeAWSHTTPClientInvocationReporting + public let updateSchedule: SmokeAWSHTTPClientInvocationReporting + + public init(reporting: InvocationReportingType, operationsReporting: SchedulerOperationsReporting) { + self.createSchedule = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.createSchedule) + self.createScheduleGroup = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.createScheduleGroup) + self.deleteSchedule = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.deleteSchedule) + self.deleteScheduleGroup = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.deleteScheduleGroup) + self.getSchedule = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.getSchedule) + self.getScheduleGroup = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.getScheduleGroup) + self.listScheduleGroups = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.listScheduleGroups) + self.listSchedules = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.listSchedules) + self.listTagsForResource = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.listTagsForResource) + self.tagResource = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.tagResource) + self.untagResource = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.untagResource) + self.updateSchedule = SmokeAWSHTTPClientInvocationReporting(smokeAWSInvocationReporting: reporting, + smokeAWSOperationReporting: operationsReporting.updateSchedule) + } +} diff --git a/Sources/SchedulerClient/SchedulerOperationsClientInput.swift b/Sources/SchedulerClient/SchedulerOperationsClientInput.swift new file mode 100644 index 0000000..ba72029 --- /dev/null +++ b/Sources/SchedulerClient/SchedulerOperationsClientInput.swift @@ -0,0 +1,253 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerOperationsClientInput.swift +// SchedulerClient +// + +import Foundation +import SmokeHTTPClient +import SchedulerModel + +/** + Type to handle the input to the CreateSchedule operation in a HTTP client. + */ +public struct CreateScheduleOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: String? + public let pathEncodable: CreateScheduleOperationInputPath? + public let bodyEncodable: CreateScheduleOperationInputBody? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: CreateScheduleInput) { + self.queryEncodable = nil + self.pathEncodable = encodable.asSchedulerModelCreateScheduleOperationInputPath() + self.bodyEncodable = encodable.asSchedulerModelCreateScheduleOperationInputBody() + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the CreateScheduleGroup operation in a HTTP client. + */ +public struct CreateScheduleGroupOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: String? + public let pathEncodable: CreateScheduleGroupOperationInputPath? + public let bodyEncodable: CreateScheduleGroupOperationInputBody? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: CreateScheduleGroupInput) { + self.queryEncodable = nil + self.pathEncodable = encodable.asSchedulerModelCreateScheduleGroupOperationInputPath() + self.bodyEncodable = encodable.asSchedulerModelCreateScheduleGroupOperationInputBody() + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the DeleteSchedule operation in a HTTP client. + */ +public struct DeleteScheduleOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: DeleteScheduleOperationInputQuery? + public let pathEncodable: DeleteScheduleOperationInputPath? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: DeleteScheduleInput) { + self.queryEncodable = encodable.asSchedulerModelDeleteScheduleOperationInputQuery() + self.pathEncodable = encodable.asSchedulerModelDeleteScheduleOperationInputPath() + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the DeleteScheduleGroup operation in a HTTP client. + */ +public struct DeleteScheduleGroupOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: DeleteScheduleGroupOperationInputQuery? + public let pathEncodable: DeleteScheduleGroupOperationInputPath? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: DeleteScheduleGroupInput) { + self.queryEncodable = encodable.asSchedulerModelDeleteScheduleGroupOperationInputQuery() + self.pathEncodable = encodable.asSchedulerModelDeleteScheduleGroupOperationInputPath() + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the GetSchedule operation in a HTTP client. + */ +public struct GetScheduleOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: GetScheduleOperationInputQuery? + public let pathEncodable: GetScheduleOperationInputPath? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: GetScheduleInput) { + self.queryEncodable = encodable.asSchedulerModelGetScheduleOperationInputQuery() + self.pathEncodable = encodable.asSchedulerModelGetScheduleOperationInputPath() + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the GetScheduleGroup operation in a HTTP client. + */ +public struct GetScheduleGroupOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: String? + public let pathEncodable: GetScheduleGroupOperationInputPath? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: GetScheduleGroupInput) { + self.queryEncodable = nil + self.pathEncodable = encodable.asSchedulerModelGetScheduleGroupOperationInputPath() + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the ListScheduleGroups operation in a HTTP client. + */ +public struct ListScheduleGroupsOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: ListScheduleGroupsOperationInputQuery? + public let pathEncodable: String? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: ListScheduleGroupsInput) { + self.queryEncodable = encodable.asSchedulerModelListScheduleGroupsOperationInputQuery() + self.pathEncodable = nil + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the ListSchedules operation in a HTTP client. + */ +public struct ListSchedulesOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: ListSchedulesOperationInputQuery? + public let pathEncodable: String? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: ListSchedulesInput) { + self.queryEncodable = encodable.asSchedulerModelListSchedulesOperationInputQuery() + self.pathEncodable = nil + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the ListTagsForResource operation in a HTTP client. + */ +public struct ListTagsForResourceOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: String? + public let pathEncodable: ListTagsForResourceOperationInputPath? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: ListTagsForResourceInput) { + self.queryEncodable = nil + self.pathEncodable = encodable.asSchedulerModelListTagsForResourceOperationInputPath() + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the TagResource operation in a HTTP client. + */ +public struct TagResourceOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: String? + public let pathEncodable: TagResourceOperationInputPath? + public let bodyEncodable: TagResourceOperationInputBody? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: TagResourceInput) { + self.queryEncodable = nil + self.pathEncodable = encodable.asSchedulerModelTagResourceOperationInputPath() + self.bodyEncodable = encodable.asSchedulerModelTagResourceOperationInputBody() + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the UntagResource operation in a HTTP client. + */ +public struct UntagResourceOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: UntagResourceOperationInputQuery? + public let pathEncodable: UntagResourceOperationInputPath? + public let bodyEncodable: String? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: UntagResourceInput) { + self.queryEncodable = encodable.asSchedulerModelUntagResourceOperationInputQuery() + self.pathEncodable = encodable.asSchedulerModelUntagResourceOperationInputPath() + self.bodyEncodable = nil + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} + +/** + Type to handle the input to the UpdateSchedule operation in a HTTP client. + */ +public struct UpdateScheduleOperationHTTPRequestInput: HTTPRequestInputProtocol { + public let queryEncodable: String? + public let pathEncodable: UpdateScheduleOperationInputPath? + public let bodyEncodable: UpdateScheduleOperationInputBody? + public let additionalHeadersEncodable: String? + public let pathPostfix: String? + + public init(encodable: UpdateScheduleInput) { + self.queryEncodable = nil + self.pathEncodable = encodable.asSchedulerModelUpdateScheduleOperationInputPath() + self.bodyEncodable = encodable.asSchedulerModelUpdateScheduleOperationInputBody() + self.additionalHeadersEncodable = nil + self.pathPostfix = nil + } +} diff --git a/Sources/SchedulerClient/SchedulerOperationsClientOutput.swift b/Sources/SchedulerClient/SchedulerOperationsClientOutput.swift new file mode 100644 index 0000000..15f41db --- /dev/null +++ b/Sources/SchedulerClient/SchedulerOperationsClientOutput.swift @@ -0,0 +1,181 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerOperationsClientOutput.swift +// SchedulerClient +// + +import Foundation +import SmokeHTTPClient +import SchedulerModel + +/** + Type to handle the output from the CreateSchedule operation in a HTTP client. + */ +extension CreateScheduleOutput: HTTPResponseOutputProtocol { + public typealias BodyType = CreateScheduleOutput + public typealias HeadersType = CreateScheduleOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> CreateScheduleOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the CreateScheduleGroup operation in a HTTP client. + */ +extension CreateScheduleGroupOutput: HTTPResponseOutputProtocol { + public typealias BodyType = CreateScheduleGroupOutput + public typealias HeadersType = CreateScheduleGroupOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> CreateScheduleGroupOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the DeleteSchedule operation in a HTTP client. + */ +extension DeleteScheduleOutput: HTTPResponseOutputProtocol { + public typealias BodyType = DeleteScheduleOutput + public typealias HeadersType = DeleteScheduleOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DeleteScheduleOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the DeleteScheduleGroup operation in a HTTP client. + */ +extension DeleteScheduleGroupOutput: HTTPResponseOutputProtocol { + public typealias BodyType = DeleteScheduleGroupOutput + public typealias HeadersType = DeleteScheduleGroupOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> DeleteScheduleGroupOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the GetSchedule operation in a HTTP client. + */ +extension GetScheduleOutput: HTTPResponseOutputProtocol { + public typealias BodyType = GetScheduleOutput + public typealias HeadersType = GetScheduleOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> GetScheduleOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the GetScheduleGroup operation in a HTTP client. + */ +extension GetScheduleGroupOutput: HTTPResponseOutputProtocol { + public typealias BodyType = GetScheduleGroupOutput + public typealias HeadersType = GetScheduleGroupOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> GetScheduleGroupOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the ListScheduleGroups operation in a HTTP client. + */ +extension ListScheduleGroupsOutput: HTTPResponseOutputProtocol { + public typealias BodyType = ListScheduleGroupsOutput + public typealias HeadersType = ListScheduleGroupsOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> ListScheduleGroupsOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the ListSchedules operation in a HTTP client. + */ +extension ListSchedulesOutput: HTTPResponseOutputProtocol { + public typealias BodyType = ListSchedulesOutput + public typealias HeadersType = ListSchedulesOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> ListSchedulesOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the ListTagsForResource operation in a HTTP client. + */ +extension ListTagsForResourceOutput: HTTPResponseOutputProtocol { + public typealias BodyType = ListTagsForResourceOutput + public typealias HeadersType = ListTagsForResourceOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> ListTagsForResourceOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the TagResource operation in a HTTP client. + */ +extension TagResourceOutput: HTTPResponseOutputProtocol { + public typealias BodyType = TagResourceOutput + public typealias HeadersType = TagResourceOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> TagResourceOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the UntagResource operation in a HTTP client. + */ +extension UntagResourceOutput: HTTPResponseOutputProtocol { + public typealias BodyType = UntagResourceOutput + public typealias HeadersType = UntagResourceOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> UntagResourceOutput { + return try bodyDecodableProvider() + } +} + +/** + Type to handle the output from the UpdateSchedule operation in a HTTP client. + */ +extension UpdateScheduleOutput: HTTPResponseOutputProtocol { + public typealias BodyType = UpdateScheduleOutput + public typealias HeadersType = UpdateScheduleOutput + + public static func compose(bodyDecodableProvider: () throws -> BodyType, + headersDecodableProvider: () throws -> HeadersType) throws -> UpdateScheduleOutput { + return try bodyDecodableProvider() + } +} diff --git a/Sources/SchedulerClient/SchedulerOperationsReporting.swift b/Sources/SchedulerClient/SchedulerOperationsReporting.swift new file mode 100644 index 0000000..f5fef60 --- /dev/null +++ b/Sources/SchedulerClient/SchedulerOperationsReporting.swift @@ -0,0 +1,70 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerOperationsReporting.swift +// SchedulerClient +// + +import Foundation +import SmokeAWSCore +import SchedulerModel + +/** + Operation reporting for the SchedulerModel. + */ +public struct SchedulerOperationsReporting { + public let createSchedule: StandardSmokeAWSOperationReporting + public let createScheduleGroup: StandardSmokeAWSOperationReporting + public let deleteSchedule: StandardSmokeAWSOperationReporting + public let deleteScheduleGroup: StandardSmokeAWSOperationReporting + public let getSchedule: StandardSmokeAWSOperationReporting + public let getScheduleGroup: StandardSmokeAWSOperationReporting + public let listScheduleGroups: StandardSmokeAWSOperationReporting + public let listSchedules: StandardSmokeAWSOperationReporting + public let listTagsForResource: StandardSmokeAWSOperationReporting + public let tagResource: StandardSmokeAWSOperationReporting + public let untagResource: StandardSmokeAWSOperationReporting + public let updateSchedule: StandardSmokeAWSOperationReporting + + public init(clientName: String, reportingConfiguration: SmokeAWSClientReportingConfiguration) { + self.createSchedule = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .createSchedule, configuration: reportingConfiguration) + self.createScheduleGroup = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .createScheduleGroup, configuration: reportingConfiguration) + self.deleteSchedule = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .deleteSchedule, configuration: reportingConfiguration) + self.deleteScheduleGroup = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .deleteScheduleGroup, configuration: reportingConfiguration) + self.getSchedule = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .getSchedule, configuration: reportingConfiguration) + self.getScheduleGroup = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .getScheduleGroup, configuration: reportingConfiguration) + self.listScheduleGroups = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .listScheduleGroups, configuration: reportingConfiguration) + self.listSchedules = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .listSchedules, configuration: reportingConfiguration) + self.listTagsForResource = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .listTagsForResource, configuration: reportingConfiguration) + self.tagResource = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .tagResource, configuration: reportingConfiguration) + self.untagResource = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .untagResource, configuration: reportingConfiguration) + self.updateSchedule = StandardSmokeAWSOperationReporting( + clientName: clientName, operation: .updateSchedule, configuration: reportingConfiguration) + } +} diff --git a/Sources/SchedulerClient/ThrowingSchedulerClient.swift b/Sources/SchedulerClient/ThrowingSchedulerClient.swift new file mode 100644 index 0000000..c339092 --- /dev/null +++ b/Sources/SchedulerClient/ThrowingSchedulerClient.swift @@ -0,0 +1,569 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// ThrowingSchedulerClient.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient + +/** + Mock Client for the Scheduler service that by default always throws from its methods. + */ +public struct ThrowingSchedulerClient: SchedulerClientProtocol { + let error: SchedulerError + let createScheduleAsyncOverride: CreateScheduleAsyncType? + let createScheduleSyncOverride: CreateScheduleSyncType? + let createScheduleGroupAsyncOverride: CreateScheduleGroupAsyncType? + let createScheduleGroupSyncOverride: CreateScheduleGroupSyncType? + let deleteScheduleAsyncOverride: DeleteScheduleAsyncType? + let deleteScheduleSyncOverride: DeleteScheduleSyncType? + let deleteScheduleGroupAsyncOverride: DeleteScheduleGroupAsyncType? + let deleteScheduleGroupSyncOverride: DeleteScheduleGroupSyncType? + let getScheduleAsyncOverride: GetScheduleAsyncType? + let getScheduleSyncOverride: GetScheduleSyncType? + let getScheduleGroupAsyncOverride: GetScheduleGroupAsyncType? + let getScheduleGroupSyncOverride: GetScheduleGroupSyncType? + let listScheduleGroupsAsyncOverride: ListScheduleGroupsAsyncType? + let listScheduleGroupsSyncOverride: ListScheduleGroupsSyncType? + let listSchedulesAsyncOverride: ListSchedulesAsyncType? + let listSchedulesSyncOverride: ListSchedulesSyncType? + let listTagsForResourceAsyncOverride: ListTagsForResourceAsyncType? + let listTagsForResourceSyncOverride: ListTagsForResourceSyncType? + let tagResourceAsyncOverride: TagResourceAsyncType? + let tagResourceSyncOverride: TagResourceSyncType? + let untagResourceAsyncOverride: UntagResourceAsyncType? + let untagResourceSyncOverride: UntagResourceSyncType? + let updateScheduleAsyncOverride: UpdateScheduleAsyncType? + let updateScheduleSyncOverride: UpdateScheduleSyncType? + + /** + Initializer that creates an instance of this clients. The behavior of individual + functions can be overridden by passing them to this initializer. + */ + public init(error: SchedulerError, + createScheduleAsync: CreateScheduleAsyncType? = nil, + createScheduleSync: CreateScheduleSyncType? = nil, + createScheduleGroupAsync: CreateScheduleGroupAsyncType? = nil, + createScheduleGroupSync: CreateScheduleGroupSyncType? = nil, + deleteScheduleAsync: DeleteScheduleAsyncType? = nil, + deleteScheduleSync: DeleteScheduleSyncType? = nil, + deleteScheduleGroupAsync: DeleteScheduleGroupAsyncType? = nil, + deleteScheduleGroupSync: DeleteScheduleGroupSyncType? = nil, + getScheduleAsync: GetScheduleAsyncType? = nil, + getScheduleSync: GetScheduleSyncType? = nil, + getScheduleGroupAsync: GetScheduleGroupAsyncType? = nil, + getScheduleGroupSync: GetScheduleGroupSyncType? = nil, + listScheduleGroupsAsync: ListScheduleGroupsAsyncType? = nil, + listScheduleGroupsSync: ListScheduleGroupsSyncType? = nil, + listSchedulesAsync: ListSchedulesAsyncType? = nil, + listSchedulesSync: ListSchedulesSyncType? = nil, + listTagsForResourceAsync: ListTagsForResourceAsyncType? = nil, + listTagsForResourceSync: ListTagsForResourceSyncType? = nil, + tagResourceAsync: TagResourceAsyncType? = nil, + tagResourceSync: TagResourceSyncType? = nil, + untagResourceAsync: UntagResourceAsyncType? = nil, + untagResourceSync: UntagResourceSyncType? = nil, + updateScheduleAsync: UpdateScheduleAsyncType? = nil, + updateScheduleSync: UpdateScheduleSyncType? = nil) { + self.error = error + self.createScheduleAsyncOverride = createScheduleAsync + self.createScheduleSyncOverride = createScheduleSync + self.createScheduleGroupAsyncOverride = createScheduleGroupAsync + self.createScheduleGroupSyncOverride = createScheduleGroupSync + self.deleteScheduleAsyncOverride = deleteScheduleAsync + self.deleteScheduleSyncOverride = deleteScheduleSync + self.deleteScheduleGroupAsyncOverride = deleteScheduleGroupAsync + self.deleteScheduleGroupSyncOverride = deleteScheduleGroupSync + self.getScheduleAsyncOverride = getScheduleAsync + self.getScheduleSyncOverride = getScheduleSync + self.getScheduleGroupAsyncOverride = getScheduleGroupAsync + self.getScheduleGroupSyncOverride = getScheduleGroupSync + self.listScheduleGroupsAsyncOverride = listScheduleGroupsAsync + self.listScheduleGroupsSyncOverride = listScheduleGroupsSync + self.listSchedulesAsyncOverride = listSchedulesAsync + self.listSchedulesSyncOverride = listSchedulesSync + self.listTagsForResourceAsyncOverride = listTagsForResourceAsync + self.listTagsForResourceSyncOverride = listTagsForResourceSync + self.tagResourceAsyncOverride = tagResourceAsync + self.tagResourceSyncOverride = tagResourceSync + self.untagResourceAsyncOverride = untagResourceAsync + self.untagResourceSyncOverride = untagResourceSync + self.updateScheduleAsyncOverride = updateScheduleAsync + self.updateScheduleSyncOverride = updateScheduleSync + } + + /** + Invokes the CreateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - completion: The CreateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleAsync( + input: SchedulerModel.CreateScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let createScheduleAsyncOverride = createScheduleAsyncOverride { + return try createScheduleAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the CreateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleSync( + input: SchedulerModel.CreateScheduleInput) throws -> SchedulerModel.CreateScheduleOutput { + if let createScheduleSyncOverride = createScheduleSyncOverride { + return try createScheduleSyncOverride(input) + } + + throw error + } + + /** + Invokes the CreateScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - completion: The CreateScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The CreateScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroupAsync( + input: SchedulerModel.CreateScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + if let createScheduleGroupAsyncOverride = createScheduleGroupAsyncOverride { + return try createScheduleGroupAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the CreateScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroupSync( + input: SchedulerModel.CreateScheduleGroupInput) throws -> SchedulerModel.CreateScheduleGroupOutput { + if let createScheduleGroupSyncOverride = createScheduleGroupSyncOverride { + return try createScheduleGroupSyncOverride(input) + } + + throw error + } + + /** + Invokes the DeleteSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - completion: The DeleteScheduleOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleAsync( + input: SchedulerModel.DeleteScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let deleteScheduleAsyncOverride = deleteScheduleAsyncOverride { + return try deleteScheduleAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the DeleteSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleSync( + input: SchedulerModel.DeleteScheduleInput) throws -> SchedulerModel.DeleteScheduleOutput { + if let deleteScheduleSyncOverride = deleteScheduleSyncOverride { + return try deleteScheduleSyncOverride(input) + } + + throw error + } + + /** + Invokes the DeleteScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - completion: The DeleteScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The DeleteScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroupAsync( + input: SchedulerModel.DeleteScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + if let deleteScheduleGroupAsyncOverride = deleteScheduleGroupAsyncOverride { + return try deleteScheduleGroupAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the DeleteScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroupSync( + input: SchedulerModel.DeleteScheduleGroupInput) throws -> SchedulerModel.DeleteScheduleGroupOutput { + if let deleteScheduleGroupSyncOverride = deleteScheduleGroupSyncOverride { + return try deleteScheduleGroupSyncOverride(input) + } + + throw error + } + + /** + Invokes the GetSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - completion: The GetScheduleOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleAsync( + input: SchedulerModel.GetScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let getScheduleAsyncOverride = getScheduleAsyncOverride { + return try getScheduleAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the GetSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleSync( + input: SchedulerModel.GetScheduleInput) throws -> SchedulerModel.GetScheduleOutput { + if let getScheduleSyncOverride = getScheduleSyncOverride { + return try getScheduleSyncOverride(input) + } + + throw error + } + + /** + Invokes the GetScheduleGroup operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - completion: The GetScheduleGroupOutput object or an error will be passed to this + callback when the operation is complete. The GetScheduleGroupOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroupAsync( + input: SchedulerModel.GetScheduleGroupInput, + completion: @escaping (Result) -> ()) throws { + if let getScheduleGroupAsyncOverride = getScheduleGroupAsyncOverride { + return try getScheduleGroupAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the GetScheduleGroup operation waiting for the response before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroupSync( + input: SchedulerModel.GetScheduleGroupInput) throws -> SchedulerModel.GetScheduleGroupOutput { + if let getScheduleGroupSyncOverride = getScheduleGroupSyncOverride { + return try getScheduleGroupSyncOverride(input) + } + + throw error + } + + /** + Invokes the ListScheduleGroups operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - completion: The ListScheduleGroupsOutput object or an error will be passed to this + callback when the operation is complete. The ListScheduleGroupsOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, throttling, validation. + */ + public func listScheduleGroupsAsync( + input: SchedulerModel.ListScheduleGroupsInput, + completion: @escaping (Result) -> ()) throws { + if let listScheduleGroupsAsyncOverride = listScheduleGroupsAsyncOverride { + return try listScheduleGroupsAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the ListScheduleGroups operation waiting for the response before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + public func listScheduleGroupsSync( + input: SchedulerModel.ListScheduleGroupsInput) throws -> SchedulerModel.ListScheduleGroupsOutput { + if let listScheduleGroupsSyncOverride = listScheduleGroupsSyncOverride { + return try listScheduleGroupsSyncOverride(input) + } + + throw error + } + + /** + Invokes the ListSchedules operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - completion: The ListSchedulesOutput object or an error will be passed to this + callback when the operation is complete. The ListSchedulesOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedulesAsync( + input: SchedulerModel.ListSchedulesInput, + completion: @escaping (Result) -> ()) throws { + if let listSchedulesAsyncOverride = listSchedulesAsyncOverride { + return try listSchedulesAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the ListSchedules operation waiting for the response before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedulesSync( + input: SchedulerModel.ListSchedulesInput) throws -> SchedulerModel.ListSchedulesOutput { + if let listSchedulesSyncOverride = listSchedulesSyncOverride { + return try listSchedulesSyncOverride(input) + } + + throw error + } + + /** + Invokes the ListTagsForResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - completion: The ListTagsForResourceOutput object or an error will be passed to this + callback when the operation is complete. The ListTagsForResourceOutput + object will be validated before being returned to caller. + The possible errors are: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResourceAsync( + input: SchedulerModel.ListTagsForResourceInput, + completion: @escaping (Result) -> ()) throws { + if let listTagsForResourceAsyncOverride = listTagsForResourceAsyncOverride { + return try listTagsForResourceAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the ListTagsForResource operation waiting for the response before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResourceSync( + input: SchedulerModel.ListTagsForResourceInput) throws -> SchedulerModel.ListTagsForResourceOutput { + if let listTagsForResourceSyncOverride = listTagsForResourceSyncOverride { + return try listTagsForResourceSyncOverride(input) + } + + throw error + } + + /** + Invokes the TagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - completion: The TagResourceOutput object or an error will be passed to this + callback when the operation is complete. The TagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResourceAsync( + input: SchedulerModel.TagResourceInput, + completion: @escaping (Result) -> ()) throws { + if let tagResourceAsyncOverride = tagResourceAsyncOverride { + return try tagResourceAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the TagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResourceSync( + input: SchedulerModel.TagResourceInput) throws -> SchedulerModel.TagResourceOutput { + if let tagResourceSyncOverride = tagResourceSyncOverride { + return try tagResourceSyncOverride(input) + } + + throw error + } + + /** + Invokes the UntagResource operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - completion: The UntagResourceOutput object or an error will be passed to this + callback when the operation is complete. The UntagResourceOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResourceAsync( + input: SchedulerModel.UntagResourceInput, + completion: @escaping (Result) -> ()) throws { + if let untagResourceAsyncOverride = untagResourceAsyncOverride { + return try untagResourceAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the UntagResource operation waiting for the response before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResourceSync( + input: SchedulerModel.UntagResourceInput) throws -> SchedulerModel.UntagResourceOutput { + if let untagResourceSyncOverride = untagResourceSyncOverride { + return try untagResourceSyncOverride(input) + } + + throw error + } + + /** + Invokes the UpdateSchedule operation returning immediately and passing the response to a callback. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - completion: The UpdateScheduleOutput object or an error will be passed to this + callback when the operation is complete. The UpdateScheduleOutput + object will be validated before being returned to caller. + The possible errors are: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateScheduleAsync( + input: SchedulerModel.UpdateScheduleInput, + completion: @escaping (Result) -> ()) throws { + if let updateScheduleAsyncOverride = updateScheduleAsyncOverride { + return try updateScheduleAsyncOverride(input, completion) + } + + completion(.failure(error)) + } + + /** + Invokes the UpdateSchedule operation waiting for the response before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateScheduleSync( + input: SchedulerModel.UpdateScheduleInput) throws -> SchedulerModel.UpdateScheduleOutput { + if let updateScheduleSyncOverride = updateScheduleSyncOverride { + return try updateScheduleSyncOverride(input) + } + + throw error + } +} diff --git a/Sources/SchedulerClient/ThrowingSchedulerClientV2.swift b/Sources/SchedulerClient/ThrowingSchedulerClientV2.swift new file mode 100644 index 0000000..48cb9e7 --- /dev/null +++ b/Sources/SchedulerClient/ThrowingSchedulerClientV2.swift @@ -0,0 +1,295 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// ThrowingSchedulerClientV2.swift +// SchedulerClient +// + +import Foundation +import SchedulerModel +import SmokeAWSCore +import SmokeHTTPClient + +/** + Mock Client for the Scheduler service that by default always throws from its methods. + */ +public struct ThrowingSchedulerClientV2: SchedulerClientProtocolV2 { +#if (os(Linux) && compiler(>=5.5)) || (!os(Linux) && compiler(>=5.5.2)) && canImport(_Concurrency) + let error: SchedulerError + let createScheduleOverride: CreateScheduleFunctionType? + let createScheduleGroupOverride: CreateScheduleGroupFunctionType? + let deleteScheduleOverride: DeleteScheduleFunctionType? + let deleteScheduleGroupOverride: DeleteScheduleGroupFunctionType? + let getScheduleOverride: GetScheduleFunctionType? + let getScheduleGroupOverride: GetScheduleGroupFunctionType? + let listScheduleGroupsOverride: ListScheduleGroupsFunctionType? + let listSchedulesOverride: ListSchedulesFunctionType? + let listTagsForResourceOverride: ListTagsForResourceFunctionType? + let tagResourceOverride: TagResourceFunctionType? + let untagResourceOverride: UntagResourceFunctionType? + let updateScheduleOverride: UpdateScheduleFunctionType? + + /** + Initializer that creates an instance of this clients. The behavior of individual + functions can be overridden by passing them to this initializer. + */ + public init(error: SchedulerError, + createSchedule: CreateScheduleFunctionType? = nil, + createScheduleGroup: CreateScheduleGroupFunctionType? = nil, + deleteSchedule: DeleteScheduleFunctionType? = nil, + deleteScheduleGroup: DeleteScheduleGroupFunctionType? = nil, + getSchedule: GetScheduleFunctionType? = nil, + getScheduleGroup: GetScheduleGroupFunctionType? = nil, + listScheduleGroups: ListScheduleGroupsFunctionType? = nil, + listSchedules: ListSchedulesFunctionType? = nil, + listTagsForResource: ListTagsForResourceFunctionType? = nil, + tagResource: TagResourceFunctionType? = nil, + untagResource: UntagResourceFunctionType? = nil, + updateSchedule: UpdateScheduleFunctionType? = nil) { + self.error = error + self.createScheduleOverride = createSchedule + self.createScheduleGroupOverride = createScheduleGroup + self.deleteScheduleOverride = deleteSchedule + self.deleteScheduleGroupOverride = deleteScheduleGroup + self.getScheduleOverride = getSchedule + self.getScheduleGroupOverride = getScheduleGroup + self.listScheduleGroupsOverride = listScheduleGroups + self.listSchedulesOverride = listSchedules + self.listTagsForResourceOverride = listTagsForResource + self.tagResourceOverride = tagResource + self.untagResourceOverride = untagResource + self.updateScheduleOverride = updateSchedule + } + + /** + Invokes the CreateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleInput object being passed to this operation. + - Returns: The CreateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, serviceQuotaExceeded, throttling, validation. + */ + public func createSchedule( + input: SchedulerModel.CreateScheduleInput) async throws -> SchedulerModel.CreateScheduleOutput { + if let createScheduleOverride = createScheduleOverride { + return try await createScheduleOverride(input) + } + + throw error + } + + /** + Invokes the CreateScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated CreateScheduleGroupInput object being passed to this operation. + - Returns: The CreateScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, serviceQuotaExceeded, throttling, validation. + */ + public func createScheduleGroup( + input: SchedulerModel.CreateScheduleGroupInput) async throws -> SchedulerModel.CreateScheduleGroupOutput { + if let createScheduleGroupOverride = createScheduleGroupOverride { + return try await createScheduleGroupOverride(input) + } + + throw error + } + + /** + Invokes the DeleteSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleInput object being passed to this operation. + - Returns: The DeleteScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteSchedule( + input: SchedulerModel.DeleteScheduleInput) async throws -> SchedulerModel.DeleteScheduleOutput { + if let deleteScheduleOverride = deleteScheduleOverride { + return try await deleteScheduleOverride(input) + } + + throw error + } + + /** + Invokes the DeleteScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated DeleteScheduleGroupInput object being passed to this operation. + - Returns: The DeleteScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func deleteScheduleGroup( + input: SchedulerModel.DeleteScheduleGroupInput) async throws -> SchedulerModel.DeleteScheduleGroupOutput { + if let deleteScheduleGroupOverride = deleteScheduleGroupOverride { + return try await deleteScheduleGroupOverride(input) + } + + throw error + } + + /** + Invokes the GetSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleInput object being passed to this operation. + - Returns: The GetScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getSchedule( + input: SchedulerModel.GetScheduleInput) async throws -> SchedulerModel.GetScheduleOutput { + if let getScheduleOverride = getScheduleOverride { + return try await getScheduleOverride(input) + } + + throw error + } + + /** + Invokes the GetScheduleGroup operation suspending until the response is available before returning. + + - Parameters: + - input: The validated GetScheduleGroupInput object being passed to this operation. + - Returns: The GetScheduleGroupOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func getScheduleGroup( + input: SchedulerModel.GetScheduleGroupInput) async throws -> SchedulerModel.GetScheduleGroupOutput { + if let getScheduleGroupOverride = getScheduleGroupOverride { + return try await getScheduleGroupOverride(input) + } + + throw error + } + + /** + Invokes the ListScheduleGroups operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListScheduleGroupsInput object being passed to this operation. + - Returns: The ListScheduleGroupsOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, throttling, validation. + */ + public func listScheduleGroups( + input: SchedulerModel.ListScheduleGroupsInput) async throws -> SchedulerModel.ListScheduleGroupsOutput { + if let listScheduleGroupsOverride = listScheduleGroupsOverride { + return try await listScheduleGroupsOverride(input) + } + + throw error + } + + /** + Invokes the ListSchedules operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListSchedulesInput object being passed to this operation. + - Returns: The ListSchedulesOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listSchedules( + input: SchedulerModel.ListSchedulesInput) async throws -> SchedulerModel.ListSchedulesOutput { + if let listSchedulesOverride = listSchedulesOverride { + return try await listSchedulesOverride(input) + } + + throw error + } + + /** + Invokes the ListTagsForResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated ListTagsForResourceInput object being passed to this operation. + - Returns: The ListTagsForResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: internalServer, resourceNotFound, throttling, validation. + */ + public func listTagsForResource( + input: SchedulerModel.ListTagsForResourceInput) async throws -> SchedulerModel.ListTagsForResourceOutput { + if let listTagsForResourceOverride = listTagsForResourceOverride { + return try await listTagsForResourceOverride(input) + } + + throw error + } + + /** + Invokes the TagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated TagResourceInput object being passed to this operation. + - Returns: The TagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func tagResource( + input: SchedulerModel.TagResourceInput) async throws -> SchedulerModel.TagResourceOutput { + if let tagResourceOverride = tagResourceOverride { + return try await tagResourceOverride(input) + } + + throw error + } + + /** + Invokes the UntagResource operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UntagResourceInput object being passed to this operation. + - Returns: The UntagResourceOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func untagResource( + input: SchedulerModel.UntagResourceInput) async throws -> SchedulerModel.UntagResourceOutput { + if let untagResourceOverride = untagResourceOverride { + return try await untagResourceOverride(input) + } + + throw error + } + + /** + Invokes the UpdateSchedule operation suspending until the response is available before returning. + + - Parameters: + - input: The validated UpdateScheduleInput object being passed to this operation. + - Returns: The UpdateScheduleOutput object to be passed back from the caller of this operation. + Will be validated before being returned to caller. + - Throws: conflict, internalServer, resourceNotFound, throttling, validation. + */ + public func updateSchedule( + input: SchedulerModel.UpdateScheduleInput) async throws -> SchedulerModel.UpdateScheduleOutput { + if let updateScheduleOverride = updateScheduleOverride { + return try await updateScheduleOverride(input) + } + + throw error + } +#endif +} diff --git a/Sources/SchedulerModel/SchedulerModelDefaultInstances.swift b/Sources/SchedulerModel/SchedulerModelDefaultInstances.swift new file mode 100644 index 0000000..2f95d32 --- /dev/null +++ b/Sources/SchedulerModel/SchedulerModelDefaultInstances.swift @@ -0,0 +1,708 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerModelDefaultInstances.swift +// SchedulerModel +// + +import Foundation + +public extension AwsVpcConfiguration { + /** + Default instance of the AwsVpcConfiguration structure. + */ + static let __default: SchedulerModel.AwsVpcConfiguration = { + let defaultInstance = SchedulerModel.AwsVpcConfiguration( + assignPublicIp: nil, + securityGroups: nil, + subnets: ["0"]) + + return defaultInstance + }() +} + +public extension CapacityProviderStrategyItem { + /** + Default instance of the CapacityProviderStrategyItem structure. + */ + static let __default: SchedulerModel.CapacityProviderStrategyItem = { + let defaultInstance = SchedulerModel.CapacityProviderStrategyItem( + base: nil, + capacityProvider: "0", + weight: nil) + + return defaultInstance + }() +} + +public extension ConflictException { + /** + Default instance of the ConflictException structure. + */ + static let __default: SchedulerModel.ConflictException = { + let defaultInstance = SchedulerModel.ConflictException( + message: "value") + + return defaultInstance + }() +} + +public extension CreateScheduleGroupInput { + /** + Default instance of the CreateScheduleGroupInput structure. + */ + static let __default: SchedulerModel.CreateScheduleGroupInput = { + let defaultInstance = SchedulerModel.CreateScheduleGroupInput( + clientToken: nil, + name: "0", + tags: nil) + + return defaultInstance + }() +} + +public extension CreateScheduleGroupOutput { + /** + Default instance of the CreateScheduleGroupOutput structure. + */ + static let __default: SchedulerModel.CreateScheduleGroupOutput = { + let defaultInstance = SchedulerModel.CreateScheduleGroupOutput( + scheduleGroupArn: "0") + + return defaultInstance + }() +} + +public extension CreateScheduleInput { + /** + Default instance of the CreateScheduleInput structure. + */ + static let __default: SchedulerModel.CreateScheduleInput = { + let defaultInstance = SchedulerModel.CreateScheduleInput( + actionAfterCompletion: nil, + clientToken: nil, + description: nil, + endDate: nil, + flexibleTimeWindow: FlexibleTimeWindow.__default, + groupName: nil, + kmsKeyArn: nil, + name: "0", + scheduleExpression: "0", + scheduleExpressionTimezone: nil, + startDate: nil, + state: nil, + target: Target.__default) + + return defaultInstance + }() +} + +public extension CreateScheduleOutput { + /** + Default instance of the CreateScheduleOutput structure. + */ + static let __default: SchedulerModel.CreateScheduleOutput = { + let defaultInstance = SchedulerModel.CreateScheduleOutput( + scheduleArn: "0") + + return defaultInstance + }() +} + +public extension DeadLetterConfig { + /** + Default instance of the DeadLetterConfig structure. + */ + static let __default: SchedulerModel.DeadLetterConfig = { + let defaultInstance = SchedulerModel.DeadLetterConfig( + arn: nil) + + return defaultInstance + }() +} + +public extension DeleteScheduleGroupInput { + /** + Default instance of the DeleteScheduleGroupInput structure. + */ + static let __default: SchedulerModel.DeleteScheduleGroupInput = { + let defaultInstance = SchedulerModel.DeleteScheduleGroupInput( + clientToken: nil, + name: "0") + + return defaultInstance + }() +} + +public extension DeleteScheduleGroupOutput { + /** + Default instance of the DeleteScheduleGroupOutput structure. + */ + static let __default: SchedulerModel.DeleteScheduleGroupOutput = { + let defaultInstance = SchedulerModel.DeleteScheduleGroupOutput() + + return defaultInstance + }() +} + +public extension DeleteScheduleInput { + /** + Default instance of the DeleteScheduleInput structure. + */ + static let __default: SchedulerModel.DeleteScheduleInput = { + let defaultInstance = SchedulerModel.DeleteScheduleInput( + clientToken: nil, + groupName: nil, + name: "0") + + return defaultInstance + }() +} + +public extension DeleteScheduleOutput { + /** + Default instance of the DeleteScheduleOutput structure. + */ + static let __default: SchedulerModel.DeleteScheduleOutput = { + let defaultInstance = SchedulerModel.DeleteScheduleOutput() + + return defaultInstance + }() +} + +public extension EcsParameters { + /** + Default instance of the EcsParameters structure. + */ + static let __default: SchedulerModel.EcsParameters = { + let defaultInstance = SchedulerModel.EcsParameters( + capacityProviderStrategy: nil, + enableECSManagedTags: nil, + enableExecuteCommand: nil, + group: nil, + launchType: nil, + networkConfiguration: nil, + placementConstraints: nil, + placementStrategy: nil, + platformVersion: nil, + propagateTags: nil, + referenceId: nil, + tags: nil, + taskCount: nil, + taskDefinitionArn: "0") + + return defaultInstance + }() +} + +public extension EventBridgeParameters { + /** + Default instance of the EventBridgeParameters structure. + */ + static let __default: SchedulerModel.EventBridgeParameters = { + let defaultInstance = SchedulerModel.EventBridgeParameters( + detailType: "0", + source: "0") + + return defaultInstance + }() +} + +public extension FlexibleTimeWindow { + /** + Default instance of the FlexibleTimeWindow structure. + */ + static let __default: SchedulerModel.FlexibleTimeWindow = { + let defaultInstance = SchedulerModel.FlexibleTimeWindow( + maximumWindowInMinutes: nil, + mode: .__default) + + return defaultInstance + }() +} + +public extension GetScheduleGroupInput { + /** + Default instance of the GetScheduleGroupInput structure. + */ + static let __default: SchedulerModel.GetScheduleGroupInput = { + let defaultInstance = SchedulerModel.GetScheduleGroupInput( + name: "0") + + return defaultInstance + }() +} + +public extension GetScheduleGroupOutput { + /** + Default instance of the GetScheduleGroupOutput structure. + */ + static let __default: SchedulerModel.GetScheduleGroupOutput = { + let defaultInstance = SchedulerModel.GetScheduleGroupOutput( + arn: nil, + creationDate: nil, + lastModificationDate: nil, + name: nil, + state: nil) + + return defaultInstance + }() +} + +public extension GetScheduleInput { + /** + Default instance of the GetScheduleInput structure. + */ + static let __default: SchedulerModel.GetScheduleInput = { + let defaultInstance = SchedulerModel.GetScheduleInput( + groupName: nil, + name: "0") + + return defaultInstance + }() +} + +public extension GetScheduleOutput { + /** + Default instance of the GetScheduleOutput structure. + */ + static let __default: SchedulerModel.GetScheduleOutput = { + let defaultInstance = SchedulerModel.GetScheduleOutput( + actionAfterCompletion: nil, + arn: nil, + creationDate: nil, + description: nil, + endDate: nil, + flexibleTimeWindow: nil, + groupName: nil, + kmsKeyArn: nil, + lastModificationDate: nil, + name: nil, + scheduleExpression: nil, + scheduleExpressionTimezone: nil, + startDate: nil, + state: nil, + target: nil) + + return defaultInstance + }() +} + +public extension InternalServerException { + /** + Default instance of the InternalServerException structure. + */ + static let __default: SchedulerModel.InternalServerException = { + let defaultInstance = SchedulerModel.InternalServerException( + message: "value") + + return defaultInstance + }() +} + +public extension KinesisParameters { + /** + Default instance of the KinesisParameters structure. + */ + static let __default: SchedulerModel.KinesisParameters = { + let defaultInstance = SchedulerModel.KinesisParameters( + partitionKey: "0") + + return defaultInstance + }() +} + +public extension ListScheduleGroupsInput { + /** + Default instance of the ListScheduleGroupsInput structure. + */ + static let __default: SchedulerModel.ListScheduleGroupsInput = { + let defaultInstance = SchedulerModel.ListScheduleGroupsInput( + maxResults: nil, + namePrefix: nil, + nextToken: nil) + + return defaultInstance + }() +} + +public extension ListScheduleGroupsOutput { + /** + Default instance of the ListScheduleGroupsOutput structure. + */ + static let __default: SchedulerModel.ListScheduleGroupsOutput = { + let defaultInstance = SchedulerModel.ListScheduleGroupsOutput( + nextToken: nil, + scheduleGroups: []) + + return defaultInstance + }() +} + +public extension ListSchedulesInput { + /** + Default instance of the ListSchedulesInput structure. + */ + static let __default: SchedulerModel.ListSchedulesInput = { + let defaultInstance = SchedulerModel.ListSchedulesInput( + groupName: nil, + maxResults: nil, + namePrefix: nil, + nextToken: nil, + state: nil) + + return defaultInstance + }() +} + +public extension ListSchedulesOutput { + /** + Default instance of the ListSchedulesOutput structure. + */ + static let __default: SchedulerModel.ListSchedulesOutput = { + let defaultInstance = SchedulerModel.ListSchedulesOutput( + nextToken: nil, + schedules: []) + + return defaultInstance + }() +} + +public extension ListTagsForResourceInput { + /** + Default instance of the ListTagsForResourceInput structure. + */ + static let __default: SchedulerModel.ListTagsForResourceInput = { + let defaultInstance = SchedulerModel.ListTagsForResourceInput( + resourceArn: "0") + + return defaultInstance + }() +} + +public extension ListTagsForResourceOutput { + /** + Default instance of the ListTagsForResourceOutput structure. + */ + static let __default: SchedulerModel.ListTagsForResourceOutput = { + let defaultInstance = SchedulerModel.ListTagsForResourceOutput( + tags: nil) + + return defaultInstance + }() +} + +public extension NetworkConfiguration { + /** + Default instance of the NetworkConfiguration structure. + */ + static let __default: SchedulerModel.NetworkConfiguration = { + let defaultInstance = SchedulerModel.NetworkConfiguration( + awsvpcConfiguration: nil) + + return defaultInstance + }() +} + +public extension PlacementConstraint { + /** + Default instance of the PlacementConstraint structure. + */ + static let __default: SchedulerModel.PlacementConstraint = { + let defaultInstance = SchedulerModel.PlacementConstraint( + expression: nil, + type: nil) + + return defaultInstance + }() +} + +public extension PlacementStrategy { + /** + Default instance of the PlacementStrategy structure. + */ + static let __default: SchedulerModel.PlacementStrategy = { + let defaultInstance = SchedulerModel.PlacementStrategy( + field: nil, + type: nil) + + return defaultInstance + }() +} + +public extension ResourceNotFoundException { + /** + Default instance of the ResourceNotFoundException structure. + */ + static let __default: SchedulerModel.ResourceNotFoundException = { + let defaultInstance = SchedulerModel.ResourceNotFoundException( + message: "value") + + return defaultInstance + }() +} + +public extension RetryPolicy { + /** + Default instance of the RetryPolicy structure. + */ + static let __default: SchedulerModel.RetryPolicy = { + let defaultInstance = SchedulerModel.RetryPolicy( + maximumEventAgeInSeconds: nil, + maximumRetryAttempts: nil) + + return defaultInstance + }() +} + +public extension SageMakerPipelineParameter { + /** + Default instance of the SageMakerPipelineParameter structure. + */ + static let __default: SchedulerModel.SageMakerPipelineParameter = { + let defaultInstance = SchedulerModel.SageMakerPipelineParameter( + name: "0", + value: "0") + + return defaultInstance + }() +} + +public extension SageMakerPipelineParameters { + /** + Default instance of the SageMakerPipelineParameters structure. + */ + static let __default: SchedulerModel.SageMakerPipelineParameters = { + let defaultInstance = SchedulerModel.SageMakerPipelineParameters( + pipelineParameterList: nil) + + return defaultInstance + }() +} + +public extension ScheduleGroupSummary { + /** + Default instance of the ScheduleGroupSummary structure. + */ + static let __default: SchedulerModel.ScheduleGroupSummary = { + let defaultInstance = SchedulerModel.ScheduleGroupSummary( + arn: nil, + creationDate: nil, + lastModificationDate: nil, + name: nil, + state: nil) + + return defaultInstance + }() +} + +public extension ScheduleSummary { + /** + Default instance of the ScheduleSummary structure. + */ + static let __default: SchedulerModel.ScheduleSummary = { + let defaultInstance = SchedulerModel.ScheduleSummary( + arn: nil, + creationDate: nil, + groupName: nil, + lastModificationDate: nil, + name: nil, + state: nil, + target: nil) + + return defaultInstance + }() +} + +public extension ServiceQuotaExceededException { + /** + Default instance of the ServiceQuotaExceededException structure. + */ + static let __default: SchedulerModel.ServiceQuotaExceededException = { + let defaultInstance = SchedulerModel.ServiceQuotaExceededException( + message: "value") + + return defaultInstance + }() +} + +public extension SqsParameters { + /** + Default instance of the SqsParameters structure. + */ + static let __default: SchedulerModel.SqsParameters = { + let defaultInstance = SchedulerModel.SqsParameters( + messageGroupId: nil) + + return defaultInstance + }() +} + +public extension Tag { + /** + Default instance of the Tag structure. + */ + static let __default: SchedulerModel.Tag = { + let defaultInstance = SchedulerModel.Tag( + key: "0", + value: "0") + + return defaultInstance + }() +} + +public extension TagResourceInput { + /** + Default instance of the TagResourceInput structure. + */ + static let __default: SchedulerModel.TagResourceInput = { + let defaultInstance = SchedulerModel.TagResourceInput( + resourceArn: "0", + tags: []) + + return defaultInstance + }() +} + +public extension TagResourceOutput { + /** + Default instance of the TagResourceOutput structure. + */ + static let __default: SchedulerModel.TagResourceOutput = { + let defaultInstance = SchedulerModel.TagResourceOutput() + + return defaultInstance + }() +} + +public extension Target { + /** + Default instance of the Target structure. + */ + static let __default: SchedulerModel.Target = { + let defaultInstance = SchedulerModel.Target( + arn: "0", + deadLetterConfig: nil, + ecsParameters: nil, + eventBridgeParameters: nil, + input: nil, + kinesisParameters: nil, + retryPolicy: nil, + roleArn: "0", + sageMakerPipelineParameters: nil, + sqsParameters: nil) + + return defaultInstance + }() +} + +public extension TargetSummary { + /** + Default instance of the TargetSummary structure. + */ + static let __default: SchedulerModel.TargetSummary = { + let defaultInstance = SchedulerModel.TargetSummary( + arn: "0") + + return defaultInstance + }() +} + +public extension ThrottlingException { + /** + Default instance of the ThrottlingException structure. + */ + static let __default: SchedulerModel.ThrottlingException = { + let defaultInstance = SchedulerModel.ThrottlingException( + message: "value") + + return defaultInstance + }() +} + +public extension UntagResourceInput { + /** + Default instance of the UntagResourceInput structure. + */ + static let __default: SchedulerModel.UntagResourceInput = { + let defaultInstance = SchedulerModel.UntagResourceInput( + resourceArn: "0", + tagKeys: []) + + return defaultInstance + }() +} + +public extension UntagResourceOutput { + /** + Default instance of the UntagResourceOutput structure. + */ + static let __default: SchedulerModel.UntagResourceOutput = { + let defaultInstance = SchedulerModel.UntagResourceOutput() + + return defaultInstance + }() +} + +public extension UpdateScheduleInput { + /** + Default instance of the UpdateScheduleInput structure. + */ + static let __default: SchedulerModel.UpdateScheduleInput = { + let defaultInstance = SchedulerModel.UpdateScheduleInput( + actionAfterCompletion: nil, + clientToken: nil, + description: nil, + endDate: nil, + flexibleTimeWindow: FlexibleTimeWindow.__default, + groupName: nil, + kmsKeyArn: nil, + name: "0", + scheduleExpression: "0", + scheduleExpressionTimezone: nil, + startDate: nil, + state: nil, + target: Target.__default) + + return defaultInstance + }() +} + +public extension UpdateScheduleOutput { + /** + Default instance of the UpdateScheduleOutput structure. + */ + static let __default: SchedulerModel.UpdateScheduleOutput = { + let defaultInstance = SchedulerModel.UpdateScheduleOutput( + scheduleArn: "0") + + return defaultInstance + }() +} + +public extension ValidationException { + /** + Default instance of the ValidationException structure. + */ + static let __default: SchedulerModel.ValidationException = { + let defaultInstance = SchedulerModel.ValidationException( + message: "value") + + return defaultInstance + }() +} diff --git a/Sources/SchedulerModel/SchedulerModelErrors.swift b/Sources/SchedulerModel/SchedulerModelErrors.swift new file mode 100644 index 0000000..df591f2 --- /dev/null +++ b/Sources/SchedulerModel/SchedulerModelErrors.swift @@ -0,0 +1,96 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerModelErrors.swift +// SchedulerModel +// + +import Foundation +import Logging + +public typealias SchedulerErrorResult = Result + +public extension Swift.Error { + func asUnrecognizedSchedulerError() -> SchedulerError { + let errorType = String(describing: type(of: self)) + let errorDescription = String(describing: self) + return .unrecognizedError(errorType, errorDescription) + } +} + +private let conflictIdentity = "ConflictException" +private let internalServerIdentity = "InternalServerException" +private let resourceNotFoundIdentity = "ResourceNotFoundException" +private let serviceQuotaExceededIdentity = "ServiceQuotaExceededException" +private let throttlingIdentity = "ThrottlingException" +private let validationIdentity = "ValidationException" +private let __accessDeniedIdentity = "AccessDenied" + +public enum SchedulerError: Swift.Error, Decodable { + case conflict(ConflictException) + case internalServer(InternalServerException) + case resourceNotFound(ResourceNotFoundException) + case serviceQuotaExceeded(ServiceQuotaExceededException) + case throttling(ThrottlingException) + case validation(ValidationException) + case accessDenied(message: String?) + case validationError(reason: String) + case unrecognizedError(String, String?) + + enum CodingKeys: String, CodingKey { + case type = "__type" + case message = "message" + } + + public init(from decoder: Decoder) throws { + let values = try decoder.container(keyedBy: CodingKeys.self) + var errorReason = try values.decodeIfPresent(String.self, forKey: .type) ?? "Unspecified" + let errorMessage = try values.decodeIfPresent(String.self, forKey: .message) + + if let index = errorReason.firstIndex(of: "#") { + errorReason = String(errorReason[errorReason.index(index, offsetBy: 1)...]) + } + + switch errorReason { + case conflictIdentity: + let errorPayload = try ConflictException(from: decoder) + self = SchedulerError.conflict(errorPayload) + case internalServerIdentity: + let errorPayload = try InternalServerException(from: decoder) + self = SchedulerError.internalServer(errorPayload) + case resourceNotFoundIdentity: + let errorPayload = try ResourceNotFoundException(from: decoder) + self = SchedulerError.resourceNotFound(errorPayload) + case serviceQuotaExceededIdentity: + let errorPayload = try ServiceQuotaExceededException(from: decoder) + self = SchedulerError.serviceQuotaExceeded(errorPayload) + case throttlingIdentity: + let errorPayload = try ThrottlingException(from: decoder) + self = SchedulerError.throttling(errorPayload) + case validationIdentity: + let errorPayload = try ValidationException(from: decoder) + self = SchedulerError.validation(errorPayload) + case __accessDeniedIdentity: + self = .accessDenied(message: errorMessage) + default: + self = SchedulerError.unrecognizedError(errorReason, errorMessage) + } + } + +} + diff --git a/Sources/SchedulerModel/SchedulerModelOperations.swift b/Sources/SchedulerModel/SchedulerModelOperations.swift new file mode 100644 index 0000000..49d270c --- /dev/null +++ b/Sources/SchedulerModel/SchedulerModelOperations.swift @@ -0,0 +1,785 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerModelOperations.swift +// SchedulerModel +// + +import Foundation + +/** + Operation enumeration for the SchedulerModel. + */ +public enum SchedulerModelOperations: String, Hashable, CustomStringConvertible { + case createSchedule = "CreateSchedule" + case createScheduleGroup = "CreateScheduleGroup" + case deleteSchedule = "DeleteSchedule" + case deleteScheduleGroup = "DeleteScheduleGroup" + case getSchedule = "GetSchedule" + case getScheduleGroup = "GetScheduleGroup" + case listScheduleGroups = "ListScheduleGroups" + case listSchedules = "ListSchedules" + case listTagsForResource = "ListTagsForResource" + case tagResource = "TagResource" + case untagResource = "UntagResource" + case updateSchedule = "UpdateSchedule" + + public var description: String { + return rawValue + } + + public var operationPath: String { + switch self { + case .createSchedule: + return "/schedules/{Name}" + case .createScheduleGroup: + return "/schedule-groups/{Name}" + case .deleteSchedule: + return "/schedules/{Name}" + case .deleteScheduleGroup: + return "/schedule-groups/{Name}" + case .getSchedule: + return "/schedules/{Name}" + case .getScheduleGroup: + return "/schedule-groups/{Name}" + case .listScheduleGroups: + return "/schedule-groups" + case .listSchedules: + return "/schedules" + case .listTagsForResource: + return "/tags/{ResourceArn}" + case .tagResource: + return "/tags/{ResourceArn}" + case .untagResource: + return "/tags/{ResourceArn}" + case .updateSchedule: + return "/schedules/{Name}" + } + } +} + +/** + Structure to encode the path input for the CreateSchedule + operation. + */ +public struct CreateScheduleOperationInputPath: Codable, Equatable { + public var name: Name + + public init(name: Name) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsName() + } +} + +public extension CreateScheduleInput { + func asSchedulerModelCreateScheduleOperationInputPath() -> CreateScheduleOperationInputPath { + return CreateScheduleOperationInputPath( + name: name) + } +} + +/** + Structure to encode the body input for the CreateSchedule + operation. + */ +public struct CreateScheduleOperationInputBody: Codable, Equatable { + public var actionAfterCompletion: ActionAfterCompletion? + public var clientToken: ClientToken? + public var description: Description? + public var endDate: EndDate? + public var flexibleTimeWindow: FlexibleTimeWindow + public var groupName: ScheduleGroupName? + public var kmsKeyArn: KmsKeyArn? + public var scheduleExpression: ScheduleExpression + public var scheduleExpressionTimezone: ScheduleExpressionTimezone? + public var startDate: StartDate? + public var state: ScheduleState? + public var target: Target + + public init(actionAfterCompletion: ActionAfterCompletion? = nil, + clientToken: ClientToken? = nil, + description: Description? = nil, + endDate: EndDate? = nil, + flexibleTimeWindow: FlexibleTimeWindow, + groupName: ScheduleGroupName? = nil, + kmsKeyArn: KmsKeyArn? = nil, + scheduleExpression: ScheduleExpression, + scheduleExpressionTimezone: ScheduleExpressionTimezone? = nil, + startDate: StartDate? = nil, + state: ScheduleState? = nil, + target: Target) { + self.actionAfterCompletion = actionAfterCompletion + self.clientToken = clientToken + self.description = description + self.endDate = endDate + self.flexibleTimeWindow = flexibleTimeWindow + self.groupName = groupName + self.kmsKeyArn = kmsKeyArn + self.scheduleExpression = scheduleExpression + self.scheduleExpressionTimezone = scheduleExpressionTimezone + self.startDate = startDate + self.state = state + self.target = target + } + + enum CodingKeys: String, CodingKey { + case actionAfterCompletion = "ActionAfterCompletion" + case clientToken = "ClientToken" + case description = "Description" + case endDate = "EndDate" + case flexibleTimeWindow = "FlexibleTimeWindow" + case groupName = "GroupName" + case kmsKeyArn = "KmsKeyArn" + case scheduleExpression = "ScheduleExpression" + case scheduleExpressionTimezone = "ScheduleExpressionTimezone" + case startDate = "StartDate" + case state = "State" + case target = "Target" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try description?.validateAsDescription() + try flexibleTimeWindow.validate() + try groupName?.validateAsScheduleGroupName() + try kmsKeyArn?.validateAsKmsKeyArn() + try scheduleExpression.validateAsScheduleExpression() + try scheduleExpressionTimezone?.validateAsScheduleExpressionTimezone() + try target.validate() + } +} + +public extension CreateScheduleInput { + func asSchedulerModelCreateScheduleOperationInputBody() -> CreateScheduleOperationInputBody { + return CreateScheduleOperationInputBody( + actionAfterCompletion: actionAfterCompletion, + clientToken: clientToken, + description: description, + endDate: endDate, + flexibleTimeWindow: flexibleTimeWindow, + groupName: groupName, + kmsKeyArn: kmsKeyArn, + scheduleExpression: scheduleExpression, + scheduleExpressionTimezone: scheduleExpressionTimezone, + startDate: startDate, + state: state, + target: target) + } +} + +/** + Structure to encode the path input for the CreateScheduleGroup + operation. + */ +public struct CreateScheduleGroupOperationInputPath: Codable, Equatable { + public var name: ScheduleGroupName + + public init(name: ScheduleGroupName) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsScheduleGroupName() + } +} + +public extension CreateScheduleGroupInput { + func asSchedulerModelCreateScheduleGroupOperationInputPath() -> CreateScheduleGroupOperationInputPath { + return CreateScheduleGroupOperationInputPath( + name: name) + } +} + +/** + Structure to encode the body input for the CreateScheduleGroup + operation. + */ +public struct CreateScheduleGroupOperationInputBody: Codable, Equatable { + public var clientToken: ClientToken? + public var tags: TagList? + + public init(clientToken: ClientToken? = nil, + tags: TagList? = nil) { + self.clientToken = clientToken + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case clientToken = "ClientToken" + case tags = "Tags" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try tags?.validateAsTagList() + } +} + +public extension CreateScheduleGroupInput { + func asSchedulerModelCreateScheduleGroupOperationInputBody() -> CreateScheduleGroupOperationInputBody { + return CreateScheduleGroupOperationInputBody( + clientToken: clientToken, + tags: tags) + } +} + +/** + Structure to encode the path input for the DeleteSchedule + operation. + */ +public struct DeleteScheduleOperationInputPath: Codable, Equatable { + public var name: Name + + public init(name: Name) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsName() + } +} + +public extension DeleteScheduleInput { + func asSchedulerModelDeleteScheduleOperationInputPath() -> DeleteScheduleOperationInputPath { + return DeleteScheduleOperationInputPath( + name: name) + } +} + +/** + Structure to encode the query input for the DeleteSchedule + operation. + */ +public struct DeleteScheduleOperationInputQuery: Codable, Equatable { + public var clientToken: ClientToken? + public var groupName: ScheduleGroupName? + + public init(clientToken: ClientToken? = nil, + groupName: ScheduleGroupName? = nil) { + self.clientToken = clientToken + self.groupName = groupName + } + + enum CodingKeys: String, CodingKey { + case clientToken + case groupName + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try groupName?.validateAsScheduleGroupName() + } +} + +public extension DeleteScheduleInput { + func asSchedulerModelDeleteScheduleOperationInputQuery() -> DeleteScheduleOperationInputQuery { + return DeleteScheduleOperationInputQuery( + clientToken: clientToken, + groupName: groupName) + } +} + +/** + Structure to encode the path input for the DeleteScheduleGroup + operation. + */ +public struct DeleteScheduleGroupOperationInputPath: Codable, Equatable { + public var name: ScheduleGroupName + + public init(name: ScheduleGroupName) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsScheduleGroupName() + } +} + +public extension DeleteScheduleGroupInput { + func asSchedulerModelDeleteScheduleGroupOperationInputPath() -> DeleteScheduleGroupOperationInputPath { + return DeleteScheduleGroupOperationInputPath( + name: name) + } +} + +/** + Structure to encode the query input for the DeleteScheduleGroup + operation. + */ +public struct DeleteScheduleGroupOperationInputQuery: Codable, Equatable { + public var clientToken: ClientToken? + + public init(clientToken: ClientToken? = nil) { + self.clientToken = clientToken + } + + enum CodingKeys: String, CodingKey { + case clientToken + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + } +} + +public extension DeleteScheduleGroupInput { + func asSchedulerModelDeleteScheduleGroupOperationInputQuery() -> DeleteScheduleGroupOperationInputQuery { + return DeleteScheduleGroupOperationInputQuery( + clientToken: clientToken) + } +} + +/** + Structure to encode the path input for the GetSchedule + operation. + */ +public struct GetScheduleOperationInputPath: Codable, Equatable { + public var name: Name + + public init(name: Name) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsName() + } +} + +public extension GetScheduleInput { + func asSchedulerModelGetScheduleOperationInputPath() -> GetScheduleOperationInputPath { + return GetScheduleOperationInputPath( + name: name) + } +} + +/** + Structure to encode the query input for the GetSchedule + operation. + */ +public struct GetScheduleOperationInputQuery: Codable, Equatable { + public var groupName: ScheduleGroupName? + + public init(groupName: ScheduleGroupName? = nil) { + self.groupName = groupName + } + + enum CodingKeys: String, CodingKey { + case groupName + } + + public func validate() throws { + try groupName?.validateAsScheduleGroupName() + } +} + +public extension GetScheduleInput { + func asSchedulerModelGetScheduleOperationInputQuery() -> GetScheduleOperationInputQuery { + return GetScheduleOperationInputQuery( + groupName: groupName) + } +} + +/** + Structure to encode the path input for the GetScheduleGroup + operation. + */ +public struct GetScheduleGroupOperationInputPath: Codable, Equatable { + public var name: ScheduleGroupName + + public init(name: ScheduleGroupName) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsScheduleGroupName() + } +} + +public extension GetScheduleGroupInput { + func asSchedulerModelGetScheduleGroupOperationInputPath() -> GetScheduleGroupOperationInputPath { + return GetScheduleGroupOperationInputPath( + name: name) + } +} + +/** + Structure to encode the query input for the ListScheduleGroups + operation. + */ +public struct ListScheduleGroupsOperationInputQuery: Codable, Equatable { + public var maxResults: MaxResults? + public var namePrefix: ScheduleGroupNamePrefix? + public var nextToken: NextToken? + + public init(maxResults: MaxResults? = nil, + namePrefix: ScheduleGroupNamePrefix? = nil, + nextToken: NextToken? = nil) { + self.maxResults = maxResults + self.namePrefix = namePrefix + self.nextToken = nextToken + } + + enum CodingKeys: String, CodingKey { + case maxResults = "MaxResults" + case namePrefix = "NamePrefix" + case nextToken = "NextToken" + } + + public func validate() throws { + try maxResults?.validateAsMaxResults() + try namePrefix?.validateAsScheduleGroupNamePrefix() + try nextToken?.validateAsNextToken() + } +} + +public extension ListScheduleGroupsInput { + func asSchedulerModelListScheduleGroupsOperationInputQuery() -> ListScheduleGroupsOperationInputQuery { + return ListScheduleGroupsOperationInputQuery( + maxResults: maxResults, + namePrefix: namePrefix, + nextToken: nextToken) + } +} + +/** + Structure to encode the query input for the ListSchedules + operation. + */ +public struct ListSchedulesOperationInputQuery: Codable, Equatable { + public var groupName: ScheduleGroupName? + public var maxResults: MaxResults? + public var namePrefix: NamePrefix? + public var nextToken: NextToken? + public var state: ScheduleState? + + public init(groupName: ScheduleGroupName? = nil, + maxResults: MaxResults? = nil, + namePrefix: NamePrefix? = nil, + nextToken: NextToken? = nil, + state: ScheduleState? = nil) { + self.groupName = groupName + self.maxResults = maxResults + self.namePrefix = namePrefix + self.nextToken = nextToken + self.state = state + } + + enum CodingKeys: String, CodingKey { + case groupName = "ScheduleGroup" + case maxResults = "MaxResults" + case namePrefix = "NamePrefix" + case nextToken = "NextToken" + case state = "State" + } + + public func validate() throws { + try groupName?.validateAsScheduleGroupName() + try maxResults?.validateAsMaxResults() + try namePrefix?.validateAsNamePrefix() + try nextToken?.validateAsNextToken() + } +} + +public extension ListSchedulesInput { + func asSchedulerModelListSchedulesOperationInputQuery() -> ListSchedulesOperationInputQuery { + return ListSchedulesOperationInputQuery( + groupName: groupName, + maxResults: maxResults, + namePrefix: namePrefix, + nextToken: nextToken, + state: state) + } +} + +/** + Structure to encode the path input for the ListTagsForResource + operation. + */ +public struct ListTagsForResourceOperationInputPath: Codable, Equatable { + public var resourceArn: TagResourceArn + + public init(resourceArn: TagResourceArn) { + self.resourceArn = resourceArn + } + + enum CodingKeys: String, CodingKey { + case resourceArn = "ResourceArn" + } + + public func validate() throws { + try resourceArn.validateAsTagResourceArn() + } +} + +public extension ListTagsForResourceInput { + func asSchedulerModelListTagsForResourceOperationInputPath() -> ListTagsForResourceOperationInputPath { + return ListTagsForResourceOperationInputPath( + resourceArn: resourceArn) + } +} + +/** + Structure to encode the path input for the TagResource + operation. + */ +public struct TagResourceOperationInputPath: Codable, Equatable { + public var resourceArn: TagResourceArn + + public init(resourceArn: TagResourceArn) { + self.resourceArn = resourceArn + } + + enum CodingKeys: String, CodingKey { + case resourceArn = "ResourceArn" + } + + public func validate() throws { + try resourceArn.validateAsTagResourceArn() + } +} + +public extension TagResourceInput { + func asSchedulerModelTagResourceOperationInputPath() -> TagResourceOperationInputPath { + return TagResourceOperationInputPath( + resourceArn: resourceArn) + } +} + +/** + Structure to encode the body input for the TagResource + operation. + */ +public struct TagResourceOperationInputBody: Codable, Equatable { + public var tags: TagList + + public init(tags: TagList) { + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case tags = "Tags" + } + + public func validate() throws { + try tags.validateAsTagList() + } +} + +public extension TagResourceInput { + func asSchedulerModelTagResourceOperationInputBody() -> TagResourceOperationInputBody { + return TagResourceOperationInputBody( + tags: tags) + } +} + +/** + Structure to encode the path input for the UntagResource + operation. + */ +public struct UntagResourceOperationInputPath: Codable, Equatable { + public var resourceArn: TagResourceArn + + public init(resourceArn: TagResourceArn) { + self.resourceArn = resourceArn + } + + enum CodingKeys: String, CodingKey { + case resourceArn = "ResourceArn" + } + + public func validate() throws { + try resourceArn.validateAsTagResourceArn() + } +} + +public extension UntagResourceInput { + func asSchedulerModelUntagResourceOperationInputPath() -> UntagResourceOperationInputPath { + return UntagResourceOperationInputPath( + resourceArn: resourceArn) + } +} + +/** + Structure to encode the query input for the UntagResource + operation. + */ +public struct UntagResourceOperationInputQuery: Codable, Equatable { + public var tagKeys: TagKeyList + + public init(tagKeys: TagKeyList) { + self.tagKeys = tagKeys + } + + enum CodingKeys: String, CodingKey { + case tagKeys = "TagKeys" + } + + public func validate() throws { + try tagKeys.validateAsTagKeyList() + } +} + +public extension UntagResourceInput { + func asSchedulerModelUntagResourceOperationInputQuery() -> UntagResourceOperationInputQuery { + return UntagResourceOperationInputQuery( + tagKeys: tagKeys) + } +} + +/** + Structure to encode the path input for the UpdateSchedule + operation. + */ +public struct UpdateScheduleOperationInputPath: Codable, Equatable { + public var name: Name + + public init(name: Name) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsName() + } +} + +public extension UpdateScheduleInput { + func asSchedulerModelUpdateScheduleOperationInputPath() -> UpdateScheduleOperationInputPath { + return UpdateScheduleOperationInputPath( + name: name) + } +} + +/** + Structure to encode the body input for the UpdateSchedule + operation. + */ +public struct UpdateScheduleOperationInputBody: Codable, Equatable { + public var actionAfterCompletion: ActionAfterCompletion? + public var clientToken: ClientToken? + public var description: Description? + public var endDate: EndDate? + public var flexibleTimeWindow: FlexibleTimeWindow + public var groupName: ScheduleGroupName? + public var kmsKeyArn: KmsKeyArn? + public var scheduleExpression: ScheduleExpression + public var scheduleExpressionTimezone: ScheduleExpressionTimezone? + public var startDate: StartDate? + public var state: ScheduleState? + public var target: Target + + public init(actionAfterCompletion: ActionAfterCompletion? = nil, + clientToken: ClientToken? = nil, + description: Description? = nil, + endDate: EndDate? = nil, + flexibleTimeWindow: FlexibleTimeWindow, + groupName: ScheduleGroupName? = nil, + kmsKeyArn: KmsKeyArn? = nil, + scheduleExpression: ScheduleExpression, + scheduleExpressionTimezone: ScheduleExpressionTimezone? = nil, + startDate: StartDate? = nil, + state: ScheduleState? = nil, + target: Target) { + self.actionAfterCompletion = actionAfterCompletion + self.clientToken = clientToken + self.description = description + self.endDate = endDate + self.flexibleTimeWindow = flexibleTimeWindow + self.groupName = groupName + self.kmsKeyArn = kmsKeyArn + self.scheduleExpression = scheduleExpression + self.scheduleExpressionTimezone = scheduleExpressionTimezone + self.startDate = startDate + self.state = state + self.target = target + } + + enum CodingKeys: String, CodingKey { + case actionAfterCompletion = "ActionAfterCompletion" + case clientToken = "ClientToken" + case description = "Description" + case endDate = "EndDate" + case flexibleTimeWindow = "FlexibleTimeWindow" + case groupName = "GroupName" + case kmsKeyArn = "KmsKeyArn" + case scheduleExpression = "ScheduleExpression" + case scheduleExpressionTimezone = "ScheduleExpressionTimezone" + case startDate = "StartDate" + case state = "State" + case target = "Target" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try description?.validateAsDescription() + try flexibleTimeWindow.validate() + try groupName?.validateAsScheduleGroupName() + try kmsKeyArn?.validateAsKmsKeyArn() + try scheduleExpression.validateAsScheduleExpression() + try scheduleExpressionTimezone?.validateAsScheduleExpressionTimezone() + try target.validate() + } +} + +public extension UpdateScheduleInput { + func asSchedulerModelUpdateScheduleOperationInputBody() -> UpdateScheduleOperationInputBody { + return UpdateScheduleOperationInputBody( + actionAfterCompletion: actionAfterCompletion, + clientToken: clientToken, + description: description, + endDate: endDate, + flexibleTimeWindow: flexibleTimeWindow, + groupName: groupName, + kmsKeyArn: kmsKeyArn, + scheduleExpression: scheduleExpression, + scheduleExpressionTimezone: scheduleExpressionTimezone, + startDate: startDate, + state: state, + target: target) + } +} diff --git a/Sources/SchedulerModel/SchedulerModelStructures.swift b/Sources/SchedulerModel/SchedulerModelStructures.swift new file mode 100644 index 0000000..4aef516 --- /dev/null +++ b/Sources/SchedulerModel/SchedulerModelStructures.swift @@ -0,0 +1,1244 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerModelStructures.swift +// SchedulerModel +// + +import Foundation + +public struct AwsVpcConfiguration: Codable, Equatable { + public var assignPublicIp: AssignPublicIp? + public var securityGroups: SecurityGroups? + public var subnets: Subnets + + public init(assignPublicIp: AssignPublicIp? = nil, + securityGroups: SecurityGroups? = nil, + subnets: Subnets) { + self.assignPublicIp = assignPublicIp + self.securityGroups = securityGroups + self.subnets = subnets + } + + enum CodingKeys: String, CodingKey { + case assignPublicIp = "AssignPublicIp" + case securityGroups = "SecurityGroups" + case subnets = "Subnets" + } + + public func validate() throws { + try securityGroups?.validateAsSecurityGroups() + try subnets.validateAsSubnets() + } +} + +public struct CapacityProviderStrategyItem: Codable, Equatable { + public var base: CapacityProviderStrategyItemBase? + public var capacityProvider: CapacityProvider + public var weight: CapacityProviderStrategyItemWeight? + + public init(base: CapacityProviderStrategyItemBase? = nil, + capacityProvider: CapacityProvider, + weight: CapacityProviderStrategyItemWeight? = nil) { + self.base = base + self.capacityProvider = capacityProvider + self.weight = weight + } + + enum CodingKeys: String, CodingKey { + case base + case capacityProvider + case weight + } + + public func validate() throws { + try base?.validateAsCapacityProviderStrategyItemBase() + try capacityProvider.validateAsCapacityProvider() + try weight?.validateAsCapacityProviderStrategyItemWeight() + } +} + +public struct ConflictException: Codable, Equatable { + public var message: String + + public init(message: String) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message = "Message" + } + + public func validate() throws { + } +} + +public struct CreateScheduleGroupInput: Codable, Equatable { + public var clientToken: ClientToken? + public var name: ScheduleGroupName + public var tags: TagList? + + public init(clientToken: ClientToken? = nil, + name: ScheduleGroupName, + tags: TagList? = nil) { + self.clientToken = clientToken + self.name = name + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case clientToken = "ClientToken" + case name = "Name" + case tags = "Tags" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try name.validateAsScheduleGroupName() + try tags?.validateAsTagList() + } +} + +public struct CreateScheduleGroupOutput: Codable, Equatable { + public var scheduleGroupArn: ScheduleGroupArn + + public init(scheduleGroupArn: ScheduleGroupArn) { + self.scheduleGroupArn = scheduleGroupArn + } + + enum CodingKeys: String, CodingKey { + case scheduleGroupArn = "ScheduleGroupArn" + } + + public func validate() throws { + try scheduleGroupArn.validateAsScheduleGroupArn() + } +} + +public struct CreateScheduleInput: Codable, Equatable { + public var actionAfterCompletion: ActionAfterCompletion? + public var clientToken: ClientToken? + public var description: Description? + public var endDate: EndDate? + public var flexibleTimeWindow: FlexibleTimeWindow + public var groupName: ScheduleGroupName? + public var kmsKeyArn: KmsKeyArn? + public var name: Name + public var scheduleExpression: ScheduleExpression + public var scheduleExpressionTimezone: ScheduleExpressionTimezone? + public var startDate: StartDate? + public var state: ScheduleState? + public var target: Target + + public init(actionAfterCompletion: ActionAfterCompletion? = nil, + clientToken: ClientToken? = nil, + description: Description? = nil, + endDate: EndDate? = nil, + flexibleTimeWindow: FlexibleTimeWindow, + groupName: ScheduleGroupName? = nil, + kmsKeyArn: KmsKeyArn? = nil, + name: Name, + scheduleExpression: ScheduleExpression, + scheduleExpressionTimezone: ScheduleExpressionTimezone? = nil, + startDate: StartDate? = nil, + state: ScheduleState? = nil, + target: Target) { + self.actionAfterCompletion = actionAfterCompletion + self.clientToken = clientToken + self.description = description + self.endDate = endDate + self.flexibleTimeWindow = flexibleTimeWindow + self.groupName = groupName + self.kmsKeyArn = kmsKeyArn + self.name = name + self.scheduleExpression = scheduleExpression + self.scheduleExpressionTimezone = scheduleExpressionTimezone + self.startDate = startDate + self.state = state + self.target = target + } + + enum CodingKeys: String, CodingKey { + case actionAfterCompletion = "ActionAfterCompletion" + case clientToken = "ClientToken" + case description = "Description" + case endDate = "EndDate" + case flexibleTimeWindow = "FlexibleTimeWindow" + case groupName = "GroupName" + case kmsKeyArn = "KmsKeyArn" + case name = "Name" + case scheduleExpression = "ScheduleExpression" + case scheduleExpressionTimezone = "ScheduleExpressionTimezone" + case startDate = "StartDate" + case state = "State" + case target = "Target" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try description?.validateAsDescription() + try flexibleTimeWindow.validate() + try groupName?.validateAsScheduleGroupName() + try kmsKeyArn?.validateAsKmsKeyArn() + try name.validateAsName() + try scheduleExpression.validateAsScheduleExpression() + try scheduleExpressionTimezone?.validateAsScheduleExpressionTimezone() + try target.validate() + } +} + +public struct CreateScheduleOutput: Codable, Equatable { + public var scheduleArn: ScheduleArn + + public init(scheduleArn: ScheduleArn) { + self.scheduleArn = scheduleArn + } + + enum CodingKeys: String, CodingKey { + case scheduleArn = "ScheduleArn" + } + + public func validate() throws { + try scheduleArn.validateAsScheduleArn() + } +} + +public struct DeadLetterConfig: Codable, Equatable { + public var arn: DeadLetterConfigArnString? + + public init(arn: DeadLetterConfigArnString? = nil) { + self.arn = arn + } + + enum CodingKeys: String, CodingKey { + case arn = "Arn" + } + + public func validate() throws { + try arn?.validateAsDeadLetterConfigArnString() + } +} + +public struct DeleteScheduleGroupInput: Codable, Equatable { + public var clientToken: ClientToken? + public var name: ScheduleGroupName + + public init(clientToken: ClientToken? = nil, + name: ScheduleGroupName) { + self.clientToken = clientToken + self.name = name + } + + enum CodingKeys: String, CodingKey { + case clientToken + case name = "Name" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try name.validateAsScheduleGroupName() + } +} + +public struct DeleteScheduleGroupOutput: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + +public struct DeleteScheduleInput: Codable, Equatable { + public var clientToken: ClientToken? + public var groupName: ScheduleGroupName? + public var name: Name + + public init(clientToken: ClientToken? = nil, + groupName: ScheduleGroupName? = nil, + name: Name) { + self.clientToken = clientToken + self.groupName = groupName + self.name = name + } + + enum CodingKeys: String, CodingKey { + case clientToken + case groupName + case name = "Name" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try groupName?.validateAsScheduleGroupName() + try name.validateAsName() + } +} + +public struct DeleteScheduleOutput: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + +public struct EcsParameters: Codable, Equatable { + public var capacityProviderStrategy: CapacityProviderStrategy? + public var enableECSManagedTags: EnableECSManagedTags? + public var enableExecuteCommand: EnableExecuteCommand? + public var group: Group? + public var launchType: LaunchType? + public var networkConfiguration: NetworkConfiguration? + public var placementConstraints: PlacementConstraints? + public var placementStrategy: PlacementStrategies? + public var platformVersion: PlatformVersion? + public var propagateTags: PropagateTags? + public var referenceId: ReferenceId? + public var tags: Tags? + public var taskCount: TaskCount? + public var taskDefinitionArn: TaskDefinitionArn + + public init(capacityProviderStrategy: CapacityProviderStrategy? = nil, + enableECSManagedTags: EnableECSManagedTags? = nil, + enableExecuteCommand: EnableExecuteCommand? = nil, + group: Group? = nil, + launchType: LaunchType? = nil, + networkConfiguration: NetworkConfiguration? = nil, + placementConstraints: PlacementConstraints? = nil, + placementStrategy: PlacementStrategies? = nil, + platformVersion: PlatformVersion? = nil, + propagateTags: PropagateTags? = nil, + referenceId: ReferenceId? = nil, + tags: Tags? = nil, + taskCount: TaskCount? = nil, + taskDefinitionArn: TaskDefinitionArn) { + self.capacityProviderStrategy = capacityProviderStrategy + self.enableECSManagedTags = enableECSManagedTags + self.enableExecuteCommand = enableExecuteCommand + self.group = group + self.launchType = launchType + self.networkConfiguration = networkConfiguration + self.placementConstraints = placementConstraints + self.placementStrategy = placementStrategy + self.platformVersion = platformVersion + self.propagateTags = propagateTags + self.referenceId = referenceId + self.tags = tags + self.taskCount = taskCount + self.taskDefinitionArn = taskDefinitionArn + } + + enum CodingKeys: String, CodingKey { + case capacityProviderStrategy = "CapacityProviderStrategy" + case enableECSManagedTags = "EnableECSManagedTags" + case enableExecuteCommand = "EnableExecuteCommand" + case group = "Group" + case launchType = "LaunchType" + case networkConfiguration = "NetworkConfiguration" + case placementConstraints = "PlacementConstraints" + case placementStrategy = "PlacementStrategy" + case platformVersion = "PlatformVersion" + case propagateTags = "PropagateTags" + case referenceId = "ReferenceId" + case tags = "Tags" + case taskCount = "TaskCount" + case taskDefinitionArn = "TaskDefinitionArn" + } + + public func validate() throws { + try capacityProviderStrategy?.validateAsCapacityProviderStrategy() + try group?.validateAsGroup() + try networkConfiguration?.validate() + try placementConstraints?.validateAsPlacementConstraints() + try placementStrategy?.validateAsPlacementStrategies() + try platformVersion?.validateAsPlatformVersion() + try referenceId?.validateAsReferenceId() + try tags?.validateAsTags() + try taskCount?.validateAsTaskCount() + try taskDefinitionArn.validateAsTaskDefinitionArn() + } +} + +public struct EventBridgeParameters: Codable, Equatable { + public var detailType: DetailType + public var source: Source + + public init(detailType: DetailType, + source: Source) { + self.detailType = detailType + self.source = source + } + + enum CodingKeys: String, CodingKey { + case detailType = "DetailType" + case source = "Source" + } + + public func validate() throws { + try detailType.validateAsDetailType() + try source.validateAsSource() + } +} + +public struct FlexibleTimeWindow: Codable, Equatable { + public var maximumWindowInMinutes: MaximumWindowInMinutes? + public var mode: FlexibleTimeWindowMode + + public init(maximumWindowInMinutes: MaximumWindowInMinutes? = nil, + mode: FlexibleTimeWindowMode) { + self.maximumWindowInMinutes = maximumWindowInMinutes + self.mode = mode + } + + enum CodingKeys: String, CodingKey { + case maximumWindowInMinutes = "MaximumWindowInMinutes" + case mode = "Mode" + } + + public func validate() throws { + try maximumWindowInMinutes?.validateAsMaximumWindowInMinutes() + } +} + +public struct GetScheduleGroupInput: Codable, Equatable { + public var name: ScheduleGroupName + + public init(name: ScheduleGroupName) { + self.name = name + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + } + + public func validate() throws { + try name.validateAsScheduleGroupName() + } +} + +public struct GetScheduleGroupOutput: Codable, Equatable { + public var arn: ScheduleGroupArn? + public var creationDate: CreationDate? + public var lastModificationDate: LastModificationDate? + public var name: ScheduleGroupName? + public var state: ScheduleGroupState? + + public init(arn: ScheduleGroupArn? = nil, + creationDate: CreationDate? = nil, + lastModificationDate: LastModificationDate? = nil, + name: ScheduleGroupName? = nil, + state: ScheduleGroupState? = nil) { + self.arn = arn + self.creationDate = creationDate + self.lastModificationDate = lastModificationDate + self.name = name + self.state = state + } + + enum CodingKeys: String, CodingKey { + case arn = "Arn" + case creationDate = "CreationDate" + case lastModificationDate = "LastModificationDate" + case name = "Name" + case state = "State" + } + + public func validate() throws { + try arn?.validateAsScheduleGroupArn() + try name?.validateAsScheduleGroupName() + } +} + +public struct GetScheduleInput: Codable, Equatable { + public var groupName: ScheduleGroupName? + public var name: Name + + public init(groupName: ScheduleGroupName? = nil, + name: Name) { + self.groupName = groupName + self.name = name + } + + enum CodingKeys: String, CodingKey { + case groupName + case name = "Name" + } + + public func validate() throws { + try groupName?.validateAsScheduleGroupName() + try name.validateAsName() + } +} + +public struct GetScheduleOutput: Codable, Equatable { + public var actionAfterCompletion: ActionAfterCompletion? + public var arn: ScheduleArn? + public var creationDate: CreationDate? + public var description: Description? + public var endDate: EndDate? + public var flexibleTimeWindow: FlexibleTimeWindow? + public var groupName: ScheduleGroupName? + public var kmsKeyArn: KmsKeyArn? + public var lastModificationDate: LastModificationDate? + public var name: Name? + public var scheduleExpression: ScheduleExpression? + public var scheduleExpressionTimezone: ScheduleExpressionTimezone? + public var startDate: StartDate? + public var state: ScheduleState? + public var target: Target? + + public init(actionAfterCompletion: ActionAfterCompletion? = nil, + arn: ScheduleArn? = nil, + creationDate: CreationDate? = nil, + description: Description? = nil, + endDate: EndDate? = nil, + flexibleTimeWindow: FlexibleTimeWindow? = nil, + groupName: ScheduleGroupName? = nil, + kmsKeyArn: KmsKeyArn? = nil, + lastModificationDate: LastModificationDate? = nil, + name: Name? = nil, + scheduleExpression: ScheduleExpression? = nil, + scheduleExpressionTimezone: ScheduleExpressionTimezone? = nil, + startDate: StartDate? = nil, + state: ScheduleState? = nil, + target: Target? = nil) { + self.actionAfterCompletion = actionAfterCompletion + self.arn = arn + self.creationDate = creationDate + self.description = description + self.endDate = endDate + self.flexibleTimeWindow = flexibleTimeWindow + self.groupName = groupName + self.kmsKeyArn = kmsKeyArn + self.lastModificationDate = lastModificationDate + self.name = name + self.scheduleExpression = scheduleExpression + self.scheduleExpressionTimezone = scheduleExpressionTimezone + self.startDate = startDate + self.state = state + self.target = target + } + + enum CodingKeys: String, CodingKey { + case actionAfterCompletion = "ActionAfterCompletion" + case arn = "Arn" + case creationDate = "CreationDate" + case description = "Description" + case endDate = "EndDate" + case flexibleTimeWindow = "FlexibleTimeWindow" + case groupName = "GroupName" + case kmsKeyArn = "KmsKeyArn" + case lastModificationDate = "LastModificationDate" + case name = "Name" + case scheduleExpression = "ScheduleExpression" + case scheduleExpressionTimezone = "ScheduleExpressionTimezone" + case startDate = "StartDate" + case state = "State" + case target = "Target" + } + + public func validate() throws { + try arn?.validateAsScheduleArn() + try description?.validateAsDescription() + try flexibleTimeWindow?.validate() + try groupName?.validateAsScheduleGroupName() + try kmsKeyArn?.validateAsKmsKeyArn() + try name?.validateAsName() + try scheduleExpression?.validateAsScheduleExpression() + try scheduleExpressionTimezone?.validateAsScheduleExpressionTimezone() + try target?.validate() + } +} + +public struct InternalServerException: Codable, Equatable { + public var message: String + + public init(message: String) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message = "Message" + } + + public func validate() throws { + } +} + +public struct KinesisParameters: Codable, Equatable { + public var partitionKey: TargetPartitionKey + + public init(partitionKey: TargetPartitionKey) { + self.partitionKey = partitionKey + } + + enum CodingKeys: String, CodingKey { + case partitionKey = "PartitionKey" + } + + public func validate() throws { + try partitionKey.validateAsTargetPartitionKey() + } +} + +public struct ListScheduleGroupsInput: Codable, Equatable { + public var maxResults: MaxResults? + public var namePrefix: ScheduleGroupNamePrefix? + public var nextToken: NextToken? + + public init(maxResults: MaxResults? = nil, + namePrefix: ScheduleGroupNamePrefix? = nil, + nextToken: NextToken? = nil) { + self.maxResults = maxResults + self.namePrefix = namePrefix + self.nextToken = nextToken + } + + enum CodingKeys: String, CodingKey { + case maxResults = "MaxResults" + case namePrefix = "NamePrefix" + case nextToken = "NextToken" + } + + public func validate() throws { + try maxResults?.validateAsMaxResults() + try namePrefix?.validateAsScheduleGroupNamePrefix() + try nextToken?.validateAsNextToken() + } +} + +public struct ListScheduleGroupsOutput: Codable, Equatable { + public var nextToken: NextToken? + public var scheduleGroups: ScheduleGroupList + + public init(nextToken: NextToken? = nil, + scheduleGroups: ScheduleGroupList) { + self.nextToken = nextToken + self.scheduleGroups = scheduleGroups + } + + enum CodingKeys: String, CodingKey { + case nextToken = "NextToken" + case scheduleGroups = "ScheduleGroups" + } + + public func validate() throws { + try nextToken?.validateAsNextToken() + } +} + +public struct ListSchedulesInput: Codable, Equatable { + public var groupName: ScheduleGroupName? + public var maxResults: MaxResults? + public var namePrefix: NamePrefix? + public var nextToken: NextToken? + public var state: ScheduleState? + + public init(groupName: ScheduleGroupName? = nil, + maxResults: MaxResults? = nil, + namePrefix: NamePrefix? = nil, + nextToken: NextToken? = nil, + state: ScheduleState? = nil) { + self.groupName = groupName + self.maxResults = maxResults + self.namePrefix = namePrefix + self.nextToken = nextToken + self.state = state + } + + enum CodingKeys: String, CodingKey { + case groupName = "ScheduleGroup" + case maxResults = "MaxResults" + case namePrefix = "NamePrefix" + case nextToken = "NextToken" + case state = "State" + } + + public func validate() throws { + try groupName?.validateAsScheduleGroupName() + try maxResults?.validateAsMaxResults() + try namePrefix?.validateAsNamePrefix() + try nextToken?.validateAsNextToken() + } +} + +public struct ListSchedulesOutput: Codable, Equatable { + public var nextToken: NextToken? + public var schedules: ScheduleList + + public init(nextToken: NextToken? = nil, + schedules: ScheduleList) { + self.nextToken = nextToken + self.schedules = schedules + } + + enum CodingKeys: String, CodingKey { + case nextToken = "NextToken" + case schedules = "Schedules" + } + + public func validate() throws { + try nextToken?.validateAsNextToken() + } +} + +public struct ListTagsForResourceInput: Codable, Equatable { + public var resourceArn: TagResourceArn + + public init(resourceArn: TagResourceArn) { + self.resourceArn = resourceArn + } + + enum CodingKeys: String, CodingKey { + case resourceArn = "ResourceArn" + } + + public func validate() throws { + try resourceArn.validateAsTagResourceArn() + } +} + +public struct ListTagsForResourceOutput: Codable, Equatable { + public var tags: TagList? + + public init(tags: TagList? = nil) { + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case tags = "Tags" + } + + public func validate() throws { + try tags?.validateAsTagList() + } +} + +public struct NetworkConfiguration: Codable, Equatable { + public var awsvpcConfiguration: AwsVpcConfiguration? + + public init(awsvpcConfiguration: AwsVpcConfiguration? = nil) { + self.awsvpcConfiguration = awsvpcConfiguration + } + + enum CodingKeys: String, CodingKey { + case awsvpcConfiguration + } + + public func validate() throws { + try awsvpcConfiguration?.validate() + } +} + +public struct PlacementConstraint: Codable, Equatable { + public var expression: PlacementConstraintExpression? + public var type: PlacementConstraintType? + + public init(expression: PlacementConstraintExpression? = nil, + type: PlacementConstraintType? = nil) { + self.expression = expression + self.type = type + } + + enum CodingKeys: String, CodingKey { + case expression + case type + } + + public func validate() throws { + try expression?.validateAsPlacementConstraintExpression() + } +} + +public struct PlacementStrategy: Codable, Equatable { + public var field: PlacementStrategyField? + public var type: PlacementStrategyType? + + public init(field: PlacementStrategyField? = nil, + type: PlacementStrategyType? = nil) { + self.field = field + self.type = type + } + + enum CodingKeys: String, CodingKey { + case field + case type + } + + public func validate() throws { + try field?.validateAsPlacementStrategyField() + } +} + +public struct ResourceNotFoundException: Codable, Equatable { + public var message: String + + public init(message: String) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message = "Message" + } + + public func validate() throws { + } +} + +public struct RetryPolicy: Codable, Equatable { + public var maximumEventAgeInSeconds: MaximumEventAgeInSeconds? + public var maximumRetryAttempts: MaximumRetryAttempts? + + public init(maximumEventAgeInSeconds: MaximumEventAgeInSeconds? = nil, + maximumRetryAttempts: MaximumRetryAttempts? = nil) { + self.maximumEventAgeInSeconds = maximumEventAgeInSeconds + self.maximumRetryAttempts = maximumRetryAttempts + } + + enum CodingKeys: String, CodingKey { + case maximumEventAgeInSeconds = "MaximumEventAgeInSeconds" + case maximumRetryAttempts = "MaximumRetryAttempts" + } + + public func validate() throws { + try maximumEventAgeInSeconds?.validateAsMaximumEventAgeInSeconds() + try maximumRetryAttempts?.validateAsMaximumRetryAttempts() + } +} + +public struct SageMakerPipelineParameter: Codable, Equatable { + public var name: SageMakerPipelineParameterName + public var value: SageMakerPipelineParameterValue + + public init(name: SageMakerPipelineParameterName, + value: SageMakerPipelineParameterValue) { + self.name = name + self.value = value + } + + enum CodingKeys: String, CodingKey { + case name = "Name" + case value = "Value" + } + + public func validate() throws { + try name.validateAsSageMakerPipelineParameterName() + try value.validateAsSageMakerPipelineParameterValue() + } +} + +public struct SageMakerPipelineParameters: Codable, Equatable { + public var pipelineParameterList: SageMakerPipelineParameterList? + + public init(pipelineParameterList: SageMakerPipelineParameterList? = nil) { + self.pipelineParameterList = pipelineParameterList + } + + enum CodingKeys: String, CodingKey { + case pipelineParameterList = "PipelineParameterList" + } + + public func validate() throws { + try pipelineParameterList?.validateAsSageMakerPipelineParameterList() + } +} + +public struct ScheduleGroupSummary: Codable, Equatable { + public var arn: ScheduleGroupArn? + public var creationDate: CreationDate? + public var lastModificationDate: LastModificationDate? + public var name: ScheduleGroupName? + public var state: ScheduleGroupState? + + public init(arn: ScheduleGroupArn? = nil, + creationDate: CreationDate? = nil, + lastModificationDate: LastModificationDate? = nil, + name: ScheduleGroupName? = nil, + state: ScheduleGroupState? = nil) { + self.arn = arn + self.creationDate = creationDate + self.lastModificationDate = lastModificationDate + self.name = name + self.state = state + } + + enum CodingKeys: String, CodingKey { + case arn = "Arn" + case creationDate = "CreationDate" + case lastModificationDate = "LastModificationDate" + case name = "Name" + case state = "State" + } + + public func validate() throws { + try arn?.validateAsScheduleGroupArn() + try name?.validateAsScheduleGroupName() + } +} + +public struct ScheduleSummary: Codable, Equatable { + public var arn: ScheduleArn? + public var creationDate: CreationDate? + public var groupName: ScheduleGroupName? + public var lastModificationDate: LastModificationDate? + public var name: Name? + public var state: ScheduleState? + public var target: TargetSummary? + + public init(arn: ScheduleArn? = nil, + creationDate: CreationDate? = nil, + groupName: ScheduleGroupName? = nil, + lastModificationDate: LastModificationDate? = nil, + name: Name? = nil, + state: ScheduleState? = nil, + target: TargetSummary? = nil) { + self.arn = arn + self.creationDate = creationDate + self.groupName = groupName + self.lastModificationDate = lastModificationDate + self.name = name + self.state = state + self.target = target + } + + enum CodingKeys: String, CodingKey { + case arn = "Arn" + case creationDate = "CreationDate" + case groupName = "GroupName" + case lastModificationDate = "LastModificationDate" + case name = "Name" + case state = "State" + case target = "Target" + } + + public func validate() throws { + try arn?.validateAsScheduleArn() + try groupName?.validateAsScheduleGroupName() + try name?.validateAsName() + try target?.validate() + } +} + +public struct ServiceQuotaExceededException: Codable, Equatable { + public var message: String + + public init(message: String) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message = "Message" + } + + public func validate() throws { + } +} + +public struct SqsParameters: Codable, Equatable { + public var messageGroupId: MessageGroupId? + + public init(messageGroupId: MessageGroupId? = nil) { + self.messageGroupId = messageGroupId + } + + enum CodingKeys: String, CodingKey { + case messageGroupId = "MessageGroupId" + } + + public func validate() throws { + try messageGroupId?.validateAsMessageGroupId() + } +} + +public struct Tag: Codable, Equatable { + public var key: TagKey + public var value: TagValue + + public init(key: TagKey, + value: TagValue) { + self.key = key + self.value = value + } + + enum CodingKeys: String, CodingKey { + case key = "Key" + case value = "Value" + } + + public func validate() throws { + try key.validateAsTagKey() + try value.validateAsTagValue() + } +} + +public struct TagResourceInput: Codable, Equatable { + public var resourceArn: TagResourceArn + public var tags: TagList + + public init(resourceArn: TagResourceArn, + tags: TagList) { + self.resourceArn = resourceArn + self.tags = tags + } + + enum CodingKeys: String, CodingKey { + case resourceArn = "ResourceArn" + case tags = "Tags" + } + + public func validate() throws { + try resourceArn.validateAsTagResourceArn() + try tags.validateAsTagList() + } +} + +public struct TagResourceOutput: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + +public struct Target: Codable, Equatable { + public var arn: TargetArn + public var deadLetterConfig: DeadLetterConfig? + public var ecsParameters: EcsParameters? + public var eventBridgeParameters: EventBridgeParameters? + public var input: TargetInput? + public var kinesisParameters: KinesisParameters? + public var retryPolicy: RetryPolicy? + public var roleArn: RoleArn + public var sageMakerPipelineParameters: SageMakerPipelineParameters? + public var sqsParameters: SqsParameters? + + public init(arn: TargetArn, + deadLetterConfig: DeadLetterConfig? = nil, + ecsParameters: EcsParameters? = nil, + eventBridgeParameters: EventBridgeParameters? = nil, + input: TargetInput? = nil, + kinesisParameters: KinesisParameters? = nil, + retryPolicy: RetryPolicy? = nil, + roleArn: RoleArn, + sageMakerPipelineParameters: SageMakerPipelineParameters? = nil, + sqsParameters: SqsParameters? = nil) { + self.arn = arn + self.deadLetterConfig = deadLetterConfig + self.ecsParameters = ecsParameters + self.eventBridgeParameters = eventBridgeParameters + self.input = input + self.kinesisParameters = kinesisParameters + self.retryPolicy = retryPolicy + self.roleArn = roleArn + self.sageMakerPipelineParameters = sageMakerPipelineParameters + self.sqsParameters = sqsParameters + } + + enum CodingKeys: String, CodingKey { + case arn = "Arn" + case deadLetterConfig = "DeadLetterConfig" + case ecsParameters = "EcsParameters" + case eventBridgeParameters = "EventBridgeParameters" + case input = "Input" + case kinesisParameters = "KinesisParameters" + case retryPolicy = "RetryPolicy" + case roleArn = "RoleArn" + case sageMakerPipelineParameters = "SageMakerPipelineParameters" + case sqsParameters = "SqsParameters" + } + + public func validate() throws { + try arn.validateAsTargetArn() + try deadLetterConfig?.validate() + try ecsParameters?.validate() + try eventBridgeParameters?.validate() + try input?.validateAsTargetInput() + try kinesisParameters?.validate() + try retryPolicy?.validate() + try roleArn.validateAsRoleArn() + try sageMakerPipelineParameters?.validate() + try sqsParameters?.validate() + } +} + +public struct TargetSummary: Codable, Equatable { + public var arn: TargetArn + + public init(arn: TargetArn) { + self.arn = arn + } + + enum CodingKeys: String, CodingKey { + case arn = "Arn" + } + + public func validate() throws { + try arn.validateAsTargetArn() + } +} + +public struct ThrottlingException: Codable, Equatable { + public var message: String + + public init(message: String) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message = "Message" + } + + public func validate() throws { + } +} + +public struct UntagResourceInput: Codable, Equatable { + public var resourceArn: TagResourceArn + public var tagKeys: TagKeyList + + public init(resourceArn: TagResourceArn, + tagKeys: TagKeyList) { + self.resourceArn = resourceArn + self.tagKeys = tagKeys + } + + enum CodingKeys: String, CodingKey { + case resourceArn = "ResourceArn" + case tagKeys = "TagKeys" + } + + public func validate() throws { + try resourceArn.validateAsTagResourceArn() + try tagKeys.validateAsTagKeyList() + } +} + +public struct UntagResourceOutput: Codable, Equatable { + + public init() { + } + + public func validate() throws { + } +} + +public struct UpdateScheduleInput: Codable, Equatable { + public var actionAfterCompletion: ActionAfterCompletion? + public var clientToken: ClientToken? + public var description: Description? + public var endDate: EndDate? + public var flexibleTimeWindow: FlexibleTimeWindow + public var groupName: ScheduleGroupName? + public var kmsKeyArn: KmsKeyArn? + public var name: Name + public var scheduleExpression: ScheduleExpression + public var scheduleExpressionTimezone: ScheduleExpressionTimezone? + public var startDate: StartDate? + public var state: ScheduleState? + public var target: Target + + public init(actionAfterCompletion: ActionAfterCompletion? = nil, + clientToken: ClientToken? = nil, + description: Description? = nil, + endDate: EndDate? = nil, + flexibleTimeWindow: FlexibleTimeWindow, + groupName: ScheduleGroupName? = nil, + kmsKeyArn: KmsKeyArn? = nil, + name: Name, + scheduleExpression: ScheduleExpression, + scheduleExpressionTimezone: ScheduleExpressionTimezone? = nil, + startDate: StartDate? = nil, + state: ScheduleState? = nil, + target: Target) { + self.actionAfterCompletion = actionAfterCompletion + self.clientToken = clientToken + self.description = description + self.endDate = endDate + self.flexibleTimeWindow = flexibleTimeWindow + self.groupName = groupName + self.kmsKeyArn = kmsKeyArn + self.name = name + self.scheduleExpression = scheduleExpression + self.scheduleExpressionTimezone = scheduleExpressionTimezone + self.startDate = startDate + self.state = state + self.target = target + } + + enum CodingKeys: String, CodingKey { + case actionAfterCompletion = "ActionAfterCompletion" + case clientToken = "ClientToken" + case description = "Description" + case endDate = "EndDate" + case flexibleTimeWindow = "FlexibleTimeWindow" + case groupName = "GroupName" + case kmsKeyArn = "KmsKeyArn" + case name = "Name" + case scheduleExpression = "ScheduleExpression" + case scheduleExpressionTimezone = "ScheduleExpressionTimezone" + case startDate = "StartDate" + case state = "State" + case target = "Target" + } + + public func validate() throws { + try clientToken?.validateAsClientToken() + try description?.validateAsDescription() + try flexibleTimeWindow.validate() + try groupName?.validateAsScheduleGroupName() + try kmsKeyArn?.validateAsKmsKeyArn() + try name.validateAsName() + try scheduleExpression.validateAsScheduleExpression() + try scheduleExpressionTimezone?.validateAsScheduleExpressionTimezone() + try target.validate() + } +} + +public struct UpdateScheduleOutput: Codable, Equatable { + public var scheduleArn: ScheduleArn + + public init(scheduleArn: ScheduleArn) { + self.scheduleArn = scheduleArn + } + + enum CodingKeys: String, CodingKey { + case scheduleArn = "ScheduleArn" + } + + public func validate() throws { + try scheduleArn.validateAsScheduleArn() + } +} + +public struct ValidationException: Codable, Equatable { + public var message: String + + public init(message: String) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message = "Message" + } + + public func validate() throws { + } +} diff --git a/Sources/SchedulerModel/SchedulerModelTypes.swift b/Sources/SchedulerModel/SchedulerModelTypes.swift new file mode 100644 index 0000000..93cb730 --- /dev/null +++ b/Sources/SchedulerModel/SchedulerModelTypes.swift @@ -0,0 +1,1270 @@ +// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment +// swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity +// -- Generated Code; do not edit -- +// +// SchedulerModelTypes.swift +// SchedulerModel +// + +import Foundation + +/** + Enumeration restricting the values of the ActionAfterCompletion field. + */ +public enum ActionAfterCompletion: String, Codable, CustomStringConvertible { + case delete = "DELETE" + case none = "NONE" + + public var description: String { + return rawValue + } + + public static let __default: ActionAfterCompletion = .delete +} + +/** + Enumeration restricting the values of the AssignPublicIp field. + */ +public enum AssignPublicIp: String, Codable, CustomStringConvertible { + case disabled = "DISABLED" + case enabled = "ENABLED" + + public var description: String { + return rawValue + } + + public static let __default: AssignPublicIp = .disabled +} + +/** + Type definition for the CapacityProvider field. + */ +public typealias CapacityProvider = String + +/** + Type definition for the CapacityProviderStrategy field. + */ +public typealias CapacityProviderStrategy = [CapacityProviderStrategyItem] + +/** + Type definition for the CapacityProviderStrategyItemBase field. + */ +public typealias CapacityProviderStrategyItemBase = Int + +/** + Type definition for the CapacityProviderStrategyItemWeight field. + */ +public typealias CapacityProviderStrategyItemWeight = Int + +/** + Type definition for the ClientToken field. + */ +public typealias ClientToken = String + +/** + Type definition for the CreationDate field. + */ +public typealias CreationDate = String + +/** + Type definition for the DeadLetterConfigArnString field. + */ +public typealias DeadLetterConfigArnString = String + +/** + Type definition for the Description field. + */ +public typealias Description = String + +/** + Type definition for the DetailType field. + */ +public typealias DetailType = String + +/** + Type definition for the EnableECSManagedTags field. + */ +public typealias EnableECSManagedTags = Bool + +/** + Type definition for the EnableExecuteCommand field. + */ +public typealias EnableExecuteCommand = Bool + +/** + Type definition for the EndDate field. + */ +public typealias EndDate = String + +/** + Enumeration restricting the values of the FlexibleTimeWindowMode field. + */ +public enum FlexibleTimeWindowMode: String, Codable, CustomStringConvertible { + case flexible = "FLEXIBLE" + case off = "OFF" + + public var description: String { + return rawValue + } + + public static let __default: FlexibleTimeWindowMode = .flexible +} + +/** + Type definition for the Group field. + */ +public typealias Group = String + +/** + Type definition for the KmsKeyArn field. + */ +public typealias KmsKeyArn = String + +/** + Type definition for the LastModificationDate field. + */ +public typealias LastModificationDate = String + +/** + Enumeration restricting the values of the LaunchType field. + */ +public enum LaunchType: String, Codable, CustomStringConvertible { + case ec2 = "EC2" + case external = "EXTERNAL" + case fargate = "FARGATE" + + public var description: String { + return rawValue + } + + public static let __default: LaunchType = .ec2 +} + +/** + Type definition for the MaxResults field. + */ +public typealias MaxResults = Int + +/** + Type definition for the MaximumEventAgeInSeconds field. + */ +public typealias MaximumEventAgeInSeconds = Int + +/** + Type definition for the MaximumRetryAttempts field. + */ +public typealias MaximumRetryAttempts = Int + +/** + Type definition for the MaximumWindowInMinutes field. + */ +public typealias MaximumWindowInMinutes = Int + +/** + Type definition for the MessageGroupId field. + */ +public typealias MessageGroupId = String + +/** + Type definition for the Name field. + */ +public typealias Name = String + +/** + Type definition for the NamePrefix field. + */ +public typealias NamePrefix = String + +/** + Type definition for the NextToken field. + */ +public typealias NextToken = String + +/** + Type definition for the PlacementConstraintExpression field. + */ +public typealias PlacementConstraintExpression = String + +/** + Enumeration restricting the values of the PlacementConstraintType field. + */ +public enum PlacementConstraintType: String, Codable, CustomStringConvertible { + case distinctinstance = "distinctInstance" + case memberof = "memberOf" + + public var description: String { + return rawValue + } + + public static let __default: PlacementConstraintType = .distinctinstance +} + +/** + Type definition for the PlacementConstraints field. + */ +public typealias PlacementConstraints = [PlacementConstraint] + +/** + Type definition for the PlacementStrategies field. + */ +public typealias PlacementStrategies = [PlacementStrategy] + +/** + Type definition for the PlacementStrategyField field. + */ +public typealias PlacementStrategyField = String + +/** + Enumeration restricting the values of the PlacementStrategyType field. + */ +public enum PlacementStrategyType: String, Codable, CustomStringConvertible { + case binpack + case random + case spread + + public var description: String { + return rawValue + } + + public static let __default: PlacementStrategyType = .binpack +} + +/** + Type definition for the PlatformVersion field. + */ +public typealias PlatformVersion = String + +/** + Enumeration restricting the values of the PropagateTags field. + */ +public enum PropagateTags: String, Codable, CustomStringConvertible { + case taskDefinition = "TASK_DEFINITION" + + public var description: String { + return rawValue + } + + public static let __default: PropagateTags = .taskDefinition +} + +/** + Type definition for the ReferenceId field. + */ +public typealias ReferenceId = String + +/** + Type definition for the RoleArn field. + */ +public typealias RoleArn = String + +/** + Type definition for the SageMakerPipelineParameterList field. + */ +public typealias SageMakerPipelineParameterList = [SageMakerPipelineParameter] + +/** + Type definition for the SageMakerPipelineParameterName field. + */ +public typealias SageMakerPipelineParameterName = String + +/** + Type definition for the SageMakerPipelineParameterValue field. + */ +public typealias SageMakerPipelineParameterValue = String + +/** + Type definition for the ScheduleArn field. + */ +public typealias ScheduleArn = String + +/** + Type definition for the ScheduleExpression field. + */ +public typealias ScheduleExpression = String + +/** + Type definition for the ScheduleExpressionTimezone field. + */ +public typealias ScheduleExpressionTimezone = String + +/** + Type definition for the ScheduleGroupArn field. + */ +public typealias ScheduleGroupArn = String + +/** + Type definition for the ScheduleGroupList field. + */ +public typealias ScheduleGroupList = [ScheduleGroupSummary] + +/** + Type definition for the ScheduleGroupName field. + */ +public typealias ScheduleGroupName = String + +/** + Type definition for the ScheduleGroupNamePrefix field. + */ +public typealias ScheduleGroupNamePrefix = String + +/** + Enumeration restricting the values of the ScheduleGroupState field. + */ +public enum ScheduleGroupState: String, Codable, CustomStringConvertible { + case active = "ACTIVE" + case deleting = "DELETING" + + public var description: String { + return rawValue + } + + public static let __default: ScheduleGroupState = .active +} + +/** + Type definition for the ScheduleList field. + */ +public typealias ScheduleList = [ScheduleSummary] + +/** + Enumeration restricting the values of the ScheduleState field. + */ +public enum ScheduleState: String, Codable, CustomStringConvertible { + case disabled = "DISABLED" + case enabled = "ENABLED" + + public var description: String { + return rawValue + } + + public static let __default: ScheduleState = .disabled +} + +/** + Type definition for the SecurityGroup field. + */ +public typealias SecurityGroup = String + +/** + Type definition for the SecurityGroups field. + */ +public typealias SecurityGroups = [SecurityGroup] + +/** + Type definition for the Source field. + */ +public typealias Source = String + +/** + Type definition for the StartDate field. + */ +public typealias StartDate = String + +/** + Type definition for the Subnet field. + */ +public typealias Subnet = String + +/** + Type definition for the Subnets field. + */ +public typealias Subnets = [Subnet] + +/** + Type definition for the TagKey field. + */ +public typealias TagKey = String + +/** + Type definition for the TagKeyList field. + */ +public typealias TagKeyList = [TagKey] + +/** + Type definition for the TagList field. + */ +public typealias TagList = [Tag] + +/** + Type definition for the TagMap field. + */ +public typealias TagMap = [TagKey: TagValue] + +/** + Type definition for the TagResourceArn field. + */ +public typealias TagResourceArn = String + +/** + Type definition for the TagValue field. + */ +public typealias TagValue = String + +/** + Type definition for the Tags field. + */ +public typealias Tags = [TagMap] + +/** + Type definition for the TargetArn field. + */ +public typealias TargetArn = String + +/** + Type definition for the TargetInput field. + */ +public typealias TargetInput = String + +/** + Type definition for the TargetPartitionKey field. + */ +public typealias TargetPartitionKey = String + +/** + Type definition for the TaskCount field. + */ +public typealias TaskCount = Int + +/** + Type definition for the TaskDefinitionArn field. + */ +public typealias TaskDefinitionArn = String + +/** + Validation for the CapacityProvider field. +*/ +extension SchedulerModel.CapacityProvider { + public func validateAsCapacityProvider() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProvider violated the minimum length constraint.") + } + + if self.count > 255 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProvider violated the maximum length constraint.") + } + } +} + +/** + Validation for the CapacityProviderStrategy field. +*/ +extension Array where Element == SchedulerModel.CapacityProviderStrategyItem { + public func validateAsCapacityProviderStrategy() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProviderStrategy violated the minimum length constraint.") + } + + if self.count > 6 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProviderStrategy violated the maximum length constraint.") + } + } +} + +/** + Validation for the CapacityProviderStrategyItemBase field. +*/ +extension SchedulerModel.CapacityProviderStrategyItemBase { + public func validateAsCapacityProviderStrategyItemBase() throws { + if self < 0 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProviderStrategyItemBase violated the minimum range constraint.") + } + + if self > 100000 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProviderStrategyItemBase violated the maximum range constraint.") + } + } +} + +/** + Validation for the CapacityProviderStrategyItemWeight field. +*/ +extension SchedulerModel.CapacityProviderStrategyItemWeight { + public func validateAsCapacityProviderStrategyItemWeight() throws { + if self < 0 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProviderStrategyItemWeight violated the minimum range constraint.") + } + + if self > 1000 { + throw SchedulerError.validationError(reason: "The provided value to CapacityProviderStrategyItemWeight violated the maximum range constraint.") + } + } +} + +/** + Validation for the ClientToken field. +*/ +extension SchedulerModel.ClientToken { + public func validateAsClientToken() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to ClientToken violated the minimum length constraint.") + } + + if self.count > 64 { + throw SchedulerError.validationError(reason: "The provided value to ClientToken violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^[a-zA-Z0-9-_]+$", options: .regularExpression), + matchingRange == startIndex.. 1600 { + throw SchedulerError.validationError(reason: "The provided value to DeadLetterConfigArnString violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^arn:aws(-[a-z]+)?:sqs:[a-z0-9\\-]+:\\d{12}:[a-zA-Z0-9\\-_]+$", options: .regularExpression), + matchingRange == startIndex.. 512 { + throw SchedulerError.validationError(reason: "The provided value to Description violated the maximum length constraint.") + } + } +} + +/** + Validation for the DetailType field. +*/ +extension SchedulerModel.DetailType { + public func validateAsDetailType() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to DetailType violated the minimum length constraint.") + } + + if self.count > 128 { + throw SchedulerError.validationError(reason: "The provided value to DetailType violated the maximum length constraint.") + } + } +} + +/** + Validation for the Group field. +*/ +extension SchedulerModel.Group { + public func validateAsGroup() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to Group violated the minimum length constraint.") + } + + if self.count > 255 { + throw SchedulerError.validationError(reason: "The provided value to Group violated the maximum length constraint.") + } + } +} + +/** + Validation for the KmsKeyArn field. +*/ +extension SchedulerModel.KmsKeyArn { + public func validateAsKmsKeyArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to KmsKeyArn violated the minimum length constraint.") + } + + if self.count > 2048 { + throw SchedulerError.validationError(reason: "The provided value to KmsKeyArn violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^arn:aws(-[a-z]+)?:kms:[a-z0-9\\-]+:\\d{12}:(key|alias)\\/[0-9a-zA-Z-_]*$", options: .regularExpression), + matchingRange == startIndex.. 100 { + throw SchedulerError.validationError(reason: "The provided value to MaxResults violated the maximum range constraint.") + } + } +} + +/** + Validation for the MaximumEventAgeInSeconds field. +*/ +extension SchedulerModel.MaximumEventAgeInSeconds { + public func validateAsMaximumEventAgeInSeconds() throws { + if self < 60 { + throw SchedulerError.validationError(reason: "The provided value to MaximumEventAgeInSeconds violated the minimum range constraint.") + } + + if self > 86400 { + throw SchedulerError.validationError(reason: "The provided value to MaximumEventAgeInSeconds violated the maximum range constraint.") + } + } +} + +/** + Validation for the MaximumRetryAttempts field. +*/ +extension SchedulerModel.MaximumRetryAttempts { + public func validateAsMaximumRetryAttempts() throws { + if self < 0 { + throw SchedulerError.validationError(reason: "The provided value to MaximumRetryAttempts violated the minimum range constraint.") + } + + if self > 185 { + throw SchedulerError.validationError(reason: "The provided value to MaximumRetryAttempts violated the maximum range constraint.") + } + } +} + +/** + Validation for the MaximumWindowInMinutes field. +*/ +extension SchedulerModel.MaximumWindowInMinutes { + public func validateAsMaximumWindowInMinutes() throws { + if self < 1 { + throw SchedulerError.validationError(reason: "The provided value to MaximumWindowInMinutes violated the minimum range constraint.") + } + + if self > 1440 { + throw SchedulerError.validationError(reason: "The provided value to MaximumWindowInMinutes violated the maximum range constraint.") + } + } +} + +/** + Validation for the MessageGroupId field. +*/ +extension SchedulerModel.MessageGroupId { + public func validateAsMessageGroupId() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to MessageGroupId violated the minimum length constraint.") + } + + if self.count > 128 { + throw SchedulerError.validationError(reason: "The provided value to MessageGroupId violated the maximum length constraint.") + } + } +} + +/** + Validation for the Name field. +*/ +extension SchedulerModel.Name { + public func validateAsName() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to Name violated the minimum length constraint.") + } + + if self.count > 64 { + throw SchedulerError.validationError(reason: "The provided value to Name violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 64 { + throw SchedulerError.validationError(reason: "The provided value to NamePrefix violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 2048 { + throw SchedulerError.validationError(reason: "The provided value to NextToken violated the maximum length constraint.") + } + } +} + +/** + Validation for the PlacementConstraintExpression field. +*/ +extension SchedulerModel.PlacementConstraintExpression { + public func validateAsPlacementConstraintExpression() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to PlacementConstraintExpression violated the minimum length constraint.") + } + + if self.count > 2000 { + throw SchedulerError.validationError(reason: "The provided value to PlacementConstraintExpression violated the maximum length constraint.") + } + } +} + +/** + Validation for the PlacementConstraints field. +*/ +extension Array where Element == SchedulerModel.PlacementConstraint { + public func validateAsPlacementConstraints() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to PlacementConstraints violated the minimum length constraint.") + } + + if self.count > 10 { + throw SchedulerError.validationError(reason: "The provided value to PlacementConstraints violated the maximum length constraint.") + } + } +} + +/** + Validation for the PlacementStrategies field. +*/ +extension Array where Element == SchedulerModel.PlacementStrategy { + public func validateAsPlacementStrategies() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to PlacementStrategies violated the minimum length constraint.") + } + + if self.count > 5 { + throw SchedulerError.validationError(reason: "The provided value to PlacementStrategies violated the maximum length constraint.") + } + } +} + +/** + Validation for the PlacementStrategyField field. +*/ +extension SchedulerModel.PlacementStrategyField { + public func validateAsPlacementStrategyField() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to PlacementStrategyField violated the minimum length constraint.") + } + + if self.count > 255 { + throw SchedulerError.validationError(reason: "The provided value to PlacementStrategyField violated the maximum length constraint.") + } + } +} + +/** + Validation for the PlatformVersion field. +*/ +extension SchedulerModel.PlatformVersion { + public func validateAsPlatformVersion() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to PlatformVersion violated the minimum length constraint.") + } + + if self.count > 64 { + throw SchedulerError.validationError(reason: "The provided value to PlatformVersion violated the maximum length constraint.") + } + } +} + +/** + Validation for the ReferenceId field. +*/ +extension SchedulerModel.ReferenceId { + public func validateAsReferenceId() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to ReferenceId violated the minimum length constraint.") + } + + if self.count > 1024 { + throw SchedulerError.validationError(reason: "The provided value to ReferenceId violated the maximum length constraint.") + } + } +} + +/** + Validation for the RoleArn field. +*/ +extension SchedulerModel.RoleArn { + public func validateAsRoleArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to RoleArn violated the minimum length constraint.") + } + + if self.count > 1600 { + throw SchedulerError.validationError(reason: "The provided value to RoleArn violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^arn:aws(-[a-z]+)?:iam::\\d{12}:role\\/[\\w+=,.@\\/-]+$", options: .regularExpression), + matchingRange == startIndex.. 200 { + throw SchedulerError.validationError(reason: "The provided value to SageMakerPipelineParameterList violated the maximum length constraint.") + } + } +} + +/** + Validation for the SageMakerPipelineParameterName field. +*/ +extension SchedulerModel.SageMakerPipelineParameterName { + public func validateAsSageMakerPipelineParameterName() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to SageMakerPipelineParameterName violated the minimum length constraint.") + } + + if self.count > 256 { + throw SchedulerError.validationError(reason: "The provided value to SageMakerPipelineParameterName violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^[A-Za-z0-9\\-_]*$", options: .regularExpression), + matchingRange == startIndex.. 1024 { + throw SchedulerError.validationError(reason: "The provided value to SageMakerPipelineParameterValue violated the maximum length constraint.") + } + } +} + +/** + Validation for the ScheduleArn field. +*/ +extension SchedulerModel.ScheduleArn { + public func validateAsScheduleArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleArn violated the minimum length constraint.") + } + + if self.count > 1224 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleArn violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^arn:aws(-[a-z]+)?:scheduler:[a-z0-9\\-]+:\\d{12}:schedule\\/[0-9a-zA-Z-_.]+\\/[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 256 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleExpression violated the maximum length constraint.") + } + } +} + +/** + Validation for the ScheduleExpressionTimezone field. +*/ +extension SchedulerModel.ScheduleExpressionTimezone { + public func validateAsScheduleExpressionTimezone() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleExpressionTimezone violated the minimum length constraint.") + } + + if self.count > 50 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleExpressionTimezone violated the maximum length constraint.") + } + } +} + +/** + Validation for the ScheduleGroupArn field. +*/ +extension SchedulerModel.ScheduleGroupArn { + public func validateAsScheduleGroupArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleGroupArn violated the minimum length constraint.") + } + + if self.count > 1224 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleGroupArn violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^arn:aws(-[a-z]+)?:scheduler:[a-z0-9\\-]+:\\d{12}:schedule-group\\/[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 64 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleGroupName violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 64 { + throw SchedulerError.validationError(reason: "The provided value to ScheduleGroupNamePrefix violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 1000 { + throw SchedulerError.validationError(reason: "The provided value to SecurityGroup violated the maximum length constraint.") + } + } +} + +/** + Validation for the SecurityGroups field. +*/ +extension Array where Element == SchedulerModel.SecurityGroup { + public func validateAsSecurityGroups() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to SecurityGroups violated the minimum length constraint.") + } + + if self.count > 5 { + throw SchedulerError.validationError(reason: "The provided value to SecurityGroups violated the maximum length constraint.") + } + } +} + +/** + Validation for the Source field. +*/ +extension SchedulerModel.Source { + public func validateAsSource() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to Source violated the minimum length constraint.") + } + + if self.count > 256 { + throw SchedulerError.validationError(reason: "The provided value to Source violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^(?=[/\\.\\-_A-Za-z0-9]+)((?!aws\\.).*)|(\\$(\\.[\\w_-]+(\\[(\\d+|\\*)\\])*)*)$", options: .regularExpression), + matchingRange == startIndex.. 1000 { + throw SchedulerError.validationError(reason: "The provided value to Subnet violated the maximum length constraint.") + } + } +} + +/** + Validation for the Subnets field. +*/ +extension Array where Element == SchedulerModel.Subnet { + public func validateAsSubnets() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to Subnets violated the minimum length constraint.") + } + + if self.count > 16 { + throw SchedulerError.validationError(reason: "The provided value to Subnets violated the maximum length constraint.") + } + } +} + +/** + Validation for the TagKey field. +*/ +extension SchedulerModel.TagKey { + public func validateAsTagKey() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to TagKey violated the minimum length constraint.") + } + + if self.count > 128 { + throw SchedulerError.validationError(reason: "The provided value to TagKey violated the maximum length constraint.") + } + } +} + +/** + Validation for the TagKeyList field. +*/ +extension Array where Element == SchedulerModel.TagKey { + public func validateAsTagKeyList() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to TagKeyList violated the minimum length constraint.") + } + + if self.count > 200 { + throw SchedulerError.validationError(reason: "The provided value to TagKeyList violated the maximum length constraint.") + } + } +} + +/** + Validation for the TagList field. +*/ +extension Array where Element == SchedulerModel.Tag { + public func validateAsTagList() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to TagList violated the minimum length constraint.") + } + + if self.count > 200 { + throw SchedulerError.validationError(reason: "The provided value to TagList violated the maximum length constraint.") + } + } +} + +/** + Validation for the TagResourceArn field. +*/ +extension SchedulerModel.TagResourceArn { + public func validateAsTagResourceArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to TagResourceArn violated the minimum length constraint.") + } + + if self.count > 1011 { + throw SchedulerError.validationError(reason: "The provided value to TagResourceArn violated the maximum length constraint.") + } + + guard let matchingRange = self.range(of: "^arn:aws(-[a-z]+)?:scheduler:[a-z0-9\\-]+:\\d{12}:schedule-group\\/[0-9a-zA-Z-_.]+$", options: .regularExpression), + matchingRange == startIndex.. 256 { + throw SchedulerError.validationError(reason: "The provided value to TagValue violated the maximum length constraint.") + } + } +} + +/** + Validation for the Tags field. +*/ +extension Array where Element == SchedulerModel.TagMap { + public func validateAsTags() throws { + if self.count < 0 { + throw SchedulerError.validationError(reason: "The provided value to Tags violated the minimum length constraint.") + } + + if self.count > 50 { + throw SchedulerError.validationError(reason: "The provided value to Tags violated the maximum length constraint.") + } + } +} + +/** + Validation for the TargetArn field. +*/ +extension SchedulerModel.TargetArn { + public func validateAsTargetArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to TargetArn violated the minimum length constraint.") + } + + if self.count > 1600 { + throw SchedulerError.validationError(reason: "The provided value to TargetArn violated the maximum length constraint.") + } + } +} + +/** + Validation for the TargetInput field. +*/ +extension SchedulerModel.TargetInput { + public func validateAsTargetInput() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to TargetInput violated the minimum length constraint.") + } + + } +} + +/** + Validation for the TargetPartitionKey field. +*/ +extension SchedulerModel.TargetPartitionKey { + public func validateAsTargetPartitionKey() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to TargetPartitionKey violated the minimum length constraint.") + } + + if self.count > 256 { + throw SchedulerError.validationError(reason: "The provided value to TargetPartitionKey violated the maximum length constraint.") + } + } +} + +/** + Validation for the TaskCount field. +*/ +extension SchedulerModel.TaskCount { + public func validateAsTaskCount() throws { + if self < 1 { + throw SchedulerError.validationError(reason: "The provided value to TaskCount violated the minimum range constraint.") + } + + if self > 10 { + throw SchedulerError.validationError(reason: "The provided value to TaskCount violated the maximum range constraint.") + } + } +} + +/** + Validation for the TaskDefinitionArn field. +*/ +extension SchedulerModel.TaskDefinitionArn { + public func validateAsTaskDefinitionArn() throws { + if self.count < 1 { + throw SchedulerError.validationError(reason: "The provided value to TaskDefinitionArn violated the minimum length constraint.") + } + + if self.count > 1600 { + throw SchedulerError.validationError(reason: "The provided value to TaskDefinitionArn violated the maximum length constraint.") + } + } +} diff --git a/Sources/SecurityTokenModel/SecurityTokenModelDefaultInstances.swift b/Sources/SecurityTokenModel/SecurityTokenModelDefaultInstances.swift index 5fb5e71..b9a447c 100644 --- a/Sources/SecurityTokenModel/SecurityTokenModelDefaultInstances.swift +++ b/Sources/SecurityTokenModel/SecurityTokenModelDefaultInstances.swift @@ -32,6 +32,7 @@ public extension AssumeRoleRequest { externalId: nil, policy: nil, policyArns: nil, + providedContexts: nil, roleArn: "01234567890123456789", roleSessionName: "01", serialNumber: nil, @@ -494,6 +495,19 @@ public extension PolicyDescriptorType { }() } +public extension ProvidedContext { + /** + Default instance of the ProvidedContext structure. + */ + static let __default: SecurityTokenModel.ProvidedContext = { + let defaultInstance = SecurityTokenModel.ProvidedContext( + contextAssertion: nil, + providerArn: nil) + + return defaultInstance + }() +} + public extension RegionDisabledException { /** Default instance of the RegionDisabledException structure. diff --git a/Sources/SecurityTokenModel/SecurityTokenModelStructures.swift b/Sources/SecurityTokenModel/SecurityTokenModelStructures.swift index 3e44889..c0bc4a5 100644 --- a/Sources/SecurityTokenModel/SecurityTokenModelStructures.swift +++ b/Sources/SecurityTokenModel/SecurityTokenModelStructures.swift @@ -25,8 +25,9 @@ import Foundation public struct AssumeRoleRequest: Codable, Equatable { public var durationSeconds: RoleDurationSecondsType? public var externalId: ExternalIdType? - public var policy: SessionPolicyDocumentType? + public var policy: UnrestrictedSessionPolicyDocumentType? public var policyArns: PolicyDescriptorListType? + public var providedContexts: ProvidedContextsListType? public var roleArn: ArnType public var roleSessionName: RoleSessionNameType public var serialNumber: SerialNumberType? @@ -37,8 +38,9 @@ public struct AssumeRoleRequest: Codable, Equatable { public init(durationSeconds: RoleDurationSecondsType? = nil, externalId: ExternalIdType? = nil, - policy: SessionPolicyDocumentType? = nil, + policy: UnrestrictedSessionPolicyDocumentType? = nil, policyArns: PolicyDescriptorListType? = nil, + providedContexts: ProvidedContextsListType? = nil, roleArn: ArnType, roleSessionName: RoleSessionNameType, serialNumber: SerialNumberType? = nil, @@ -50,6 +52,7 @@ public struct AssumeRoleRequest: Codable, Equatable { self.externalId = externalId self.policy = policy self.policyArns = policyArns + self.providedContexts = providedContexts self.roleArn = roleArn self.roleSessionName = roleSessionName self.serialNumber = serialNumber @@ -64,6 +67,7 @@ public struct AssumeRoleRequest: Codable, Equatable { case externalId = "ExternalId" case policy = "Policy" case policyArns = "PolicyArns" + case providedContexts = "ProvidedContexts" case roleArn = "RoleArn" case roleSessionName = "RoleSessionName" case serialNumber = "SerialNumber" @@ -76,7 +80,8 @@ public struct AssumeRoleRequest: Codable, Equatable { public func validate() throws { try durationSeconds?.validateAsRoleDurationSecondsType() try externalId?.validateAsExternalIdType() - try policy?.validateAsSessionPolicyDocumentType() + try policy?.validateAsUnrestrictedSessionPolicyDocumentType() + try providedContexts?.validateAsProvidedContextsListType() try roleArn.validateAsArnType() try roleSessionName.validateAsRoleSessionNameType() try serialNumber?.validateAsSerialNumberType() @@ -815,6 +820,27 @@ public struct PolicyDescriptorType: Codable, Equatable { } } +public struct ProvidedContext: Codable, Equatable { + public var contextAssertion: ContextAssertionType? + public var providerArn: ArnType? + + public init(contextAssertion: ContextAssertionType? = nil, + providerArn: ArnType? = nil) { + self.contextAssertion = contextAssertion + self.providerArn = providerArn + } + + enum CodingKeys: String, CodingKey { + case contextAssertion = "ContextAssertion" + case providerArn = "ProviderArn" + } + + public func validate() throws { + try contextAssertion?.validateAsContextAssertionType() + try providerArn?.validateAsArnType() + } +} + public struct RegionDisabledException: Codable, Equatable { public var message: RegionDisabledMessage? diff --git a/Sources/SecurityTokenModel/SecurityTokenModelTypes.swift b/Sources/SecurityTokenModel/SecurityTokenModelTypes.swift index 9e47090..add5477 100644 --- a/Sources/SecurityTokenModel/SecurityTokenModelTypes.swift +++ b/Sources/SecurityTokenModel/SecurityTokenModelTypes.swift @@ -37,6 +37,11 @@ public typealias Issuer = String */ public typealias NameQualifier = String +/** + Type definition for the ProvidedContextsListType field. + */ +public typealias ProvidedContextsListType = [ProvidedContext] + /** Type definition for the SAMLAssertionType field. */ @@ -82,6 +87,11 @@ public typealias AssumedRoleIdType = String */ public typealias ClientTokenType = String +/** + Type definition for the ContextAssertionType field. + */ +public typealias ContextAssertionType = String + /** Type definition for the DateType field. */ @@ -217,6 +227,11 @@ public typealias TokenCodeType = String */ public typealias TokenType = String +/** + Type definition for the UnrestrictedSessionPolicyDocumentType field. + */ +public typealias UnrestrictedSessionPolicyDocumentType = String + /** Type definition for the UrlType field. */ @@ -237,6 +252,18 @@ public typealias UserNameType = String */ public typealias WebIdentitySubjectType = String +/** + Validation for the ProvidedContextsListType field. +*/ +extension Array where Element == SecurityTokenModel.ProvidedContext { + public func validateAsProvidedContextsListType() throws { + + if self.count > 5 { + throw SecurityTokenError.validationError(reason: "The provided value to ProvidedContextsListType violated the maximum length constraint.") + } + } +} + /** Validation for the SAMLAssertionType field. */ @@ -330,6 +357,21 @@ extension SecurityTokenModel.ClientTokenType { } } +/** + Validation for the ContextAssertionType field. +*/ +extension SecurityTokenModel.ContextAssertionType { + public func validateAsContextAssertionType() throws { + if self.count < 4 { + throw SecurityTokenError.validationError(reason: "The provided value to contextAssertionType violated the minimum length constraint.") + } + + if self.count > 2048 { + throw SecurityTokenError.validationError(reason: "The provided value to contextAssertionType violated the maximum length constraint.") + } + } +} + /** Validation for the DurationSecondsType field. */ @@ -600,6 +642,24 @@ extension SecurityTokenModel.TokenCodeType { } } +/** + Validation for the UnrestrictedSessionPolicyDocumentType field. +*/ +extension SecurityTokenModel.UnrestrictedSessionPolicyDocumentType { + public func validateAsUnrestrictedSessionPolicyDocumentType() throws { + if self.count < 1 { + throw SecurityTokenError.validationError(reason: "The provided value to unrestrictedSessionPolicyDocumentType violated the minimum length constraint.") + } + + + guard let matchingRange = self.range(of: "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+", options: .regularExpression), + matchingRange == startIndex.. SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -948,7 +948,7 @@ public struct AWSSimpleNotificationClient SimpleNotificationModel.SubscribeResponseForSubscribe { @@ -3500,7 +3500,7 @@ public struct AWSSimpleNotificationClient SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -3814,7 +3814,7 @@ public struct AWSSimpleNotificationClient SimpleNotificationModel.SubscribeResponseForSubscribe { diff --git a/Sources/SimpleNotificationClient/MockSimpleNotificationClient.swift b/Sources/SimpleNotificationClient/MockSimpleNotificationClient.swift index c969f2c..13e47d3 100644 --- a/Sources/SimpleNotificationClient/MockSimpleNotificationClient.swift +++ b/Sources/SimpleNotificationClient/MockSimpleNotificationClient.swift @@ -371,7 +371,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - completion: The ConfirmSubscriptionResponseForConfirmSubscription object or an error will be passed to this callback when the operation is complete. The ConfirmSubscriptionResponseForConfirmSubscription object will be validated before being returned to caller. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func confirmSubscriptionAsync( input: SimpleNotificationModel.ConfirmSubscriptionInput, @@ -392,7 +392,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func confirmSubscriptionSync( input: SimpleNotificationModel.ConfirmSubscriptionInput) throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -678,7 +678,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - input: The validated DeleteTopicInput object being passed to this operation. - completion: Nil or an error will be passed to this callback when the operation is complete. - The possible errors are: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + The possible errors are: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ public func deleteTopicAsync( input: SimpleNotificationModel.DeleteTopicInput, @@ -695,7 +695,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ public func deleteTopicSync( input: SimpleNotificationModel.DeleteTopicInput) throws { @@ -1648,7 +1648,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - completion: Nil or an error will be passed to this callback when the operation is complete. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ public func setSubscriptionAttributesAsync( input: SimpleNotificationModel.SetSubscriptionAttributesInput, @@ -1665,7 +1665,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ public func setSubscriptionAttributesSync( input: SimpleNotificationModel.SetSubscriptionAttributesInput) throws { @@ -1717,7 +1717,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - completion: The SubscribeResponseForSubscribe object or an error will be passed to this callback when the operation is complete. The SubscribeResponseForSubscribe object will be validated before being returned to caller. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func subscribeAsync( input: SimpleNotificationModel.SubscribeInput, @@ -1738,7 +1738,7 @@ public struct MockSimpleNotificationClient: SimpleNotificationClientProtocol { - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func subscribeSync( input: SimpleNotificationModel.SubscribeInput) throws -> SimpleNotificationModel.SubscribeResponseForSubscribe { diff --git a/Sources/SimpleNotificationClient/MockSimpleNotificationClientV2.swift b/Sources/SimpleNotificationClient/MockSimpleNotificationClientV2.swift index 2e11c1e..446397f 100644 --- a/Sources/SimpleNotificationClient/MockSimpleNotificationClientV2.swift +++ b/Sources/SimpleNotificationClient/MockSimpleNotificationClientV2.swift @@ -204,7 +204,7 @@ public struct MockSimpleNotificationClientV2: SimpleNotificationClientProtocolV2 - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func confirmSubscription( input: SimpleNotificationModel.ConfirmSubscriptionInput) async throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -340,7 +340,7 @@ public struct MockSimpleNotificationClientV2: SimpleNotificationClientProtocolV2 - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ public func deleteTopic( input: SimpleNotificationModel.DeleteTopicInput) async throws { @@ -775,7 +775,7 @@ public struct MockSimpleNotificationClientV2: SimpleNotificationClientProtocolV2 - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ public func setSubscriptionAttributes( input: SimpleNotificationModel.SetSubscriptionAttributesInput) async throws { @@ -807,7 +807,7 @@ public struct MockSimpleNotificationClientV2: SimpleNotificationClientProtocolV2 - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func subscribe( input: SimpleNotificationModel.SubscribeInput) async throws -> SimpleNotificationModel.SubscribeResponseForSubscribe { diff --git a/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol+async.swift b/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol+async.swift index e94f915..616808c 100644 --- a/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol+async.swift +++ b/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol+async.swift @@ -87,7 +87,7 @@ public extension SimpleNotificationClientProtocol { - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func confirmSubscription(input: SimpleNotificationModel.ConfirmSubscriptionInput) async throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -293,7 +293,7 @@ public extension SimpleNotificationClientProtocol { - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ func deleteTopic(input: SimpleNotificationModel.DeleteTopicInput) async throws { return try await withCheckedThrowingContinuation { cont in @@ -948,7 +948,7 @@ public extension SimpleNotificationClientProtocol { - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ func setSubscriptionAttributes(input: SimpleNotificationModel.SetSubscriptionAttributesInput) async throws { return try await withCheckedThrowingContinuation { cont in @@ -996,7 +996,7 @@ public extension SimpleNotificationClientProtocol { - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func subscribe(input: SimpleNotificationModel.SubscribeInput) async throws -> SimpleNotificationModel.SubscribeResponseForSubscribe { diff --git a/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol.swift b/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol.swift index df2ca4f..ae20b7d 100644 --- a/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol.swift +++ b/Sources/SimpleNotificationClient/SimpleNotificationClientProtocol.swift @@ -297,7 +297,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - completion: The ConfirmSubscriptionResponseForConfirmSubscription object or an error will be passed to this callback when the operation is complete. The ConfirmSubscriptionResponseForConfirmSubscription object will be validated before being returned to caller. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func confirmSubscriptionAsync( input: SimpleNotificationModel.ConfirmSubscriptionInput, @@ -310,7 +310,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func confirmSubscriptionSync( input: SimpleNotificationModel.ConfirmSubscriptionInput) throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription @@ -498,7 +498,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - input: The validated DeleteTopicInput object being passed to this operation. - completion: Nil or an error will be passed to this callback when the operation is complete. - The possible errors are: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + The possible errors are: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ func deleteTopicAsync( input: SimpleNotificationModel.DeleteTopicInput, @@ -509,7 +509,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ func deleteTopicSync( input: SimpleNotificationModel.DeleteTopicInput) throws @@ -1133,7 +1133,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - completion: Nil or an error will be passed to this callback when the operation is complete. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ func setSubscriptionAttributesAsync( input: SimpleNotificationModel.SetSubscriptionAttributesInput, @@ -1144,7 +1144,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ func setSubscriptionAttributesSync( input: SimpleNotificationModel.SetSubscriptionAttributesInput) throws @@ -1180,7 +1180,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - completion: The SubscribeResponseForSubscribe object or an error will be passed to this callback when the operation is complete. The SubscribeResponseForSubscribe object will be validated before being returned to caller. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func subscribeAsync( input: SimpleNotificationModel.SubscribeInput, @@ -1193,7 +1193,7 @@ public protocol SimpleNotificationClientProtocol: SimpleNotificationClientProtoc - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func subscribeSync( input: SimpleNotificationModel.SubscribeInput) throws -> SimpleNotificationModel.SubscribeResponseForSubscribe diff --git a/Sources/SimpleNotificationClient/SimpleNotificationClientProtocolV2.swift b/Sources/SimpleNotificationClient/SimpleNotificationClientProtocolV2.swift index def96d3..d22892a 100644 --- a/Sources/SimpleNotificationClient/SimpleNotificationClientProtocolV2.swift +++ b/Sources/SimpleNotificationClient/SimpleNotificationClientProtocolV2.swift @@ -144,7 +144,7 @@ public protocol SimpleNotificationClientProtocolV2 { - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func confirmSubscription( input: SimpleNotificationModel.ConfirmSubscriptionInput) async throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription @@ -234,7 +234,7 @@ public protocol SimpleNotificationClientProtocolV2 { - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ func deleteTopic( input: SimpleNotificationModel.DeleteTopicInput) async throws @@ -524,7 +524,7 @@ public protocol SimpleNotificationClientProtocolV2 { - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ func setSubscriptionAttributes( input: SimpleNotificationModel.SetSubscriptionAttributesInput) async throws @@ -546,7 +546,7 @@ public protocol SimpleNotificationClientProtocolV2 { - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ func subscribe( input: SimpleNotificationModel.SubscribeInput) async throws -> SimpleNotificationModel.SubscribeResponseForSubscribe diff --git a/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClient.swift b/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClient.swift index da7b39c..7915d54 100644 --- a/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClient.swift +++ b/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClient.swift @@ -372,7 +372,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - completion: The ConfirmSubscriptionResponseForConfirmSubscription object or an error will be passed to this callback when the operation is complete. The ConfirmSubscriptionResponseForConfirmSubscription object will be validated before being returned to caller. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func confirmSubscriptionAsync( input: SimpleNotificationModel.ConfirmSubscriptionInput, @@ -391,7 +391,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func confirmSubscriptionSync( input: SimpleNotificationModel.ConfirmSubscriptionInput) throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -669,7 +669,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - input: The validated DeleteTopicInput object being passed to this operation. - completion: Nil or an error will be passed to this callback when the operation is complete. - The possible errors are: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + The possible errors are: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ public func deleteTopicAsync( input: SimpleNotificationModel.DeleteTopicInput, @@ -686,7 +686,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ public func deleteTopicSync( input: SimpleNotificationModel.DeleteTopicInput) throws { @@ -1604,7 +1604,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - completion: Nil or an error will be passed to this callback when the operation is complete. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ public func setSubscriptionAttributesAsync( input: SimpleNotificationModel.SetSubscriptionAttributesInput, @@ -1621,7 +1621,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ public func setSubscriptionAttributesSync( input: SimpleNotificationModel.SetSubscriptionAttributesInput) throws { @@ -1675,7 +1675,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - completion: The SubscribeResponseForSubscribe object or an error will be passed to this callback when the operation is complete. The SubscribeResponseForSubscribe object will be validated before being returned to caller. - The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + The possible errors are: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func subscribeAsync( input: SimpleNotificationModel.SubscribeInput, @@ -1694,7 +1694,7 @@ public struct ThrowingSimpleNotificationClient: SimpleNotificationClientProtocol - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func subscribeSync( input: SimpleNotificationModel.SubscribeInput) throws -> SimpleNotificationModel.SubscribeResponseForSubscribe { diff --git a/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClientV2.swift b/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClientV2.swift index 040b253..c95886c 100644 --- a/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClientV2.swift +++ b/Sources/SimpleNotificationClient/ThrowingSimpleNotificationClientV2.swift @@ -207,7 +207,7 @@ public struct ThrowingSimpleNotificationClientV2: SimpleNotificationClientProtoc - input: The validated ConfirmSubscriptionInput object being passed to this operation. - Returns: The ConfirmSubscriptionResponseForConfirmSubscription object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func confirmSubscription( input: SimpleNotificationModel.ConfirmSubscriptionInput) async throws -> SimpleNotificationModel.ConfirmSubscriptionResponseForConfirmSubscription { @@ -345,7 +345,7 @@ public struct ThrowingSimpleNotificationClientV2: SimpleNotificationClientProtoc - Parameters: - input: The validated DeleteTopicInput object being passed to this operation. - - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, notFound, staleTag, tagPolicy. + - Throws: authorizationError, concurrentAccess, internalError, invalidParameter, invalidState, notFound, staleTag, tagPolicy. */ public func deleteTopic( input: SimpleNotificationModel.DeleteTopicInput) async throws { @@ -785,7 +785,7 @@ public struct ThrowingSimpleNotificationClientV2: SimpleNotificationClientProtoc - Parameters: - input: The validated SetSubscriptionAttributesInput object being passed to this operation. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, notFound, replayLimitExceeded. */ public func setSubscriptionAttributes( input: SimpleNotificationModel.SetSubscriptionAttributesInput) async throws { @@ -819,7 +819,7 @@ public struct ThrowingSimpleNotificationClientV2: SimpleNotificationClientProtoc - input: The validated SubscribeInput object being passed to this operation. - Returns: The SubscribeResponseForSubscribe object to be passed back from the caller of this operation. Will be validated before being returned to caller. - - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, subscriptionLimitExceeded. + - Throws: authorizationError, filterPolicyLimitExceeded, internalError, invalidParameter, invalidSecurity, notFound, replayLimitExceeded, subscriptionLimitExceeded. */ public func subscribe( input: SimpleNotificationModel.SubscribeInput) async throws -> SimpleNotificationModel.SubscribeResponseForSubscribe { diff --git a/Sources/SimpleNotificationModel/SimpleNotificationModelDefaultInstances.swift b/Sources/SimpleNotificationModel/SimpleNotificationModelDefaultInstances.swift index c71a045..f16c28f 100644 --- a/Sources/SimpleNotificationModel/SimpleNotificationModelDefaultInstances.swift +++ b/Sources/SimpleNotificationModel/SimpleNotificationModelDefaultInstances.swift @@ -757,6 +757,18 @@ public extension InvalidSecurityException { }() } +public extension InvalidStateException { + /** + Default instance of the InvalidStateException structure. + */ + static let __default: SimpleNotificationModel.InvalidStateException = { + let defaultInstance = SimpleNotificationModel.InvalidStateException( + message: nil) + + return defaultInstance + }() +} + public extension KMSAccessDeniedException { /** Default instance of the KMSAccessDeniedException structure. @@ -1421,6 +1433,18 @@ public extension RemovePermissionInput { }() } +public extension ReplayLimitExceededException { + /** + Default instance of the ReplayLimitExceededException structure. + */ + static let __default: SimpleNotificationModel.ReplayLimitExceededException = { + let defaultInstance = SimpleNotificationModel.ReplayLimitExceededException( + message: nil) + + return defaultInstance + }() +} + public extension ResourceNotFoundException { /** Default instance of the ResourceNotFoundException structure. diff --git a/Sources/SimpleNotificationModel/SimpleNotificationModelErrors.swift b/Sources/SimpleNotificationModel/SimpleNotificationModelErrors.swift index dea07ec..5650e41 100644 --- a/Sources/SimpleNotificationModel/SimpleNotificationModelErrors.swift +++ b/Sources/SimpleNotificationModel/SimpleNotificationModelErrors.swift @@ -45,6 +45,7 @@ private let invalidBatchEntryIdIdentity = "InvalidBatchEntryId" private let invalidParameterIdentity = "InvalidParameter" private let invalidParameterValueIdentity = "ParameterValueInvalid" private let invalidSecurityIdentity = "InvalidSecurity" +private let invalidStateIdentity = "InvalidState" private let kMSAccessDeniedIdentity = "KMSAccessDenied" private let kMSDisabledIdentity = "KMSDisabled" private let kMSInvalidStateIdentity = "KMSInvalidState" @@ -54,6 +55,7 @@ private let kMSThrottlingIdentity = "KMSThrottling" private let notFoundIdentity = "NotFound" private let optedOutIdentity = "OptedOut" private let platformApplicationDisabledIdentity = "PlatformApplicationDisabled" +private let replayLimitExceededIdentity = "ReplayLimitExceeded" private let resourceNotFoundIdentity = "ResourceNotFound" private let staleTagIdentity = "StaleTag" private let subscriptionLimitExceededIdentity = "SubscriptionLimitExceeded" @@ -80,6 +82,7 @@ public enum SimpleNotificationError: Swift.Error, Decodable { case invalidParameter(InvalidParameterException) case invalidParameterValue(InvalidParameterValueException) case invalidSecurity(InvalidSecurityException) + case invalidState(InvalidStateException) case kMSAccessDenied(KMSAccessDeniedException) case kMSDisabled(KMSDisabledException) case kMSInvalidState(KMSInvalidStateException) @@ -89,6 +92,7 @@ public enum SimpleNotificationError: Swift.Error, Decodable { case notFound(NotFoundException) case optedOut(OptedOutException) case platformApplicationDisabled(PlatformApplicationDisabledException) + case replayLimitExceeded(ReplayLimitExceededException) case resourceNotFound(ResourceNotFoundException) case staleTag(StaleTagException) case subscriptionLimitExceeded(SubscriptionLimitExceededException) @@ -155,6 +159,9 @@ public enum SimpleNotificationError: Swift.Error, Decodable { case invalidSecurityIdentity: let errorPayload = try InvalidSecurityException(from: decoder) self = SimpleNotificationError.invalidSecurity(errorPayload) + case invalidStateIdentity: + let errorPayload = try InvalidStateException(from: decoder) + self = SimpleNotificationError.invalidState(errorPayload) case kMSAccessDeniedIdentity: let errorPayload = try KMSAccessDeniedException(from: decoder) self = SimpleNotificationError.kMSAccessDenied(errorPayload) @@ -182,6 +189,9 @@ public enum SimpleNotificationError: Swift.Error, Decodable { case platformApplicationDisabledIdentity: let errorPayload = try PlatformApplicationDisabledException(from: decoder) self = SimpleNotificationError.platformApplicationDisabled(errorPayload) + case replayLimitExceededIdentity: + let errorPayload = try ReplayLimitExceededException(from: decoder) + self = SimpleNotificationError.replayLimitExceeded(errorPayload) case resourceNotFoundIdentity: let errorPayload = try ResourceNotFoundException(from: decoder) self = SimpleNotificationError.resourceNotFound(errorPayload) diff --git a/Sources/SimpleNotificationModel/SimpleNotificationModelStructures.swift b/Sources/SimpleNotificationModel/SimpleNotificationModelStructures.swift index a86e3ad..c921209 100644 --- a/Sources/SimpleNotificationModel/SimpleNotificationModelStructures.swift +++ b/Sources/SimpleNotificationModel/SimpleNotificationModelStructures.swift @@ -992,6 +992,21 @@ public struct InvalidSecurityException: Codable, Equatable { } } +public struct InvalidStateException: Codable, Equatable { + public var message: String? + + public init(message: String? = nil) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message + } + + public func validate() throws { + } +} + public struct KMSAccessDeniedException: Codable, Equatable { public var message: String? @@ -1946,6 +1961,21 @@ public struct RemovePermissionInput: Codable, Equatable { } } +public struct ReplayLimitExceededException: Codable, Equatable { + public var message: String? + + public init(message: String? = nil) { + self.message = message + } + + enum CodingKeys: String, CodingKey { + case message + } + + public func validate() throws { + } +} + public struct ResourceNotFoundException: Codable, Equatable { public var message: String? diff --git a/Sources/SimpleWorkflowModel/SimpleWorkflowModelDefaultInstances.swift b/Sources/SimpleWorkflowModel/SimpleWorkflowModelDefaultInstances.swift index e5e3a66..e5f9827 100644 --- a/Sources/SimpleWorkflowModel/SimpleWorkflowModelDefaultInstances.swift +++ b/Sources/SimpleWorkflowModel/SimpleWorkflowModelDefaultInstances.swift @@ -556,7 +556,9 @@ public extension DecisionTaskCompletedEventAttributes { let defaultInstance = SimpleWorkflowModel.DecisionTaskCompletedEventAttributes( executionContext: nil, scheduledEventId: 0, - startedEventId: 0) + startedEventId: 0, + taskList: nil, + taskListScheduleToStartTimeout: nil) return defaultInstance }() @@ -568,6 +570,7 @@ public extension DecisionTaskScheduledEventAttributes { */ static let __default: SimpleWorkflowModel.DecisionTaskScheduledEventAttributes = { let defaultInstance = SimpleWorkflowModel.DecisionTaskScheduledEventAttributes( + scheduleToStartTimeout: nil, startToCloseTimeout: nil, taskList: TaskList.__default, taskPriority: nil) @@ -1455,6 +1458,8 @@ public extension RespondDecisionTaskCompletedInput { let defaultInstance = SimpleWorkflowModel.RespondDecisionTaskCompletedInput( decisions: nil, executionContext: nil, + taskList: nil, + taskListScheduleToStartTimeout: nil, taskToken: "0") return defaultInstance diff --git a/Sources/SimpleWorkflowModel/SimpleWorkflowModelStructures.swift b/Sources/SimpleWorkflowModel/SimpleWorkflowModelStructures.swift index 8b5882a..f5806ae 100644 --- a/Sources/SimpleWorkflowModel/SimpleWorkflowModelStructures.swift +++ b/Sources/SimpleWorkflowModel/SimpleWorkflowModelStructures.swift @@ -1068,46 +1068,61 @@ public struct DecisionTaskCompletedEventAttributes: Codable, Equatable { public var executionContext: Data? public var scheduledEventId: EventId public var startedEventId: EventId + public var taskList: TaskList? + public var taskListScheduleToStartTimeout: DurationInSecondsOptional? public init(executionContext: Data? = nil, scheduledEventId: EventId, - startedEventId: EventId) { + startedEventId: EventId, + taskList: TaskList? = nil, + taskListScheduleToStartTimeout: DurationInSecondsOptional? = nil) { self.executionContext = executionContext self.scheduledEventId = scheduledEventId self.startedEventId = startedEventId + self.taskList = taskList + self.taskListScheduleToStartTimeout = taskListScheduleToStartTimeout } enum CodingKeys: String, CodingKey { case executionContext case scheduledEventId case startedEventId + case taskList + case taskListScheduleToStartTimeout } public func validate() throws { try executionContext?.validateAsData() + try taskList?.validate() + try taskListScheduleToStartTimeout?.validateAsDurationInSecondsOptional() } } public struct DecisionTaskScheduledEventAttributes: Codable, Equatable { + public var scheduleToStartTimeout: DurationInSecondsOptional? public var startToCloseTimeout: DurationInSecondsOptional? public var taskList: TaskList public var taskPriority: TaskPriority? - public init(startToCloseTimeout: DurationInSecondsOptional? = nil, + public init(scheduleToStartTimeout: DurationInSecondsOptional? = nil, + startToCloseTimeout: DurationInSecondsOptional? = nil, taskList: TaskList, taskPriority: TaskPriority? = nil) { + self.scheduleToStartTimeout = scheduleToStartTimeout self.startToCloseTimeout = startToCloseTimeout self.taskList = taskList self.taskPriority = taskPriority } enum CodingKeys: String, CodingKey { + case scheduleToStartTimeout case startToCloseTimeout case taskList case taskPriority } public func validate() throws { + try scheduleToStartTimeout?.validateAsDurationInSecondsOptional() try startToCloseTimeout?.validateAsDurationInSecondsOptional() try taskList.validate() } @@ -2863,24 +2878,34 @@ public struct RespondActivityTaskFailedInput: Codable, Equatable { public struct RespondDecisionTaskCompletedInput: Codable, Equatable { public var decisions: DecisionList? public var executionContext: Data? + public var taskList: TaskList? + public var taskListScheduleToStartTimeout: DurationInSecondsOptional? public var taskToken: TaskToken public init(decisions: DecisionList? = nil, executionContext: Data? = nil, + taskList: TaskList? = nil, + taskListScheduleToStartTimeout: DurationInSecondsOptional? = nil, taskToken: TaskToken) { self.decisions = decisions self.executionContext = executionContext + self.taskList = taskList + self.taskListScheduleToStartTimeout = taskListScheduleToStartTimeout self.taskToken = taskToken } enum CodingKeys: String, CodingKey { case decisions case executionContext + case taskList + case taskListScheduleToStartTimeout case taskToken } public func validate() throws { try executionContext?.validateAsData() + try taskList?.validate() + try taskListScheduleToStartTimeout?.validateAsDurationInSecondsOptional() try taskToken.validateAsTaskToken() } } diff --git a/Sources/SimpleWorkflowModel/SimpleWorkflowModelTypes.swift b/Sources/SimpleWorkflowModel/SimpleWorkflowModelTypes.swift index 8489d33..d2f8d8d 100644 --- a/Sources/SimpleWorkflowModel/SimpleWorkflowModelTypes.swift +++ b/Sources/SimpleWorkflowModel/SimpleWorkflowModelTypes.swift @@ -178,13 +178,14 @@ public typealias DecisionList = [Decision] Enumeration restricting the values of the DecisionTaskTimeoutType field. */ public enum DecisionTaskTimeoutType: String, Codable, CustomStringConvertible { + case scheduleToStart = "SCHEDULE_TO_START" case startToClose = "START_TO_CLOSE" public var description: String { return rawValue } - public static let __default: DecisionTaskTimeoutType = .startToClose + public static let __default: DecisionTaskTimeoutType = .scheduleToStart } /**