Skip to content

Commit

Permalink
feat: add CredentialIdentityResolverPlugin related client changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFossAWS committed Mar 5, 2024
1 parent 64c350c commit 9dce328
Show file tree
Hide file tree
Showing 378 changed files with 6,426 additions and 378 deletions.
18 changes: 17 additions & 1 deletion Sources/Services/AWSACM/ACMClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension ACMClient {
public static func builder() -> ClientBuilder<ACMClient> {
return ClientBuilder<ACMClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultACMAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? ACMClient.ACMClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension ACMClient {
/// Performs the `AddTagsToCertificate` operation on the `CertificateManager` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSACMPCA/ACMPCAClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension ACMPCAClient {
public static func builder() -> ClientBuilder<ACMPCAClient> {
return ClientBuilder<ACMPCAClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultACMPCAAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? ACMPCAClient.ACMPCAClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension ACMPCAClient {
/// Performs the `CreateCertificateAuthority` operation on the `ACMPrivateCA` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSAPIGateway/APIGatewayClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension APIGatewayClient {
public static func builder() -> ClientBuilder<APIGatewayClient> {
return ClientBuilder<APIGatewayClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAPIGatewayAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? APIGatewayClient.APIGatewayClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension APIGatewayClient {
/// Performs the `CreateApiKey` operation on the `BackplaneControlService` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension ARCZonalShiftClient {
public static func builder() -> ClientBuilder<ARCZonalShiftClient> {
return ClientBuilder<ARCZonalShiftClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultARCZonalShiftAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? ARCZonalShiftClient.ARCZonalShiftClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension ARCZonalShiftClient {
/// Performs the `CancelZonalShift` operation on the `PercDataPlane` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AccessAnalyzerClient {
public static func builder() -> ClientBuilder<AccessAnalyzerClient> {
return ClientBuilder<AccessAnalyzerClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAccessAnalyzerAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AccessAnalyzerClient.AccessAnalyzerClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AccessAnalyzerClient {
/// Performs the `ApplyArchiveRule` operation on the `AccessAnalyzer` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSAccount/AccountClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AccountClient {
public static func builder() -> ClientBuilder<AccountClient> {
return ClientBuilder<AccountClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAccountAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AccountClient.AccountClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AccountClient {
/// Performs the `DeleteAlternateContact` operation on the `Account` service.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AlexaForBusinessClient {
public static func builder() -> ClientBuilder<AlexaForBusinessClient> {
return ClientBuilder<AlexaForBusinessClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAlexaForBusinessAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AlexaForBusinessClient.AlexaForBusinessClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AlexaForBusinessClient {
/// Performs the `ApproveSkill` operation on the `AlexaForBusiness` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSAmp/AmpClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AmpClient {
public static func builder() -> ClientBuilder<AmpClient> {
return ClientBuilder<AmpClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAmpAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AmpClient.AmpClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AmpClient {
/// Performs the `CreateAlertManagerDefinition` operation on the `AmazonPrometheusService` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSAmplify/AmplifyClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AmplifyClient {
public static func builder() -> ClientBuilder<AmplifyClient> {
return ClientBuilder<AmplifyClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAmplifyAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AmplifyClient.AmplifyClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AmplifyClient {
/// Performs the `CreateApp` operation on the `Amplify` service.
///
Expand Down
18 changes: 17 additions & 1 deletion Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AmplifyBackendClient {
public static func builder() -> ClientBuilder<AmplifyBackendClient> {
return ClientBuilder<AmplifyBackendClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAmplifyBackendAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AmplifyBackendClient.AmplifyBackendClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AmplifyBackendClient {
/// Performs the `CloneBackend` operation on the `AmplifyBackend` service.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension AmplifyUIBuilderClient {
public static func builder() -> ClientBuilder<AmplifyUIBuilderClient> {
return ClientBuilder<AmplifyUIBuilderClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultAmplifyUIBuilderAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension AmplifyUIBuilderClient {
/// Performs the `CreateComponent` operation on the `AmplifyUIBuilder` service.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extension ApiGatewayManagementApiClient {
public static func builder() -> ClientBuilder<ApiGatewayManagementApiClient> {
return ClientBuilder<ApiGatewayManagementApiClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName),
DefaultAWSAuthSchemePlugin()
])
}
}
Expand Down Expand Up @@ -150,6 +151,21 @@ public class EndpointPlugin: Plugin {
}
}

public class DefaultAWSAuthSchemePlugin: Plugin {
private var authSchemes: [ClientRuntime.AuthScheme]?
private var authSchemeResolver: ClientRuntime.AuthSchemeResolver
public init() {
self.authSchemeResolver = DefaultApiGatewayManagementApiAuthSchemeResolver()
self.authSchemes = [SigV4AuthScheme()]
}
public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws {
if var config = clientConfiguration as? ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration {
config.authSchemeResolver = self.authSchemeResolver
config.authSchemes = self.authSchemes
}
}
}

extension ApiGatewayManagementApiClient {
/// Performs the `DeleteConnection` operation on the `ApiGatewayManagementApi` service.
///
Expand Down
Loading

0 comments on commit 9dce328

Please sign in to comment.