commonMain.aws.sdk.kotlin.services.bedrock.BedrockClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrock-jvm Show documentation
Show all versions of bedrock-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrock
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.bedrock.auth.BedrockAuthSchemeProvider
import aws.sdk.kotlin.services.bedrock.auth.DefaultBedrockAuthSchemeProvider
import aws.sdk.kotlin.services.bedrock.endpoints.BedrockEndpointParameters
import aws.sdk.kotlin.services.bedrock.endpoints.BedrockEndpointProvider
import aws.sdk.kotlin.services.bedrock.endpoints.DefaultBedrockEndpointProvider
import aws.sdk.kotlin.services.bedrock.model.CreateModelCustomizationJobRequest
import aws.sdk.kotlin.services.bedrock.model.CreateModelCustomizationJobResponse
import aws.sdk.kotlin.services.bedrock.model.CreateProvisionedModelThroughputRequest
import aws.sdk.kotlin.services.bedrock.model.CreateProvisionedModelThroughputResponse
import aws.sdk.kotlin.services.bedrock.model.DeleteCustomModelRequest
import aws.sdk.kotlin.services.bedrock.model.DeleteCustomModelResponse
import aws.sdk.kotlin.services.bedrock.model.DeleteModelInvocationLoggingConfigurationRequest
import aws.sdk.kotlin.services.bedrock.model.DeleteModelInvocationLoggingConfigurationResponse
import aws.sdk.kotlin.services.bedrock.model.DeleteProvisionedModelThroughputRequest
import aws.sdk.kotlin.services.bedrock.model.DeleteProvisionedModelThroughputResponse
import aws.sdk.kotlin.services.bedrock.model.GetCustomModelRequest
import aws.sdk.kotlin.services.bedrock.model.GetCustomModelResponse
import aws.sdk.kotlin.services.bedrock.model.GetFoundationModelRequest
import aws.sdk.kotlin.services.bedrock.model.GetFoundationModelResponse
import aws.sdk.kotlin.services.bedrock.model.GetModelCustomizationJobRequest
import aws.sdk.kotlin.services.bedrock.model.GetModelCustomizationJobResponse
import aws.sdk.kotlin.services.bedrock.model.GetModelInvocationLoggingConfigurationRequest
import aws.sdk.kotlin.services.bedrock.model.GetModelInvocationLoggingConfigurationResponse
import aws.sdk.kotlin.services.bedrock.model.GetProvisionedModelThroughputRequest
import aws.sdk.kotlin.services.bedrock.model.GetProvisionedModelThroughputResponse
import aws.sdk.kotlin.services.bedrock.model.ListCustomModelsRequest
import aws.sdk.kotlin.services.bedrock.model.ListCustomModelsResponse
import aws.sdk.kotlin.services.bedrock.model.ListFoundationModelsRequest
import aws.sdk.kotlin.services.bedrock.model.ListFoundationModelsResponse
import aws.sdk.kotlin.services.bedrock.model.ListModelCustomizationJobsRequest
import aws.sdk.kotlin.services.bedrock.model.ListModelCustomizationJobsResponse
import aws.sdk.kotlin.services.bedrock.model.ListProvisionedModelThroughputsRequest
import aws.sdk.kotlin.services.bedrock.model.ListProvisionedModelThroughputsResponse
import aws.sdk.kotlin.services.bedrock.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.bedrock.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.bedrock.model.PutModelInvocationLoggingConfigurationRequest
import aws.sdk.kotlin.services.bedrock.model.PutModelInvocationLoggingConfigurationResponse
import aws.sdk.kotlin.services.bedrock.model.StopModelCustomizationJobRequest
import aws.sdk.kotlin.services.bedrock.model.StopModelCustomizationJobResponse
import aws.sdk.kotlin.services.bedrock.model.TagResourceRequest
import aws.sdk.kotlin.services.bedrock.model.TagResourceResponse
import aws.sdk.kotlin.services.bedrock.model.UntagResourceRequest
import aws.sdk.kotlin.services.bedrock.model.UntagResourceResponse
import aws.sdk.kotlin.services.bedrock.model.UpdateProvisionedModelThroughputRequest
import aws.sdk.kotlin.services.bedrock.model.UpdateProvisionedModelThroughputResponse
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.IdempotencyTokenConfig
import aws.smithy.kotlin.runtime.client.IdempotencyTokenProvider
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.client.SdkClientFactory
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 = "Bedrock"
public const val SdkVersion: String = "1.0.0"
/**
* Describes the API operations for creating and managing Bedrock models.
*/
public interface BedrockClient : SdkClient {
/**
* BedrockClient's configuration
*/
public override val config: Config
public companion object : AbstractAwsSdkClientFactory() {
@JvmStatic
override fun builder(): Builder = Builder()
override suspend fun finalizeConfig(builder: Builder, sharedConfig: LazyAsyncValue, activeProfile: LazyAsyncValue) {
builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
sharedConfig,
"Bedrock",
"BEDROCK",
"bedrock",
)
builder.config.interceptors.add(0, ClockSkewInterceptor())
}
}
public class Builder internal constructor(): AbstractSdkClientBuilder() {
override val config: Config.Builder = Config.Builder()
override fun newClient(config: Config): BedrockClient = DefaultBedrockClient(config)
}
public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), IdempotencyTokenConfig, 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: BedrockEndpointProvider = builder.endpointProvider ?: DefaultBedrockEndpointProvider()
public val endpointUrl: Url? = builder.endpointUrl
override val idempotencyTokenProvider: IdempotencyTokenProvider = builder.idempotencyTokenProvider ?: IdempotencyTokenProvider.Default
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: BedrockAuthSchemeProvider = builder.authSchemeProvider ?: DefaultBedrockAuthSchemeProvider()
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]
idempotencyTokenProvider = [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(), IdempotencyTokenConfig.Builder, RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder, TelemetryConfig.Builder {
/**
* A reader-friendly name for the client.
*/
override var clientName: String = "Bedrock"
/**
* 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: BedrockEndpointProvider? = 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
/**
* Override the default idempotency token generator. SDK clients will generate tokens for members
* that represent idempotent tokens when not explicitly set by the caller using this generator.
*/
override var idempotencyTokenProvider: IdempotencyTokenProvider? = 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: BedrockAuthSchemeProvider? = null
override fun build(): Config = Config(this)
}
}
/**
* Creates a fine-tuning job to customize a base model.
*
* You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Training data contains input and output text for each record in a JSONL format. Optionally, you can specify validation data in the same format as the training data. Bedrock returns validation loss metrics and output generations after the job completes.
*
* Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the `GetModelCustomizationJob` operation to retrieve the job status.
*
* For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun createModelCustomizationJob(input: CreateModelCustomizationJobRequest): CreateModelCustomizationJobResponse
/**
* Creates a provisioned throughput with dedicated capacity for a foundation model or a fine-tuned model.
*
* For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun createProvisionedModelThroughput(input: CreateProvisionedModelThroughputRequest): CreateProvisionedModelThroughputResponse
/**
* Deletes a custom model that you created earlier. For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun deleteCustomModel(input: DeleteCustomModelRequest): DeleteCustomModelResponse
/**
* Delete the invocation logging.
*/
public suspend fun deleteModelInvocationLoggingConfiguration(input: DeleteModelInvocationLoggingConfigurationRequest = DeleteModelInvocationLoggingConfigurationRequest { }): DeleteModelInvocationLoggingConfigurationResponse
/**
* Deletes a provisioned throughput. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun deleteProvisionedModelThroughput(input: DeleteProvisionedModelThroughputRequest): DeleteProvisionedModelThroughputResponse
/**
* Get the properties associated with a Bedrock custom model that you have created.For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun getCustomModel(input: GetCustomModelRequest): GetCustomModelResponse
/**
* Get details about a Bedrock foundation model.
*/
public suspend fun getFoundationModel(input: GetFoundationModelRequest): GetFoundationModelResponse
/**
* Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun getModelCustomizationJob(input: GetModelCustomizationJobRequest): GetModelCustomizationJobResponse
/**
* Get the current configuration values for model invocation logging.
*/
public suspend fun getModelInvocationLoggingConfiguration(input: GetModelInvocationLoggingConfigurationRequest = GetModelInvocationLoggingConfigurationRequest { }): GetModelInvocationLoggingConfigurationResponse
/**
* Get details for a provisioned throughput. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun getProvisionedModelThroughput(input: GetProvisionedModelThroughputRequest): GetProvisionedModelThroughputResponse
/**
* Returns a list of the custom models that you have created with the `CreateModelCustomizationJob` operation.
*
* For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun listCustomModels(input: ListCustomModelsRequest = ListCustomModelsRequest { }): ListCustomModelsResponse
/**
* List of Bedrock foundation models that you can use. For more information, see [Foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html) in the Bedrock User Guide.
*/
public suspend fun listFoundationModels(input: ListFoundationModelsRequest = ListFoundationModelsRequest { }): ListFoundationModelsResponse
/**
* Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
*
* For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun listModelCustomizationJobs(input: ListModelCustomizationJobsRequest = ListModelCustomizationJobsRequest { }): ListModelCustomizationJobsResponse
/**
* List the provisioned capacities. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun listProvisionedModelThroughputs(input: ListProvisionedModelThroughputsRequest = ListProvisionedModelThroughputsRequest { }): ListProvisionedModelThroughputsResponse
/**
* List the tags associated with the specified resource.
*
* For more information, see [Tagging resources](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse
/**
* Set the configuration values for model invocation logging.
*/
public suspend fun putModelInvocationLoggingConfiguration(input: PutModelInvocationLoggingConfigurationRequest): PutModelInvocationLoggingConfigurationResponse
/**
* Stops an active model customization job. For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend fun stopModelCustomizationJob(input: StopModelCustomizationJobRequest): StopModelCustomizationJobResponse
/**
* Associate tags with a resource. For more information, see [Tagging resources](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun tagResource(input: TagResourceRequest): TagResourceResponse
/**
* Remove one or more tags from a resource. For more information, see [Tagging resources](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse
/**
* Update a provisioned throughput. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend fun updateProvisionedModelThroughput(input: UpdateProvisionedModelThroughputRequest): UpdateProvisionedModelThroughputResponse
}
/**
* 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 BedrockClient.withConfig(block: BedrockClient.Config.Builder.() -> Unit): BedrockClient {
val newConfig = config.toBuilder().apply(block).build()
return DefaultBedrockClient(newConfig)
}
/**
* Creates a fine-tuning job to customize a base model.
*
* You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Training data contains input and output text for each record in a JSONL format. Optionally, you can specify validation data in the same format as the training data. Bedrock returns validation loss metrics and output generations after the job completes.
*
* Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the `GetModelCustomizationJob` operation to retrieve the job status.
*
* For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.createModelCustomizationJob(crossinline block: CreateModelCustomizationJobRequest.Builder.() -> Unit): CreateModelCustomizationJobResponse = createModelCustomizationJob(CreateModelCustomizationJobRequest.Builder().apply(block).build())
/**
* Creates a provisioned throughput with dedicated capacity for a foundation model or a fine-tuned model.
*
* For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.createProvisionedModelThroughput(crossinline block: CreateProvisionedModelThroughputRequest.Builder.() -> Unit): CreateProvisionedModelThroughputResponse = createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest.Builder().apply(block).build())
/**
* Deletes a custom model that you created earlier. For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.deleteCustomModel(crossinline block: DeleteCustomModelRequest.Builder.() -> Unit): DeleteCustomModelResponse = deleteCustomModel(DeleteCustomModelRequest.Builder().apply(block).build())
/**
* Delete the invocation logging.
*/
public suspend inline fun BedrockClient.deleteModelInvocationLoggingConfiguration(crossinline block: DeleteModelInvocationLoggingConfigurationRequest.Builder.() -> Unit): DeleteModelInvocationLoggingConfigurationResponse = deleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest.Builder().apply(block).build())
/**
* Deletes a provisioned throughput. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.deleteProvisionedModelThroughput(crossinline block: DeleteProvisionedModelThroughputRequest.Builder.() -> Unit): DeleteProvisionedModelThroughputResponse = deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest.Builder().apply(block).build())
/**
* Get the properties associated with a Bedrock custom model that you have created.For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.getCustomModel(crossinline block: GetCustomModelRequest.Builder.() -> Unit): GetCustomModelResponse = getCustomModel(GetCustomModelRequest.Builder().apply(block).build())
/**
* Get details about a Bedrock foundation model.
*/
public suspend inline fun BedrockClient.getFoundationModel(crossinline block: GetFoundationModelRequest.Builder.() -> Unit): GetFoundationModelResponse = getFoundationModel(GetFoundationModelRequest.Builder().apply(block).build())
/**
* Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.getModelCustomizationJob(crossinline block: GetModelCustomizationJobRequest.Builder.() -> Unit): GetModelCustomizationJobResponse = getModelCustomizationJob(GetModelCustomizationJobRequest.Builder().apply(block).build())
/**
* Get the current configuration values for model invocation logging.
*/
public suspend inline fun BedrockClient.getModelInvocationLoggingConfiguration(crossinline block: GetModelInvocationLoggingConfigurationRequest.Builder.() -> Unit): GetModelInvocationLoggingConfigurationResponse = getModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest.Builder().apply(block).build())
/**
* Get details for a provisioned throughput. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.getProvisionedModelThroughput(crossinline block: GetProvisionedModelThroughputRequest.Builder.() -> Unit): GetProvisionedModelThroughputResponse = getProvisionedModelThroughput(GetProvisionedModelThroughputRequest.Builder().apply(block).build())
/**
* Returns a list of the custom models that you have created with the `CreateModelCustomizationJob` operation.
*
* For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.listCustomModels(crossinline block: ListCustomModelsRequest.Builder.() -> Unit): ListCustomModelsResponse = listCustomModels(ListCustomModelsRequest.Builder().apply(block).build())
/**
* List of Bedrock foundation models that you can use. For more information, see [Foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.listFoundationModels(crossinline block: ListFoundationModelsRequest.Builder.() -> Unit): ListFoundationModelsResponse = listFoundationModels(ListFoundationModelsRequest.Builder().apply(block).build())
/**
* Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
*
* For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.listModelCustomizationJobs(crossinline block: ListModelCustomizationJobsRequest.Builder.() -> Unit): ListModelCustomizationJobsResponse = listModelCustomizationJobs(ListModelCustomizationJobsRequest.Builder().apply(block).build())
/**
* List the provisioned capacities. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.listProvisionedModelThroughputs(crossinline block: ListProvisionedModelThroughputsRequest.Builder.() -> Unit): ListProvisionedModelThroughputsResponse = listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest.Builder().apply(block).build())
/**
* List the tags associated with the specified resource.
*
* For more information, see [Tagging resources](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.listTagsForResource(crossinline block: ListTagsForResourceRequest.Builder.() -> Unit): ListTagsForResourceResponse = listTagsForResource(ListTagsForResourceRequest.Builder().apply(block).build())
/**
* Set the configuration values for model invocation logging.
*/
public suspend inline fun BedrockClient.putModelInvocationLoggingConfiguration(crossinline block: PutModelInvocationLoggingConfigurationRequest.Builder.() -> Unit): PutModelInvocationLoggingConfigurationResponse = putModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest.Builder().apply(block).build())
/**
* Stops an active model customization job. For more information, see [Custom models](https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.stopModelCustomizationJob(crossinline block: StopModelCustomizationJobRequest.Builder.() -> Unit): StopModelCustomizationJobResponse = stopModelCustomizationJob(StopModelCustomizationJobRequest.Builder().apply(block).build())
/**
* Associate tags with a resource. For more information, see [Tagging resources](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse = tagResource(TagResourceRequest.Builder().apply(block).build())
/**
* Remove one or more tags from a resource. For more information, see [Tagging resources](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())
/**
* Update a provisioned throughput. For more information, see [Provisioned throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) in the Bedrock User Guide.
*/
public suspend inline fun BedrockClient.updateProvisionedModelThroughput(crossinline block: UpdateProvisionedModelThroughputRequest.Builder.() -> Unit): UpdateProvisionedModelThroughputResponse = updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest.Builder().apply(block).build())
© 2015 - 2025 Weber Informatics LLC | Privacy Policy