Skip to content

Commit

Permalink
Merge branch 'main' into cy/update-smoke-test-script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sichan Yoo committed Nov 13, 2024
2 parents 6cffd1d + 6d7f654 commit 480ff0d
Show file tree
Hide file tree
Showing 434 changed files with 4,664 additions and 972 deletions.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import PackageDescription

// MARK: - Dynamic Content

let clientRuntimeVersion: Version = "0.90.0"
let clientRuntimeVersion: Version = "0.91.0"
let crtVersion: Version = "0.37.0"

let excludeRuntimeUnitTests = false
Expand Down Expand Up @@ -62,6 +62,7 @@ let serviceTargets: [String] = [
"AWSBedrockAgent",
"AWSBedrockAgentRuntime",
"AWSBedrockRuntime",
"AWSBilling",
"AWSBillingconductor",
"AWSBraket",
"AWSBudgets",
Expand Down
2 changes: 1 addition & 1 deletion Package.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.38
1.0.39
2 changes: 1 addition & 1 deletion Package.version.next
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.39
1.0.40
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public struct Sha256TreeHashMiddleware<OperationStackInput, OperationStackOutput
if let treeHash = treeHash, let linearHash = linearHash {
builder.withHeader(name: X_AMZ_SHA256_TREE_HASH_HEADER_NAME, value: treeHash)
// provide the value but let CRT add the SHA256 header during signing
context.attributes.set(key: AttributeKey(name: X_AMZ_CONTENT_SHA256_HEADER_NAME), value: linearHash)
context.set(key: AttributeKey(name: X_AMZ_CONTENT_SHA256_HEADER_NAME), value: linearHash)
}
case .noStream:
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ private extension String {

public extension Context {
var businessMetrics: Dictionary<String, String> {
get { attributes.get(key: businessMetricsKey) ?? [:] }
get { get(key: businessMetricsKey) ?? [:] }
set(newPair) {
var combined = businessMetrics
combined.merge(newPair) { (_, new) in new }
attributes.set(key: businessMetricsKey, value: combined)
set(key: businessMetricsKey, value: combined)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class FlexibleChecksumsMiddlewareTests: XCTestCase {
"Stream is not 'chunked eligible'",
file: file, line: line
)
if let validatedChecksum = self.builtContext.attributes.get(key: AttributeKey<String>(name: "ChecksumHeaderValidated")), validatedChecksum == expectedHeader {
if let validatedChecksum = self.builtContext.get(key: AttributeKey<String>(name: "ChecksumHeaderValidated")), validatedChecksum == expectedHeader {
isChecksumValidated = true
}
if expectedChecksum != "" {
Expand Down Expand Up @@ -304,7 +304,7 @@ class FlexibleChecksumsMiddlewareTests: XCTestCase {
}
}

if let validatedChecksum = self.builtContext.attributes.get(key: AttributeKey<String>(name: "ChecksumHeaderValidated")), validatedChecksum == expectedHeader {
if let validatedChecksum = self.builtContext.get(key: AttributeKey<String>(name: "ChecksumHeaderValidated")), validatedChecksum == expectedHeader {
isChecksumValidated = true
}
if expectedChecksum != "" {
Expand All @@ -329,7 +329,7 @@ class FlexibleChecksumsMiddlewareTests: XCTestCase {
}
} else {
try await handleMiddleware()
validatedChecksum = self.builtContext.attributes.get(key: AttributeKey<String>(name: "ChecksumHeaderValidated"))
validatedChecksum = self.builtContext.get(key: AttributeKey<String>(name: "ChecksumHeaderValidated"))
if validatedChecksum != nil && validatedChecksum == expectedValidationHeader {
isChecksumValidated = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ This SDK is open-source. Code is available on Github [here](https://github.com/

[AWSBedrockRuntime](../../../../../swift/api/awsbedrockruntime/latest)

[AWSBilling](../../../../../swift/api/awsbilling/latest)

[AWSBillingconductor](../../../../../swift/api/awsbillingconductor/latest)

[AWSBraket](../../../../../swift/api/awsbraket/latest)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Services/AWSACM/Sources/AWSACM/ACMClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes

public class ACMClient: ClientRuntime.Client {
public static let clientName = "ACMClient"
public static let version = "1.0.38"
public static let version = "1.0.39"
let client: ClientRuntime.SdkHttpClient
let config: ACMClient.ACMClientConfiguration
let serviceName = "ACM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes

public class ACMPCAClient: ClientRuntime.Client {
public static let clientName = "ACMPCAClient"
public static let version = "1.0.38"
public static let version = "1.0.39"
let client: ClientRuntime.SdkHttpClient
let config: ACMPCAClient.ACMPCAClientConfiguration
let serviceName = "ACM PCA"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes

public class APIGatewayClient: ClientRuntime.Client {
public static let clientName = "APIGatewayClient"
public static let version = "1.0.38"
public static let version = "1.0.39"
let client: ClientRuntime.SdkHttpClient
let config: APIGatewayClient.APIGatewayClientConfiguration
let serviceName = "API Gateway"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes

public class ARCZonalShiftClient: ClientRuntime.Client {
public static let clientName = "ARCZonalShiftClient"
public static let version = "1.0.38"
public static let version = "1.0.39"
let client: ClientRuntime.SdkHttpClient
let config: ARCZonalShiftClient.ARCZonalShiftClientConfiguration
let serviceName = "ARC Zonal Shift"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes

public class AccessAnalyzerClient: ClientRuntime.Client {
public static let clientName = "AccessAnalyzerClient"
public static let version = "1.0.38"
public static let version = "1.0.39"
let client: ClientRuntime.SdkHttpClient
let config: AccessAnalyzerClient.AccessAnalyzerClientConfiguration
let serviceName = "AccessAnalyzer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ extension AccessAnalyzerClientTypes {
public struct Access: Swift.Sendable {
/// A list of actions for the access permissions. Any strings that can be used as an action in an IAM policy can be used in the list of actions to check.
public var actions: [Swift.String]?
/// A list of resources for the access permissions. Any strings that can be used as a resource in an IAM policy can be used in the list of resources to check.
/// A list of resources for the access permissions. Any strings that can be used as an Amazon Resource Name (ARN) in an IAM policy can be used in the list of resources to check. You can only use a wildcard in the portion of the ARN that specifies the resource ID.
public var resources: [Swift.String]?

public init(
Expand Down Expand Up @@ -1066,13 +1066,13 @@ extension AccessAnalyzerClientTypes {
}

public struct CheckAccessNotGrantedInput: Swift.Sendable {
/// An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access of the actions on all resources in the policy. If only resources are specified, then IAM Access Analyzer checks which actions have access to the specified resources. If both actions and resources are specified, then IAM Access Analyzer checks which of the specified actions have access to the specified resources.
/// An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access to peform at least one of the actions on any resource in the policy. If only resources are specified, then IAM Access Analyzer checks for access to perform any action on at least one of the resources. If both actions and resources are specified, IAM Access Analyzer checks for access to perform at least one of the specified actions on at least one of the specified resources.
/// This member is required.
public var access: [AccessAnalyzerClientTypes.Access]?
/// The JSON policy document to use as the content for the policy.
/// This member is required.
public var policyDocument: Swift.String?
/// The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.
/// The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets.
/// This member is required.
public var policyType: AccessAnalyzerClientTypes.AccessCheckPolicyType?

Expand Down Expand Up @@ -2470,6 +2470,38 @@ public struct GetFindingInput: Swift.Sendable {
}
}

extension AccessAnalyzerClientTypes {

public enum ResourceControlPolicyRestriction: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable {
case applicable
case failedToEvaluateRcp
case notApplicable
case sdkUnknown(Swift.String)

public static var allCases: [ResourceControlPolicyRestriction] {
return [
.applicable,
.failedToEvaluateRcp,
.notApplicable
]
}

public init?(rawValue: Swift.String) {
let value = Self.allCases.first(where: { $0.rawValue == rawValue })
self = value ?? Self.sdkUnknown(rawValue)
}

public var rawValue: Swift.String {
switch self {
case .applicable: return "APPLICABLE"
case .failedToEvaluateRcp: return "FAILED_TO_EVALUATE_RCP"
case .notApplicable: return "NOT_APPLICABLE"
case let .sdkUnknown(s): return s
}
}
}
}

extension AccessAnalyzerClientTypes {

/// Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.
Expand Down Expand Up @@ -2572,6 +2604,8 @@ extension AccessAnalyzerClientTypes {
public var principal: [Swift.String: Swift.String]?
/// The resource that an external principal has access to.
public var resource: Swift.String?
/// The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).
public var resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction?
/// The Amazon Web Services account ID that owns the resource.
/// This member is required.
public var resourceOwnerAccount: Swift.String?
Expand All @@ -2597,6 +2631,7 @@ extension AccessAnalyzerClientTypes {
isPublic: Swift.Bool? = nil,
principal: [Swift.String: Swift.String]? = nil,
resource: Swift.String? = nil,
resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction? = nil,
resourceOwnerAccount: Swift.String? = nil,
resourceType: AccessAnalyzerClientTypes.ResourceType? = nil,
sources: [AccessAnalyzerClientTypes.FindingSource]? = nil,
Expand All @@ -2613,6 +2648,7 @@ extension AccessAnalyzerClientTypes {
self.isPublic = isPublic
self.principal = principal
self.resource = resource
self.resourceControlPolicyRestriction = resourceControlPolicyRestriction
self.resourceOwnerAccount = resourceOwnerAccount
self.resourceType = resourceType
self.sources = sources
Expand Down Expand Up @@ -2892,6 +2928,8 @@ extension AccessAnalyzerClientTypes {
public var isPublic: Swift.Bool?
/// The external principal that has access to a resource within the zone of trust.
public var principal: [Swift.String: Swift.String]?
/// The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).
public var resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction?
/// The sources of the external access finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.
public var sources: [AccessAnalyzerClientTypes.FindingSource]?

Expand All @@ -2900,13 +2938,15 @@ extension AccessAnalyzerClientTypes {
condition: [Swift.String: Swift.String]? = nil,
isPublic: Swift.Bool? = nil,
principal: [Swift.String: Swift.String]? = nil,
resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction? = nil,
sources: [AccessAnalyzerClientTypes.FindingSource]? = nil
)
{
self.action = action
self.condition = condition
self.isPublic = isPublic
self.principal = principal
self.resourceControlPolicyRestriction = resourceControlPolicyRestriction
self.sources = sources
}
}
Expand Down Expand Up @@ -3512,6 +3552,8 @@ extension AccessAnalyzerClientTypes {
public var principal: [Swift.String: Swift.String]?
/// The resource that an external principal has access to. This is the resource associated with the access preview.
public var resource: Swift.String?
/// The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).
public var resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction?
/// The Amazon Web Services account ID that owns the resource. For most Amazon Web Services resources, the owning account is the account in which the resource was created.
/// This member is required.
public var resourceOwnerAccount: Swift.String?
Expand All @@ -3536,6 +3578,7 @@ extension AccessAnalyzerClientTypes {
isPublic: Swift.Bool? = nil,
principal: [Swift.String: Swift.String]? = nil,
resource: Swift.String? = nil,
resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction? = nil,
resourceOwnerAccount: Swift.String? = nil,
resourceType: AccessAnalyzerClientTypes.ResourceType? = nil,
sources: [AccessAnalyzerClientTypes.FindingSource]? = nil,
Expand All @@ -3553,6 +3596,7 @@ extension AccessAnalyzerClientTypes {
self.isPublic = isPublic
self.principal = principal
self.resource = resource
self.resourceControlPolicyRestriction = resourceControlPolicyRestriction
self.resourceOwnerAccount = resourceOwnerAccount
self.resourceType = resourceType
self.sources = sources
Expand Down Expand Up @@ -3834,6 +3878,8 @@ extension AccessAnalyzerClientTypes {
public var principal: [Swift.String: Swift.String]?
/// The resource that the external principal has access to.
public var resource: Swift.String?
/// The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).
public var resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction?
/// The Amazon Web Services account ID that owns the resource.
/// This member is required.
public var resourceOwnerAccount: Swift.String?
Expand All @@ -3859,6 +3905,7 @@ extension AccessAnalyzerClientTypes {
isPublic: Swift.Bool? = nil,
principal: [Swift.String: Swift.String]? = nil,
resource: Swift.String? = nil,
resourceControlPolicyRestriction: AccessAnalyzerClientTypes.ResourceControlPolicyRestriction? = nil,
resourceOwnerAccount: Swift.String? = nil,
resourceType: AccessAnalyzerClientTypes.ResourceType? = nil,
sources: [AccessAnalyzerClientTypes.FindingSource]? = nil,
Expand All @@ -3875,6 +3922,7 @@ extension AccessAnalyzerClientTypes {
self.isPublic = isPublic
self.principal = principal
self.resource = resource
self.resourceControlPolicyRestriction = resourceControlPolicyRestriction
self.resourceOwnerAccount = resourceOwnerAccount
self.resourceType = resourceType
self.sources = sources
Expand Down Expand Up @@ -4404,13 +4452,15 @@ extension AccessAnalyzerClientTypes {

public enum PolicyType: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable {
case identityPolicy
case resourceControlPolicy
case resourcePolicy
case serviceControlPolicy
case sdkUnknown(Swift.String)

public static var allCases: [PolicyType] {
return [
.identityPolicy,
.resourceControlPolicy,
.resourcePolicy,
.serviceControlPolicy
]
Expand All @@ -4424,6 +4474,7 @@ extension AccessAnalyzerClientTypes {
public var rawValue: Swift.String {
switch self {
case .identityPolicy: return "IDENTITY_POLICY"
case .resourceControlPolicy: return "RESOURCE_CONTROL_POLICY"
case .resourcePolicy: return "RESOURCE_POLICY"
case .serviceControlPolicy: return "SERVICE_CONTROL_POLICY"
case let .sdkUnknown(s): return s
Expand Down Expand Up @@ -7319,6 +7370,7 @@ extension AccessAnalyzerClientTypes.Finding {
value.resourceOwnerAccount = try reader["resourceOwnerAccount"].readIfPresent() ?? ""
value.error = try reader["error"].readIfPresent()
value.sources = try reader["sources"].readListIfPresent(memberReadingClosure: AccessAnalyzerClientTypes.FindingSource.read(from:), memberNodeInfo: "member", isFlattened: false)
value.resourceControlPolicyRestriction = try reader["resourceControlPolicyRestriction"].readIfPresent()
return value
}
}
Expand Down Expand Up @@ -7469,6 +7521,7 @@ extension AccessAnalyzerClientTypes.ExternalAccessDetails {
value.isPublic = try reader["isPublic"].readIfPresent()
value.principal = try reader["principal"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false)
value.sources = try reader["sources"].readListIfPresent(memberReadingClosure: AccessAnalyzerClientTypes.FindingSource.read(from:), memberNodeInfo: "member", isFlattened: false)
value.resourceControlPolicyRestriction = try reader["resourceControlPolicyRestriction"].readIfPresent()
return value
}
}
Expand Down Expand Up @@ -7575,6 +7628,7 @@ extension AccessAnalyzerClientTypes.AccessPreviewFinding {
value.resourceOwnerAccount = try reader["resourceOwnerAccount"].readIfPresent() ?? ""
value.error = try reader["error"].readIfPresent()
value.sources = try reader["sources"].readListIfPresent(memberReadingClosure: AccessAnalyzerClientTypes.FindingSource.read(from:), memberNodeInfo: "member", isFlattened: false)
value.resourceControlPolicyRestriction = try reader["resourceControlPolicyRestriction"].readIfPresent()
return value
}
}
Expand Down Expand Up @@ -7624,6 +7678,7 @@ extension AccessAnalyzerClientTypes.FindingSummary {
value.resourceOwnerAccount = try reader["resourceOwnerAccount"].readIfPresent() ?? ""
value.error = try reader["error"].readIfPresent()
value.sources = try reader["sources"].readListIfPresent(memberReadingClosure: AccessAnalyzerClientTypes.FindingSource.read(from:), memberNodeInfo: "member", isFlattened: false)
value.resourceControlPolicyRestriction = try reader["resourceControlPolicyRestriction"].readIfPresent()
return value
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes

public class AccountClient: ClientRuntime.Client {
public static let clientName = "AccountClient"
public static let version = "1.0.38"
public static let version = "1.0.39"
let client: ClientRuntime.SdkHttpClient
let config: AccountClient.AccountClientConfiguration
let serviceName = "Account"
Expand Down
Loading

0 comments on commit 480ff0d

Please sign in to comment.