Skip to content

Commit

Permalink
chore: Updates version to 1.0.32
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sdk-swift-automation committed Oct 31, 2024
1 parent e4df700 commit b354dc8
Show file tree
Hide file tree
Showing 13 changed files with 1,733 additions and 127 deletions.
2 changes: 1 addition & 1 deletion Package.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.31
1.0.32
2 changes: 1 addition & 1 deletion Package.version.next
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.32
1.0.33
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 b354dc8

Please sign in to comment.