Skip to content

Commit

Permalink
Merge branch 'main' into jbe/spr2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins authored Nov 1, 2024
2 parents 3c07859 + 54a459e commit 39bfdbd
Show file tree
Hide file tree
Showing 105 changed files with 60,366 additions and 1,171 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/codegen-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ env:

jobs:
codegen-build-test:
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer
steps:
- name: Checkout aws-sdk-swift
uses: actions/checkout@v3
Expand Down Expand Up @@ -61,19 +61,5 @@ jobs:
run: ./scripts/ci_steps/codegen_sdk.sh
- name: Build SDK with Unit Tests
run: swift build --build-tests

# Configure credentials for use during special protocol tests run against real clients
# Since environment variables are modified by some tests profiles are used instead
- name: Create AWS config directory
run: mkdir -p ~/.aws
- name: Create AWS config file
run: |
echo "[default]" > ~/.aws/config
echo "region=us-west-2" >> ~/.aws/config
- name: Create AWS credentials file
run: |
echo "[default]" > ~/.aws/credentials
echo "aws_access_key_id = test-key-id" >> ~/.aws/credentials
echo "aws_secret_access_key = test-secret-access-key" >> ~/.aws/credentials
- name: Run Unit Tests
run: swift test --skip-build
26 changes: 13 additions & 13 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,41 @@ jobs:
- macos-15
xcode:
- Xcode_15.2
- Xcode_16
- Xcode_16.1
destination:
- 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
- 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
- 'platform=iOS Simulator,OS=18.1,name=iPhone 16'
- 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
- 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
- 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro'
- 'platform=macOS'
exclude:
# Don't run old macOS with new Xcode
- runner: macos-14
xcode: Xcode_16
xcode: Xcode_16.1
# Don't run new macOS with old Xcode
- runner: macos-15
xcode: Xcode_15.2
# Don't run old simulators with new Xcode
- destination: 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)'
xcode: Xcode_16
xcode: Xcode_16.1
- destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
xcode: Xcode_16
xcode: Xcode_16.1
- destination: 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
xcode: Xcode_16
xcode: Xcode_16.1
# Don't run new simulators with old Xcode
- destination: 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
- destination: 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)'
xcode: Xcode_15.2
- destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
- destination: 'platform=iOS Simulator,OS=18.1,name=iPhone 16'
xcode: Xcode_15.2
- destination: 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
- destination: 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro'
xcode: Xcode_15.2
steps:
- name: Configure Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: Install visionOS 2.0 sim
if: ${{ matrix.destination == 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro' }}
- name: Install visionOS sim if needed
if: ${{ contains(matrix.destination, 'platform=visionOS') }}
run: |
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,45 @@ jobs:
matrix:
# This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes
runner:
- macos-13
- macos-14
- macos-15
xcode:
- Xcode_15.2
- Xcode_16
- Xcode_16.1
destination:
- 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
- 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
- 'platform=iOS Simulator,OS=18.1,name=iPhone 16'
- 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
- 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
- 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro'
- 'platform=macOS'
exclude:
# Don't run old macOS with new Xcode
- runner: macos-13
xcode: Xcode_16
- runner: macos-14
xcode: Xcode_16.1
# Don't run new macOS with old Xcode
- runner: macos-15
xcode: Xcode_15.2
# Don't run old simulators with new Xcode
- destination: 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)'
xcode: Xcode_16
xcode: Xcode_16.1
- destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
xcode: Xcode_16
xcode: Xcode_16.1
- destination: 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
xcode: Xcode_16
xcode: Xcode_16.1
# Don't run new simulators with old Xcode
- destination: 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
- destination: 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)'
xcode: Xcode_15.2
- destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
- destination: 'platform=iOS Simulator,OS=18.1,name=iPhone 16'
xcode: Xcode_15.2
- destination: 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
- destination: 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro'
xcode: Xcode_15.2
steps:
- name: Configure Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: Install visionOS 2.0 sim
if: ${{ matrix.destination == 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro' }}
- name: Install visionOS sim if needed
if: ${{ contains(matrix.destination, 'platform=visionOS') }}
run: |
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
Expand Down
5 changes: 4 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.86.0"
let clientRuntimeVersion: Version = "0.87.0"
let crtVersion: Version = "0.37.0"

let packageScope = "aws-sdk-swift"
Expand Down Expand Up @@ -174,6 +174,9 @@ let serviceTargets: [String] = [
"AWSFraudDetector",
"AWSFreeTier",
"AWSGameLift",
"AWSGeoMaps",
"AWSGeoPlaces",
"AWSGeoRoutes",
"AWSGlacier",
"AWSGlobalAccelerator",
"AWSGlue",
Expand Down
2 changes: 1 addition & 1 deletion Package.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.30
1.0.33
2 changes: 1 addition & 1 deletion Package.version.next
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.31
1.0.34
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ This SDK is open-source. Code is available on Github [here](https://github.com/

[AWSGameLift](../../../../../swift/api/awsgamelift/latest)

[AWSGeoMaps](../../../../../swift/api/awsgeomaps/latest)

[AWSGeoPlaces](../../../../../swift/api/awsgeoplaces/latest)

[AWSGeoRoutes](../../../../../swift/api/awsgeoroutes/latest)

[AWSGlacier](../../../../../swift/api/awsglacier/latest)

[AWSGlobalAccelerator](../../../../../swift/api/awsglobalaccelerator/latest)
Expand Down
84 changes: 80 additions & 4 deletions Sources/Services/AWSAmp/Sources/AWSAmp/AmpClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ extension AmpClient {

/// Performs the `CreateScraper` operation on the `AmazonPrometheusService` service.
///
/// The CreateScraper operation creates a scraper to collect metrics. A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. You can configure the scraper to control what metrics are collected, and what transformations are applied prior to sending them to your workspace. If needed, an IAM role will be created for you that gives Amazon Managed Service for Prometheus access to the metrics in your cluster. For more information, see [Using roles for scraping metrics from EKS](https://docs.aws.amazon.com/prometheus/latest/userguide/using-service-linked-roles.html#using-service-linked-roles-prom-scraper) in the Amazon Managed Service for Prometheus User Guide. You cannot update a scraper. If you want to change the configuration of the scraper, create a new scraper and delete the old one. The scrapeConfiguration parameter contains the base64-encoded version of the YAML configuration file. For more information about collectors, including what metrics are collected, and how to configure the scraper, see [Amazon Web Services managed collectors](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector.html) in the Amazon Managed Service for Prometheus User Guide.
/// The CreateScraper operation creates a scraper to collect metrics. A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are flexible, and can be configured to control what metrics are collected, the frequency of collection, what transformations are applied to the metrics, and more. An IAM role will be created for you that Amazon Managed Service for Prometheus uses to access the metrics in your cluster. You must configure this role with a policy that allows it to scrape metrics from your cluster. For more information, see [Configuring your Amazon EKS cluster](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-eks-setup) in the Amazon Managed Service for Prometheus User Guide. The scrapeConfiguration parameter contains the base-64 encoded YAML configuration for the scraper. For more information about collectors, including what metrics are collected, and how to configure the scraper, see [Using an Amazon Web Services managed collector](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html) in the Amazon Managed Service for Prometheus User Guide.
///
/// - Parameter CreateScraperInput : Represents the input of a CreateScraper operation.
///
Expand Down Expand Up @@ -1495,7 +1495,7 @@ extension AmpClient {

/// Performs the `ListTagsForResource` operation on the `AmazonPrometheusService` service.
///
/// The ListTagsForResource operation returns the tags that are associated with an Amazon Managed Service for Prometheus resource. Currently, the only resources that can be tagged are workspaces and rule groups namespaces.
/// The ListTagsForResource operation returns the tags that are associated with an Amazon Managed Service for Prometheus resource. Currently, the only resources that can be tagged are scrapers, workspaces, and rule groups namespaces.
///
/// - Parameter ListTagsForResourceInput : [no documentation found]
///
Expand Down Expand Up @@ -1787,7 +1787,7 @@ extension AmpClient {

/// Performs the `TagResource` operation on the `AmazonPrometheusService` service.
///
/// The TagResource operation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
/// The TagResource operation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are rule groups namespaces, scrapers, and workspaces. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. To remove a tag, use UntagResource.
///
/// - Parameter TagResourceInput : [no documentation found]
///
Expand Down Expand Up @@ -1860,7 +1860,7 @@ extension AmpClient {

/// Performs the `UntagResource` operation on the `AmazonPrometheusService` service.
///
/// Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces.
/// Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are rule groups namespaces, scrapers, and workspaces.
///
/// - Parameter UntagResourceInput : [no documentation found]
///
Expand Down Expand Up @@ -2003,6 +2003,82 @@ extension AmpClient {
return try await op.execute(input: input)
}

/// Performs the `UpdateScraper` operation on the `AmazonPrometheusService` service.
///
/// Updates an existing scraper. You can't use this function to update the source from which the scraper is collecting metrics. To change the source, delete the scraper and create a new one.
///
/// - Parameter UpdateScraperInput : [no documentation found]
///
/// - Returns: `UpdateScraperOutput` : [no documentation found]
///
/// - Throws: One of the exceptions listed below __Possible Exceptions__.
///
/// __Possible Exceptions:__
/// - `AccessDeniedException` : You do not have sufficient access to perform this action.
/// - `ConflictException` : The request would cause an inconsistent state.
/// - `InternalServerException` : An unexpected error occurred during the processing of the request.
/// - `ResourceNotFoundException` : The request references a resources that doesn't exist.
/// - `ServiceQuotaExceededException` : Completing the request would cause a service quota to be exceeded.
/// - `ThrottlingException` : The request was denied due to request throttling.
/// - `ValidationException` : The input fails to satisfy the constraints specified by an Amazon Web Services service.
public func updateScraper(input: UpdateScraperInput) async throws -> UpdateScraperOutput {
let context = Smithy.ContextBuilder()
.withMethod(value: .put)
.withServiceName(value: serviceName)
.withOperation(value: "updateScraper")
.withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator)
.withLogger(value: config.logger)
.withPartitionID(value: config.partitionID)
.withAuthSchemes(value: config.authSchemes ?? [])
.withAuthSchemeResolver(value: config.authSchemeResolver)
.withUnsignedPayloadTrait(value: false)
.withSocketTimeout(value: config.httpClientConfiguration.socketTimeout)
.withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth")
.withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4")
.withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a")
.withRegion(value: config.region)
.withSigningName(value: "aps")
.withSigningRegion(value: config.signingRegion)
.build()
let builder = ClientRuntime.OrchestratorBuilder<UpdateScraperInput, UpdateScraperOutput, SmithyHTTPAPI.HTTPRequest, SmithyHTTPAPI.HTTPResponse>()
config.interceptorProviders.forEach { provider in
builder.interceptors.add(provider.create())
}
config.httpInterceptorProviders.forEach { provider in
builder.interceptors.add(provider.create())
}
builder.interceptors.add(ClientRuntime.IdempotencyTokenMiddleware<UpdateScraperInput, UpdateScraperOutput>(keyPath: \.clientToken))
builder.interceptors.add(ClientRuntime.URLPathMiddleware<UpdateScraperInput, UpdateScraperOutput>(UpdateScraperInput.urlPathProvider(_:)))
builder.interceptors.add(ClientRuntime.URLHostMiddleware<UpdateScraperInput, UpdateScraperOutput>())
builder.interceptors.add(ClientRuntime.ContentTypeMiddleware<UpdateScraperInput, UpdateScraperOutput>(contentType: "application/json"))
builder.serialize(ClientRuntime.BodyMiddleware<UpdateScraperInput, UpdateScraperOutput, SmithyJSON.Writer>(rootNodeInfo: "", inputWritingClosure: UpdateScraperInput.write(value:to:)))
builder.interceptors.add(ClientRuntime.ContentLengthMiddleware<UpdateScraperInput, UpdateScraperOutput>())
builder.deserialize(ClientRuntime.DeserializeMiddleware<UpdateScraperOutput>(UpdateScraperOutput.httpOutput(from:), UpdateScraperOutputError.httpError(from:)))
builder.interceptors.add(ClientRuntime.LoggerMiddleware<UpdateScraperInput, UpdateScraperOutput>(clientLogMode: config.clientLogMode))
builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions))
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
builder.applySigner(ClientRuntime.SignerMiddleware<UpdateScraperOutput>())
let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false)
builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware<UpdateScraperOutput, EndpointParams>(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams))
builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware<UpdateScraperInput, UpdateScraperOutput>(serviceID: serviceName, version: "1.0", config: config))
builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware<UpdateScraperOutput>())
builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware<UpdateScraperInput, UpdateScraperOutput>())
builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware<UpdateScraperInput, UpdateScraperOutput>(maxRetries: config.retryStrategyOptions.maxRetriesBase))
var metricsAttributes = Smithy.Attributes()
metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "Amp")
metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UpdateScraper")
let op = builder.attributes(context)
.telemetry(ClientRuntime.OrchestratorTelemetry(
telemetryProvider: config.telemetryProvider,
metricsAttributes: metricsAttributes,
meterScope: serviceName,
tracerScope: serviceName
))
.executeRequest(client)
.build()
return try await op.execute(input: input)
}

/// Performs the `UpdateWorkspaceAlias` operation on the `AmazonPrometheusService` service.
///
/// Updates the alias of an existing workspace.
Expand Down
Loading

0 comments on commit 39bfdbd

Please sign in to comment.