All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.applicationsignals.ApplicationSignalsClient.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.applicationsignals

import aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider
import aws.sdk.kotlin.runtime.auth.credentials.internal.manage
import aws.sdk.kotlin.runtime.client.AwsSdkClientConfig
import aws.sdk.kotlin.runtime.config.AbstractAwsSdkClientFactory
import aws.sdk.kotlin.runtime.config.endpoints.resolveEndpointUrl
import aws.sdk.kotlin.runtime.config.profile.AwsProfile
import aws.sdk.kotlin.runtime.config.profile.AwsSharedConfig
import aws.sdk.kotlin.runtime.http.retries.AwsRetryPolicy
import aws.sdk.kotlin.services.applicationsignals.auth.ApplicationSignalsAuthSchemeProvider
import aws.sdk.kotlin.services.applicationsignals.auth.DefaultApplicationSignalsAuthSchemeProvider
import aws.sdk.kotlin.services.applicationsignals.endpoints.ApplicationSignalsEndpointParameters
import aws.sdk.kotlin.services.applicationsignals.endpoints.ApplicationSignalsEndpointProvider
import aws.sdk.kotlin.services.applicationsignals.endpoints.DefaultApplicationSignalsEndpointProvider
import aws.sdk.kotlin.services.applicationsignals.model.BatchGetServiceLevelObjectiveBudgetReportRequest
import aws.sdk.kotlin.services.applicationsignals.model.BatchGetServiceLevelObjectiveBudgetReportResponse
import aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveRequest
import aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveResponse
import aws.sdk.kotlin.services.applicationsignals.model.DeleteServiceLevelObjectiveRequest
import aws.sdk.kotlin.services.applicationsignals.model.DeleteServiceLevelObjectiveResponse
import aws.sdk.kotlin.services.applicationsignals.model.GetServiceLevelObjectiveRequest
import aws.sdk.kotlin.services.applicationsignals.model.GetServiceLevelObjectiveResponse
import aws.sdk.kotlin.services.applicationsignals.model.GetServiceRequest
import aws.sdk.kotlin.services.applicationsignals.model.GetServiceResponse
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceDependenciesRequest
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceDependenciesResponse
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceDependentsRequest
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceDependentsResponse
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceLevelObjectivesRequest
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceLevelObjectivesResponse
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceOperationsRequest
import aws.sdk.kotlin.services.applicationsignals.model.ListServiceOperationsResponse
import aws.sdk.kotlin.services.applicationsignals.model.ListServicesRequest
import aws.sdk.kotlin.services.applicationsignals.model.ListServicesResponse
import aws.sdk.kotlin.services.applicationsignals.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.applicationsignals.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.applicationsignals.model.StartDiscoveryRequest
import aws.sdk.kotlin.services.applicationsignals.model.StartDiscoveryResponse
import aws.sdk.kotlin.services.applicationsignals.model.TagResourceRequest
import aws.sdk.kotlin.services.applicationsignals.model.TagResourceResponse
import aws.sdk.kotlin.services.applicationsignals.model.UntagResourceRequest
import aws.sdk.kotlin.services.applicationsignals.model.UntagResourceResponse
import aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveRequest
import aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveResponse
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
import aws.smithy.kotlin.runtime.client.LogMode
import aws.smithy.kotlin.runtime.client.RetryClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
import aws.smithy.kotlin.runtime.client.SdkClient
import aws.smithy.kotlin.runtime.client.SdkClientConfig
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
import aws.smithy.kotlin.runtime.http.auth.HttpAuthConfig
import aws.smithy.kotlin.runtime.http.config.HttpClientConfig
import aws.smithy.kotlin.runtime.http.config.HttpEngineConfig
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
import aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl
import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor
import aws.smithy.kotlin.runtime.net.url.Url
import aws.smithy.kotlin.runtime.retries.RetryStrategy
import aws.smithy.kotlin.runtime.retries.policy.RetryPolicy
import aws.smithy.kotlin.runtime.telemetry.Global
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
import kotlin.collections.List
import kotlin.jvm.JvmStatic


public const val ServiceId: String = "Application Signals"
public const val SdkVersion: String = "1.3.99"
public const val ServiceApiVersion: String = "2024-04-15"

/**
 * Use CloudWatch Application Signals for comprehensive observability of your cloud-based applications. It enables real-time service health dashboards and helps you track long-term performance trends against your business goals. The application-centric view provides you with unified visibility across your applications, services, and dependencies, so you can proactively monitor and efficiently triage any issues that may arise, ensuring optimal customer experience.
 *
 * Application Signals provides the following benefits:
 * + Automatically collect metrics and traces from your applications, and display key metrics such as call volume, availability, latency, faults, and errors.
 * + Create and monitor service level objectives (SLOs).
 * + See a map of your application topology that Application Signals automatically discovers, that gives you a visual representation of your applications, dependencies, and their connectivity.
 *
 * Application Signals works with CloudWatch RUM, CloudWatch Synthetics canaries, and Amazon Web Services Service Catalog AppRegistry, to display your client pages, Synthetics canaries, and application names within dashboards and maps.
 */
public interface ApplicationSignalsClient : SdkClient {
    /**
     * ApplicationSignalsClient's configuration
     */
    public override val config: Config

    public companion object : AbstractAwsSdkClientFactory()
     {
        @JvmStatic
        override fun builder(): Builder = Builder()

        override fun finalizeConfig(builder: Builder) {
            super.finalizeConfig(builder)
            builder.config.interceptors.add(0, ClockSkewInterceptor())
        }

        override suspend fun finalizeEnvironmentalConfig(builder: Builder, sharedConfig: LazyAsyncValue, activeProfile: LazyAsyncValue) {
            super.finalizeEnvironmentalConfig(builder, sharedConfig, activeProfile)
            builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
                sharedConfig,
                "ApplicationSignals",
                "APPLICATION_SIGNALS",
                "application_signals",
            )
        }
    }

    public class Builder internal constructor(): AbstractSdkClientBuilder() {
        override val config: Config.Builder = Config.Builder()
        override fun newClient(config: Config): ApplicationSignalsClient = DefaultApplicationSignalsClient(config)
    }

    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig {
        override val clientName: String = builder.clientName
        override val region: String? = builder.region
        override val authSchemes: kotlin.collections.List = builder.authSchemes
        override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
        public val endpointProvider: ApplicationSignalsEndpointProvider = builder.endpointProvider ?: DefaultApplicationSignalsEndpointProvider()
        public val endpointUrl: Url? = builder.endpointUrl
        override val interceptors: kotlin.collections.List = builder.interceptors
        override val logMode: LogMode = builder.logMode ?: LogMode.Default
        override val retryPolicy: RetryPolicy = builder.retryPolicy ?: AwsRetryPolicy.Default
        override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
        override val useDualStack: Boolean = builder.useDualStack ?: false
        override val useFips: Boolean = builder.useFips ?: false
        override val applicationId: String? = builder.applicationId
        public val authSchemeProvider: ApplicationSignalsAuthSchemeProvider = builder.authSchemeProvider ?: DefaultApplicationSignalsAuthSchemeProvider()
        public companion object {
            public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
        }

        public fun toBuilder(): Builder = Builder().apply {
            clientName = [email protected]
            region = [email protected]
            authSchemes = [email protected]
            credentialsProvider = [email protected]
            endpointProvider = [email protected]
            endpointUrl = [email protected]
            httpClient = [email protected]
            interceptors = [email protected]()
            logMode = [email protected]
            retryPolicy = [email protected]
            retryStrategy = [email protected]
            telemetryProvider = [email protected]
            useDualStack = [email protected]
            useFips = [email protected]
            applicationId = [email protected]
            authSchemeProvider = [email protected]
        }

        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder, TelemetryConfig.Builder {
            /**
             * A reader-friendly name for the client.
             */
            override var clientName: String = "Application Signals"

            /**
             * The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
             * [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
             * information
             */
            override var region: String? = null

            /**
             * Register new or override default [AuthScheme]s configured for this client. By default, the set
             * of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
             * precedence over the defaults and can be used to customize identity resolution and signing for specific
             * authentication schemes.
             */
            override var authSchemes: kotlin.collections.List = emptyList()

            /**
             * The AWS credentials provider to use for authenticating requests. If not provided a
             * [aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider] instance will be used.
             * NOTE: The caller is responsible for managing the lifetime of the provider when set. The SDK
             * client will not close it when the client is closed.
             */
            override var credentialsProvider: CredentialsProvider? = null

            /**
             * The endpoint provider used to determine where to make service requests. **This is an advanced config
             * option.**
             *
             * Endpoint resolution occurs as part of the workflow for every request made via the service client.
             *
             * The inputs to endpoint resolution are defined on a per-service basis (see [EndpointParameters]).
             */
            public var endpointProvider: ApplicationSignalsEndpointProvider? = null

            /**
             * A custom endpoint to route requests to. The endpoint set here is passed to the configured
             * [endpointProvider], which may inspect and modify it as needed.
             *
             * Setting a custom endpointUrl should generally be preferred to overriding the [endpointProvider] and is
             * the recommended way to route requests to development or preview instances of a service.
             *
             * **This is an advanced config option.**
             */
            public var endpointUrl: Url? = null

            /**
             * Add an [aws.smithy.kotlin.runtime.client.Interceptor] that will have access to read and modify
             * the request and response objects as they are processed by the SDK.
             * Interceptors added using this method are executed in the order they are configured and are always
             * later than any added automatically by the SDK.
             */
            override var interceptors: kotlin.collections.MutableList = kotlin.collections.mutableListOf()

            /**
             * Configure events that will be logged. By default clients will not output
             * raw requests or responses. Use this setting to opt-in to additional debug logging.
             *
             * This can be used to configure logging of requests, responses, retries, etc of SDK clients.
             *
             * **NOTE**: Logging of raw requests or responses may leak sensitive information! It may also have
             * performance considerations when dumping the request/response body. This is primarily a tool for
             * debug purposes.
             */
            override var logMode: LogMode? = null

            /**
             * The policy to use for evaluating operation results and determining whether/how to retry.
             */
            override var retryPolicy: RetryPolicy? = null

            /**
             * The telemetry provider used to instrument the SDK operations with. By default, the global telemetry
             * provider will be used.
             */
            override var telemetryProvider: TelemetryProvider? = null

            /**
             *            Flag to toggle whether to use dual-stack endpoints when making requests.
             *            See [https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html] for more information.
             * `          Disabled by default.
             */
            override var useDualStack: Boolean? = null

            /**
             *            Flag to toggle whether to use [FIPS](https://aws.amazon.com/compliance/fips/) endpoints when making requests.
             * `          Disabled by default.
             */
            override var useFips: Boolean? = null

            /**
             * An optional application specific identifier.
             * When set it will be appended to the User-Agent header of every request in the form of: `app/{applicationId}`.
             * When not explicitly set, the value will be loaded from the following locations:
             *
             * - JVM System Property: `aws.userAgentAppId`
             * - Environment variable: `AWS_SDK_UA_APP_ID`
             * - Shared configuration profile attribute: `sdk_ua_app_id`
             *
             * See [shared configuration settings](https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html)
             * reference for more information on environment variables and shared config settings.
             */
            override var applicationId: String? = null

            /**
             * Configure the provider used to resolve the authentication scheme to use for a particular operation.
             */
            public var authSchemeProvider: ApplicationSignalsAuthSchemeProvider? = null

            override fun build(): Config = Config(this)
        }
    }

    /**
     * Use this operation to retrieve one or more *service level objective (SLO) budget reports*.
     *
     * An *error budget* is the amount of time or requests in an unhealthy state that your service can accumulate during an interval before your overall SLO budget health is breached and the SLO is considered to be unmet. For example, an SLO with a threshold of 99.95% and a monthly interval translates to an error budget of 21.9 minutes of downtime in a 30-day month.
     *
     * Budget reports include a health indicator, the attainment value, and remaining budget.
     *
     * For more information about SLO error budgets, see [ SLO concepts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html#CloudWatch-ServiceLevelObjectives-concepts).
     */
    public suspend fun batchGetServiceLevelObjectiveBudgetReport(input: BatchGetServiceLevelObjectiveBudgetReportRequest): BatchGetServiceLevelObjectiveBudgetReportResponse

    /**
     * Creates a service level objective (SLO), which can help you ensure that your critical business operations are meeting customer expectations. Use SLOs to set and track specific target levels for the reliability and availability of your applications and services. SLOs use service level indicators (SLIs) to calculate whether the application is performing at the level that you want.
     *
     * Create an SLO to set a target for a service or operation’s availability or latency. CloudWatch measures this target frequently you can find whether it has been breached.
     *
     * The target performance quality that is defined for an SLO is the *attainment goal*.
     *
     * You can set SLO targets for your applications that are discovered by Application Signals, using critical metrics such as latency and availability. You can also set SLOs against any CloudWatch metric or math expression that produces a time series.
     *
     * When you create an SLO, you specify whether it is a *period-based SLO* or a *request-based SLO*. Each type of SLO has a different way of evaluating your application's performance against its attainment goal.
     * + A *period-based SLO* uses defined *periods* of time within a specified total time interval. For each period of time, Application Signals determines whether the application met its goal. The attainment rate is calculated as the `number of good periods/number of total periods`.For example, for a period-based SLO, meeting an attainment goal of 99.9% means that within your interval, your application must meet its performance goal during at least 99.9% of the time periods.
     * + A *request-based SLO* doesn't use pre-defined periods of time. Instead, the SLO measures `number of good requests/number of total requests` during the interval. At any time, you can find the ratio of good requests to total requests for the interval up to the time stamp that you specify, and measure that ratio against the goal set in your SLO.
     *
     * After you have created an SLO, you can retrieve error budget reports for it. An *error budget* is the amount of time or amount of requests that your application can be non-compliant with the SLO's goal, and still have your application meet the goal.
     * + For a period-based SLO, the error budget starts at a number defined by the highest number of periods that can fail to meet the threshold, while still meeting the overall goal. The *remaining error budget* decreases with every failed period that is recorded. The error budget within one interval can never increase.For example, an SLO with a threshold that 99.95% of requests must be completed under 2000ms every month translates to an error budget of 21.9 minutes of downtime per month.
     * + For a request-based SLO, the remaining error budget is dynamic and can increase or decrease, depending on the ratio of good requests to total requests.
     *
     * For more information about SLOs, see [ Service level objectives (SLOs)](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html).
     *
     * When you perform a `CreateServiceLevelObjective` operation, Application Signals creates the *AWSServiceRoleForCloudWatchApplicationSignals* service-linked role, if it doesn't already exist in your account. This service- linked role has the following permissions:
     * + `xray:GetServiceGraph`
     * + `logs:StartQuery`
     * + `logs:GetQueryResults`
     * + `cloudwatch:GetMetricData`
     * + `cloudwatch:ListMetrics`
     * + `tag:GetResources`
     * + `autoscaling:DescribeAutoScalingGroups`
     */
    public suspend fun createServiceLevelObjective(input: CreateServiceLevelObjectiveRequest): CreateServiceLevelObjectiveResponse

    /**
     * Deletes the specified service level objective.
     */
    public suspend fun deleteServiceLevelObjective(input: DeleteServiceLevelObjectiveRequest): DeleteServiceLevelObjectiveResponse

    /**
     * Returns information about a service discovered by Application Signals.
     */
    public suspend fun getService(input: GetServiceRequest): GetServiceResponse

    /**
     * Returns information about one SLO created in the account.
     */
    public suspend fun getServiceLevelObjective(input: GetServiceLevelObjectiveRequest): GetServiceLevelObjectiveResponse

    /**
     * Returns a list of service dependencies of the service that you specify. A dependency is an infrastructure component that an operation of this service connects with. Dependencies can include Amazon Web Services services, Amazon Web Services resources, and third-party services.
     */
    public suspend fun listServiceDependencies(input: ListServiceDependenciesRequest): ListServiceDependenciesResponse

    /**
     * Returns the list of dependents that invoked the specified service during the provided time range. Dependents include other services, CloudWatch Synthetics canaries, and clients that are instrumented with CloudWatch RUM app monitors.
     */
    public suspend fun listServiceDependents(input: ListServiceDependentsRequest): ListServiceDependentsResponse

    /**
     * Returns a list of SLOs created in this account.
     */
    public suspend fun listServiceLevelObjectives(input: ListServiceLevelObjectivesRequest = ListServiceLevelObjectivesRequest { }): ListServiceLevelObjectivesResponse

    /**
     * Returns a list of the *operations* of this service that have been discovered by Application Signals. Only the operations that were invoked during the specified time range are returned.
     */
    public suspend fun listServiceOperations(input: ListServiceOperationsRequest): ListServiceOperationsResponse

    /**
     * Returns a list of services that have been discovered by Application Signals. A service represents a minimum logical and transactional unit that completes a business function. Services are discovered through Application Signals instrumentation.
     */
    public suspend fun listServices(input: ListServicesRequest): ListServicesResponse

    /**
     * Displays the tags associated with a CloudWatch resource. Tags can be assigned to service level objectives.
     */
    public suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse

    /**
     * Enables this Amazon Web Services account to be able to use CloudWatch Application Signals by creating the *AWSServiceRoleForCloudWatchApplicationSignals* service-linked role. This service- linked role has the following permissions:
     * + `xray:GetServiceGraph`
     * + `logs:StartQuery`
     * + `logs:GetQueryResults`
     * + `cloudwatch:GetMetricData`
     * + `cloudwatch:ListMetrics`
     * + `tag:GetResources`
     * + `autoscaling:DescribeAutoScalingGroups`
     *
     * After completing this step, you still need to instrument your Java and Python applications to send data to Application Signals. For more information, see [ Enabling Application Signals](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Signals-Enable.html).
     */
    public suspend fun startDiscovery(input: StartDiscoveryRequest = StartDiscoveryRequest { }): StartDiscoveryResponse

    /**
     * Assigns one or more tags (key-value pairs) to the specified CloudWatch resource, such as a service level objective.
     *
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     *
     * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
     *
     * You can use the `TagResource` action with an alarm that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.
     *
     * You can associate as many as 50 tags with a CloudWatch resource.
     */
    public suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

    /**
     * Removes one or more tags from the specified resource.
     */
    public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse

    /**
     * Updates an existing service level objective (SLO). If you omit parameters, the previous values of those parameters are retained.
     *
     * You cannot change from a period-based SLO to a request-based SLO, or change from a request-based SLO to a period-based SLO.
     */
    public suspend fun updateServiceLevelObjective(input: UpdateServiceLevelObjectiveRequest): UpdateServiceLevelObjectiveResponse
}

/**
 * Create a copy of the client with one or more configuration values overridden.
 * This method allows the caller to perform scoped config overrides for one or more client operations.
 *
 * Any resources created on your behalf will be shared between clients, and will only be closed when ALL clients using them are closed.
 * If you provide a resource (e.g. [HttpClientEngine]) to the SDK, you are responsible for managing the lifetime of that resource.
 */
public fun ApplicationSignalsClient.withConfig(block: ApplicationSignalsClient.Config.Builder.() -> Unit): ApplicationSignalsClient {
    val newConfig = config.toBuilder().apply(block).build()
    return DefaultApplicationSignalsClient(newConfig)
}

/**
 * Use this operation to retrieve one or more *service level objective (SLO) budget reports*.
 *
 * An *error budget* is the amount of time or requests in an unhealthy state that your service can accumulate during an interval before your overall SLO budget health is breached and the SLO is considered to be unmet. For example, an SLO with a threshold of 99.95% and a monthly interval translates to an error budget of 21.9 minutes of downtime in a 30-day month.
 *
 * Budget reports include a health indicator, the attainment value, and remaining budget.
 *
 * For more information about SLO error budgets, see [ SLO concepts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html#CloudWatch-ServiceLevelObjectives-concepts).
 */
public suspend inline fun ApplicationSignalsClient.batchGetServiceLevelObjectiveBudgetReport(crossinline block: BatchGetServiceLevelObjectiveBudgetReportRequest.Builder.() -> Unit): BatchGetServiceLevelObjectiveBudgetReportResponse = batchGetServiceLevelObjectiveBudgetReport(BatchGetServiceLevelObjectiveBudgetReportRequest.Builder().apply(block).build())

/**
 * Creates a service level objective (SLO), which can help you ensure that your critical business operations are meeting customer expectations. Use SLOs to set and track specific target levels for the reliability and availability of your applications and services. SLOs use service level indicators (SLIs) to calculate whether the application is performing at the level that you want.
 *
 * Create an SLO to set a target for a service or operation’s availability or latency. CloudWatch measures this target frequently you can find whether it has been breached.
 *
 * The target performance quality that is defined for an SLO is the *attainment goal*.
 *
 * You can set SLO targets for your applications that are discovered by Application Signals, using critical metrics such as latency and availability. You can also set SLOs against any CloudWatch metric or math expression that produces a time series.
 *
 * When you create an SLO, you specify whether it is a *period-based SLO* or a *request-based SLO*. Each type of SLO has a different way of evaluating your application's performance against its attainment goal.
 * + A *period-based SLO* uses defined *periods* of time within a specified total time interval. For each period of time, Application Signals determines whether the application met its goal. The attainment rate is calculated as the `number of good periods/number of total periods`.For example, for a period-based SLO, meeting an attainment goal of 99.9% means that within your interval, your application must meet its performance goal during at least 99.9% of the time periods.
 * + A *request-based SLO* doesn't use pre-defined periods of time. Instead, the SLO measures `number of good requests/number of total requests` during the interval. At any time, you can find the ratio of good requests to total requests for the interval up to the time stamp that you specify, and measure that ratio against the goal set in your SLO.
 *
 * After you have created an SLO, you can retrieve error budget reports for it. An *error budget* is the amount of time or amount of requests that your application can be non-compliant with the SLO's goal, and still have your application meet the goal.
 * + For a period-based SLO, the error budget starts at a number defined by the highest number of periods that can fail to meet the threshold, while still meeting the overall goal. The *remaining error budget* decreases with every failed period that is recorded. The error budget within one interval can never increase.For example, an SLO with a threshold that 99.95% of requests must be completed under 2000ms every month translates to an error budget of 21.9 minutes of downtime per month.
 * + For a request-based SLO, the remaining error budget is dynamic and can increase or decrease, depending on the ratio of good requests to total requests.
 *
 * For more information about SLOs, see [ Service level objectives (SLOs)](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html).
 *
 * When you perform a `CreateServiceLevelObjective` operation, Application Signals creates the *AWSServiceRoleForCloudWatchApplicationSignals* service-linked role, if it doesn't already exist in your account. This service- linked role has the following permissions:
 * + `xray:GetServiceGraph`
 * + `logs:StartQuery`
 * + `logs:GetQueryResults`
 * + `cloudwatch:GetMetricData`
 * + `cloudwatch:ListMetrics`
 * + `tag:GetResources`
 * + `autoscaling:DescribeAutoScalingGroups`
 */
public suspend inline fun ApplicationSignalsClient.createServiceLevelObjective(crossinline block: CreateServiceLevelObjectiveRequest.Builder.() -> Unit): CreateServiceLevelObjectiveResponse = createServiceLevelObjective(CreateServiceLevelObjectiveRequest.Builder().apply(block).build())

/**
 * Deletes the specified service level objective.
 */
public suspend inline fun ApplicationSignalsClient.deleteServiceLevelObjective(crossinline block: DeleteServiceLevelObjectiveRequest.Builder.() -> Unit): DeleteServiceLevelObjectiveResponse = deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest.Builder().apply(block).build())

/**
 * Returns information about a service discovered by Application Signals.
 */
public suspend inline fun ApplicationSignalsClient.getService(crossinline block: GetServiceRequest.Builder.() -> Unit): GetServiceResponse = getService(GetServiceRequest.Builder().apply(block).build())

/**
 * Returns information about one SLO created in the account.
 */
public suspend inline fun ApplicationSignalsClient.getServiceLevelObjective(crossinline block: GetServiceLevelObjectiveRequest.Builder.() -> Unit): GetServiceLevelObjectiveResponse = getServiceLevelObjective(GetServiceLevelObjectiveRequest.Builder().apply(block).build())

/**
 * Returns a list of service dependencies of the service that you specify. A dependency is an infrastructure component that an operation of this service connects with. Dependencies can include Amazon Web Services services, Amazon Web Services resources, and third-party services.
 */
public suspend inline fun ApplicationSignalsClient.listServiceDependencies(crossinline block: ListServiceDependenciesRequest.Builder.() -> Unit): ListServiceDependenciesResponse = listServiceDependencies(ListServiceDependenciesRequest.Builder().apply(block).build())

/**
 * Returns the list of dependents that invoked the specified service during the provided time range. Dependents include other services, CloudWatch Synthetics canaries, and clients that are instrumented with CloudWatch RUM app monitors.
 */
public suspend inline fun ApplicationSignalsClient.listServiceDependents(crossinline block: ListServiceDependentsRequest.Builder.() -> Unit): ListServiceDependentsResponse = listServiceDependents(ListServiceDependentsRequest.Builder().apply(block).build())

/**
 * Returns a list of SLOs created in this account.
 */
public suspend inline fun ApplicationSignalsClient.listServiceLevelObjectives(crossinline block: ListServiceLevelObjectivesRequest.Builder.() -> Unit): ListServiceLevelObjectivesResponse = listServiceLevelObjectives(ListServiceLevelObjectivesRequest.Builder().apply(block).build())

/**
 * Returns a list of the *operations* of this service that have been discovered by Application Signals. Only the operations that were invoked during the specified time range are returned.
 */
public suspend inline fun ApplicationSignalsClient.listServiceOperations(crossinline block: ListServiceOperationsRequest.Builder.() -> Unit): ListServiceOperationsResponse = listServiceOperations(ListServiceOperationsRequest.Builder().apply(block).build())

/**
 * Returns a list of services that have been discovered by Application Signals. A service represents a minimum logical and transactional unit that completes a business function. Services are discovered through Application Signals instrumentation.
 */
public suspend inline fun ApplicationSignalsClient.listServices(crossinline block: ListServicesRequest.Builder.() -> Unit): ListServicesResponse = listServices(ListServicesRequest.Builder().apply(block).build())

/**
 * Displays the tags associated with a CloudWatch resource. Tags can be assigned to service level objectives.
 */
public suspend inline fun ApplicationSignalsClient.listTagsForResource(crossinline block: ListTagsForResourceRequest.Builder.() -> Unit): ListTagsForResourceResponse = listTagsForResource(ListTagsForResourceRequest.Builder().apply(block).build())

/**
 * Enables this Amazon Web Services account to be able to use CloudWatch Application Signals by creating the *AWSServiceRoleForCloudWatchApplicationSignals* service-linked role. This service- linked role has the following permissions:
 * + `xray:GetServiceGraph`
 * + `logs:StartQuery`
 * + `logs:GetQueryResults`
 * + `cloudwatch:GetMetricData`
 * + `cloudwatch:ListMetrics`
 * + `tag:GetResources`
 * + `autoscaling:DescribeAutoScalingGroups`
 *
 * After completing this step, you still need to instrument your Java and Python applications to send data to Application Signals. For more information, see [ Enabling Application Signals](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Signals-Enable.html).
 */
public suspend inline fun ApplicationSignalsClient.startDiscovery(crossinline block: StartDiscoveryRequest.Builder.() -> Unit): StartDiscoveryResponse = startDiscovery(StartDiscoveryRequest.Builder().apply(block).build())

/**
 * Assigns one or more tags (key-value pairs) to the specified CloudWatch resource, such as a service level objective.
 *
 * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
 *
 * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
 *
 * You can use the `TagResource` action with an alarm that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.
 *
 * You can associate as many as 50 tags with a CloudWatch resource.
 */
public suspend inline fun ApplicationSignalsClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse = tagResource(TagResourceRequest.Builder().apply(block).build())

/**
 * Removes one or more tags from the specified resource.
 */
public suspend inline fun ApplicationSignalsClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())

/**
 * Updates an existing service level objective (SLO). If you omit parameters, the previous values of those parameters are retained.
 *
 * You cannot change from a period-based SLO to a request-based SLO, or change from a request-based SLO to a period-based SLO.
 */
public suspend inline fun ApplicationSignalsClient.updateServiceLevelObjective(crossinline block: UpdateServiceLevelObjectiveRequest.Builder.() -> Unit): UpdateServiceLevelObjectiveResponse = updateServiceLevelObjective(UpdateServiceLevelObjectiveRequest.Builder().apply(block).build())




© 2015 - 2025 Weber Informatics LLC | Privacy Policy