commonMain.aws.sdk.kotlin.services.kinesisvideo.KinesisVideoClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesisvideo-jvm Show documentation
Show all versions of kinesisvideo-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis Video
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesisvideo
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.kinesisvideo.auth.DefaultKinesisVideoAuthSchemeProvider
import aws.sdk.kotlin.services.kinesisvideo.auth.KinesisVideoAuthSchemeProvider
import aws.sdk.kotlin.services.kinesisvideo.endpoints.DefaultKinesisVideoEndpointProvider
import aws.sdk.kotlin.services.kinesisvideo.endpoints.KinesisVideoEndpointParameters
import aws.sdk.kotlin.services.kinesisvideo.endpoints.KinesisVideoEndpointProvider
import aws.sdk.kotlin.services.kinesisvideo.model.CreateSignalingChannelRequest
import aws.sdk.kotlin.services.kinesisvideo.model.CreateSignalingChannelResponse
import aws.sdk.kotlin.services.kinesisvideo.model.CreateStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.CreateStreamResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DeleteEdgeConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DeleteEdgeConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DeleteSignalingChannelRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DeleteSignalingChannelResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DeleteStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DeleteStreamResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeEdgeConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeEdgeConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeImageGenerationConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeImageGenerationConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeMappedResourceConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeMappedResourceConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeMediaStorageConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeMediaStorageConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeNotificationConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeNotificationConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeSignalingChannelRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeSignalingChannelResponse
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.DescribeStreamResponse
import aws.sdk.kotlin.services.kinesisvideo.model.GetDataEndpointRequest
import aws.sdk.kotlin.services.kinesisvideo.model.GetDataEndpointResponse
import aws.sdk.kotlin.services.kinesisvideo.model.GetSignalingChannelEndpointRequest
import aws.sdk.kotlin.services.kinesisvideo.model.GetSignalingChannelEndpointResponse
import aws.sdk.kotlin.services.kinesisvideo.model.ListEdgeAgentConfigurationsRequest
import aws.sdk.kotlin.services.kinesisvideo.model.ListEdgeAgentConfigurationsResponse
import aws.sdk.kotlin.services.kinesisvideo.model.ListSignalingChannelsRequest
import aws.sdk.kotlin.services.kinesisvideo.model.ListSignalingChannelsResponse
import aws.sdk.kotlin.services.kinesisvideo.model.ListStreamsRequest
import aws.sdk.kotlin.services.kinesisvideo.model.ListStreamsResponse
import aws.sdk.kotlin.services.kinesisvideo.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.kinesisvideo.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.kinesisvideo.model.ListTagsForStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.ListTagsForStreamResponse
import aws.sdk.kotlin.services.kinesisvideo.model.StartEdgeConfigurationUpdateRequest
import aws.sdk.kotlin.services.kinesisvideo.model.StartEdgeConfigurationUpdateResponse
import aws.sdk.kotlin.services.kinesisvideo.model.TagResourceRequest
import aws.sdk.kotlin.services.kinesisvideo.model.TagResourceResponse
import aws.sdk.kotlin.services.kinesisvideo.model.TagStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.TagStreamResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UntagResourceRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UntagResourceResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UntagStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UntagStreamResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateImageGenerationConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateImageGenerationConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateMediaStorageConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateMediaStorageConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateNotificationConfigurationRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateNotificationConfigurationResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateSignalingChannelRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateSignalingChannelResponse
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateStreamRequest
import aws.sdk.kotlin.services.kinesisvideo.model.UpdateStreamResponse
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 = "Kinesis Video"
public const val SdkVersion: String = "1.3.1"
public const val ServiceApiVersion: String = "2017-09-30"
/**
*
*/
public interface KinesisVideoClient : SdkClient {
/**
* KinesisVideoClient'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,
"KinesisVideo",
"KINESIS_VIDEO",
"kinesis_video",
)
}
}
public class Builder internal constructor(): AbstractSdkClientBuilder() {
override val config: Config.Builder = Config.Builder()
override fun newClient(config: Config): KinesisVideoClient = DefaultKinesisVideoClient(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: KinesisVideoEndpointProvider = builder.endpointProvider ?: DefaultKinesisVideoEndpointProvider()
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: KinesisVideoAuthSchemeProvider = builder.authSchemeProvider ?: DefaultKinesisVideoAuthSchemeProvider()
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 = "Kinesis Video"
/**
* 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: KinesisVideoEndpointProvider? = 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: KinesisVideoAuthSchemeProvider? = null
override fun build(): Config = Config(this)
}
}
/**
* Creates a signaling channel.
*
* `CreateSignalingChannel` is an asynchronous operation.
*/
public suspend fun createSignalingChannel(input: CreateSignalingChannelRequest): CreateSignalingChannelResponse
/**
* Creates a new Kinesis video stream.
*
* When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version.
*
* `CreateStream` is an asynchronous operation.
*
* For information about how the service works, see [How it Works](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-it-works.html).
*
* You must have permissions for the `KinesisVideo:CreateStream` action.
*/
public suspend fun createStream(input: CreateStreamRequest): CreateStreamResponse
/**
* An asynchronous API that deletes a stream’s existing edge configuration, as well as the corresponding media from the Edge Agent.
*
* When you invoke this API, the sync status is set to `DELETING`. A deletion process starts, in which active edge jobs are stopped and all media is deleted from the edge device. The time to delete varies, depending on the total amount of stored media. If the deletion process fails, the sync status changes to `DELETE_FAILED`. You will need to re-try the deletion.
*
* When the deletion process has completed successfully, the edge configuration is no longer accessible.
*/
public suspend fun deleteEdgeConfiguration(input: DeleteEdgeConfigurationRequest = DeleteEdgeConfigurationRequest { }): DeleteEdgeConfigurationResponse
/**
* Deletes a specified signaling channel. `DeleteSignalingChannel` is an asynchronous operation. If you don't specify the channel's current version, the most recent version is deleted.
*/
public suspend fun deleteSignalingChannel(input: DeleteSignalingChannelRequest): DeleteSignalingChannelResponse
/**
* Deletes a Kinesis video stream and the data contained in the stream.
*
* This method marks the stream for deletion, and makes the data in the stream inaccessible immediately.
*
* To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the `DescribeStream` API.
*
* This operation requires permission for the `KinesisVideo:DeleteStream` action.
*/
public suspend fun deleteStream(input: DeleteStreamRequest): DeleteStreamResponse
/**
* Describes a stream’s edge configuration that was set using the `StartEdgeConfigurationUpdate` API and the latest status of the edge agent's recorder and uploader jobs. Use this API to get the status of the configuration to determine if the configuration is in sync with the Edge Agent. Use this API to evaluate the health of the Edge Agent.
*/
public suspend fun describeEdgeConfiguration(input: DescribeEdgeConfigurationRequest = DescribeEdgeConfigurationRequest { }): DescribeEdgeConfigurationResponse
/**
* Gets the `ImageGenerationConfiguration` for a given Kinesis video stream.
*/
public suspend fun describeImageGenerationConfiguration(input: DescribeImageGenerationConfigurationRequest = DescribeImageGenerationConfigurationRequest { }): DescribeImageGenerationConfigurationResponse
/**
* Returns the most current information about the stream. The `streamName` or `streamARN` should be provided in the input.
*/
public suspend fun describeMappedResourceConfiguration(input: DescribeMappedResourceConfigurationRequest = DescribeMappedResourceConfigurationRequest { }): DescribeMappedResourceConfigurationResponse
/**
* Returns the most current information about the channel. Specify the `ChannelName` or `ChannelARN` in the input.
*/
public suspend fun describeMediaStorageConfiguration(input: DescribeMediaStorageConfigurationRequest = DescribeMediaStorageConfigurationRequest { }): DescribeMediaStorageConfigurationResponse
/**
* Gets the `NotificationConfiguration` for a given Kinesis video stream.
*/
public suspend fun describeNotificationConfiguration(input: DescribeNotificationConfigurationRequest = DescribeNotificationConfigurationRequest { }): DescribeNotificationConfigurationResponse
/**
* Returns the most current information about the signaling channel. You must specify either the name or the Amazon Resource Name (ARN) of the channel that you want to describe.
*/
public suspend fun describeSignalingChannel(input: DescribeSignalingChannelRequest = DescribeSignalingChannelRequest { }): DescribeSignalingChannelResponse
/**
* Returns the most current information about the specified stream. You must specify either the `StreamName` or the `StreamARN`.
*/
public suspend fun describeStream(input: DescribeStreamRequest = DescribeStreamRequest { }): DescribeStreamResponse
/**
* Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the `GetMedia` or `GetMediaForFragmentList` operations) or write to it (using the `PutMedia` operation).
*
* The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint.
*
* In the request, specify the stream either by `StreamName` or `StreamARN`.
*/
public suspend fun getDataEndpoint(input: GetDataEndpointRequest): GetDataEndpointResponse
/**
* Provides an endpoint for the specified signaling channel to send and receive messages. This API uses the `SingleMasterChannelEndpointConfiguration` input parameter, which consists of the `Protocols` and `Role` properties.
*
* `Protocols` is used to determine the communication mechanism. For example, if you specify `WSS` as the protocol, this API produces a secure websocket endpoint. If you specify `HTTPS` as the protocol, this API generates an HTTPS endpoint.
*
* `Role` determines the messaging permissions. A `MASTER` role results in this API generating an endpoint that a client can use to communicate with any of the viewers on the channel. A `VIEWER` role results in this API generating an endpoint that a client can use to communicate only with a `MASTER`.
*/
public suspend fun getSignalingChannelEndpoint(input: GetSignalingChannelEndpointRequest): GetSignalingChannelEndpointResponse
/**
* Returns an array of edge configurations associated with the specified Edge Agent.
*
* In the request, you must specify the Edge Agent `HubDeviceArn`.
*/
public suspend fun listEdgeAgentConfigurations(input: ListEdgeAgentConfigurationsRequest): ListEdgeAgentConfigurationsResponse
/**
* Returns an array of `ChannelInfo` objects. Each object describes a signaling channel. To retrieve only those channels that satisfy a specific condition, you can specify a `ChannelNameCondition`.
*/
public suspend fun listSignalingChannels(input: ListSignalingChannelsRequest = ListSignalingChannelsRequest { }): ListSignalingChannelsResponse
/**
* Returns an array of `StreamInfo` objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a `StreamNameCondition`.
*/
public suspend fun listStreams(input: ListStreamsRequest = ListStreamsRequest { }): ListStreamsResponse
/**
* Returns a list of tags associated with the specified signaling channel.
*/
public suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse
/**
* Returns a list of tags associated with the specified stream.
*
* In the request, you must specify either the `StreamName` or the `StreamARN`.
*/
public suspend fun listTagsForStream(input: ListTagsForStreamRequest = ListTagsForStreamRequest { }): ListTagsForStreamResponse
/**
* An asynchronous API that updates a stream’s existing edge configuration. The Kinesis Video Stream will sync the stream’s edge configuration with the Edge Agent IoT Greengrass component that runs on an IoT Hub Device, setup at your premise. The time to sync can vary and depends on the connectivity of the Hub Device. The `SyncStatus` will be updated as the edge configuration is acknowledged, and synced with the Edge Agent.
*
* If this API is invoked for the first time, a new edge configuration will be created for the stream, and the sync status will be set to `SYNCING`. You will have to wait for the sync status to reach a terminal state such as: `IN_SYNC`, or `SYNC_FAILED`, before using this API again. If you invoke this API during the syncing process, a `ResourceInUseException` will be thrown. The connectivity of the stream’s edge configuration and the Edge Agent will be retried for 15 minutes. After 15 minutes, the status will transition into the `SYNC_FAILED` state.
*
* To move an edge configuration from one device to another, use DeleteEdgeConfiguration to delete the current edge configuration. You can then invoke StartEdgeConfigurationUpdate with an updated Hub Device ARN.
*/
public suspend fun startEdgeConfigurationUpdate(input: StartEdgeConfigurationUpdateRequest): StartEdgeConfigurationUpdateResponse
/**
* Adds one or more tags to a signaling channel. A *tag* is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the *Billing and Cost Management and Cost Management User Guide*.
*/
public suspend fun tagResource(input: TagResourceRequest): TagResourceResponse
/**
* Adds one or more tags to a stream. A *tag* is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the *Billing and Cost Management and Cost Management User Guide*.
*
* You must provide either the `StreamName` or the `StreamARN`.
*
* This operation requires permission for the `KinesisVideo:TagStream` action.
*
* A Kinesis video stream can support up to 50 tags.
*/
public suspend fun tagStream(input: TagStreamRequest): TagStreamResponse
/**
* Removes one or more tags from a signaling channel. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
*/
public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse
/**
* Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
*
* In the request, you must provide the `StreamName` or `StreamARN`.
*/
public suspend fun untagStream(input: UntagStreamRequest): UntagStreamResponse
/**
* Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the `Operation` parameter in the request body. In the request, you must specify either the `StreamName` or the `StreamARN`.
*
* This operation requires permission for the `KinesisVideo:UpdateDataRetention` action.
*
* Changing the data retention period affects the data in the stream as follows:
* + If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours.
* + If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
*/
public suspend fun updateDataRetention(input: UpdateDataRetentionRequest): UpdateDataRetentionResponse
/**
* Updates the `StreamInfo` and `ImageProcessingConfiguration` fields.
*/
public suspend fun updateImageGenerationConfiguration(input: UpdateImageGenerationConfigurationRequest = UpdateImageGenerationConfigurationRequest { }): UpdateImageGenerationConfigurationResponse
/**
* Associates a `SignalingChannel` to a stream to store the media. There are two signaling modes that you can specify :
* + If `StorageStatus` is enabled, the data will be stored in the `StreamARN` provided. In order for WebRTC Ingestion to work, the stream must have data retention enabled.
* + If `StorageStatus` is disabled, no data will be stored, and the `StreamARN` parameter will not be needed.
*
* If `StorageStatus` is enabled, direct peer-to-peer (master-viewer) connections no longer occur. Peers connect directly to the storage session. You must call the `JoinStorageSession` API to trigger an SDP offer send and establish a connection between a peer and the storage session.
*/
public suspend fun updateMediaStorageConfiguration(input: UpdateMediaStorageConfigurationRequest): UpdateMediaStorageConfigurationResponse
/**
* Updates the notification information for a stream.
*/
public suspend fun updateNotificationConfiguration(input: UpdateNotificationConfigurationRequest = UpdateNotificationConfigurationRequest { }): UpdateNotificationConfigurationResponse
/**
* Updates the existing signaling channel. This is an asynchronous operation and takes time to complete.
*
* If the `MessageTtlSeconds` value is updated (either increased or reduced), it only applies to new messages sent via this channel after it's been updated. Existing messages are still expired as per the previous `MessageTtlSeconds` value.
*/
public suspend fun updateSignalingChannel(input: UpdateSignalingChannelRequest): UpdateSignalingChannelResponse
/**
* Updates stream metadata, such as the device name and media type.
*
* You must provide the stream name or the Amazon Resource Name (ARN) of the stream.
*
* To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the `DescribeStream` API.
*
* `UpdateStream` is an asynchronous operation, and takes time to complete.
*/
public suspend fun updateStream(input: UpdateStreamRequest): UpdateStreamResponse
}
/**
* 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 KinesisVideoClient.withConfig(block: KinesisVideoClient.Config.Builder.() -> Unit): KinesisVideoClient {
val newConfig = config.toBuilder().apply(block).build()
return DefaultKinesisVideoClient(newConfig)
}
/**
* Creates a signaling channel.
*
* `CreateSignalingChannel` is an asynchronous operation.
*/
public suspend inline fun KinesisVideoClient.createSignalingChannel(crossinline block: CreateSignalingChannelRequest.Builder.() -> Unit): CreateSignalingChannelResponse = createSignalingChannel(CreateSignalingChannelRequest.Builder().apply(block).build())
/**
* Creates a new Kinesis video stream.
*
* When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version.
*
* `CreateStream` is an asynchronous operation.
*
* For information about how the service works, see [How it Works](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-it-works.html).
*
* You must have permissions for the `KinesisVideo:CreateStream` action.
*/
public suspend inline fun KinesisVideoClient.createStream(crossinline block: CreateStreamRequest.Builder.() -> Unit): CreateStreamResponse = createStream(CreateStreamRequest.Builder().apply(block).build())
/**
* An asynchronous API that deletes a stream’s existing edge configuration, as well as the corresponding media from the Edge Agent.
*
* When you invoke this API, the sync status is set to `DELETING`. A deletion process starts, in which active edge jobs are stopped and all media is deleted from the edge device. The time to delete varies, depending on the total amount of stored media. If the deletion process fails, the sync status changes to `DELETE_FAILED`. You will need to re-try the deletion.
*
* When the deletion process has completed successfully, the edge configuration is no longer accessible.
*/
public suspend inline fun KinesisVideoClient.deleteEdgeConfiguration(crossinline block: DeleteEdgeConfigurationRequest.Builder.() -> Unit): DeleteEdgeConfigurationResponse = deleteEdgeConfiguration(DeleteEdgeConfigurationRequest.Builder().apply(block).build())
/**
* Deletes a specified signaling channel. `DeleteSignalingChannel` is an asynchronous operation. If you don't specify the channel's current version, the most recent version is deleted.
*/
public suspend inline fun KinesisVideoClient.deleteSignalingChannel(crossinline block: DeleteSignalingChannelRequest.Builder.() -> Unit): DeleteSignalingChannelResponse = deleteSignalingChannel(DeleteSignalingChannelRequest.Builder().apply(block).build())
/**
* Deletes a Kinesis video stream and the data contained in the stream.
*
* This method marks the stream for deletion, and makes the data in the stream inaccessible immediately.
*
* To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the `DescribeStream` API.
*
* This operation requires permission for the `KinesisVideo:DeleteStream` action.
*/
public suspend inline fun KinesisVideoClient.deleteStream(crossinline block: DeleteStreamRequest.Builder.() -> Unit): DeleteStreamResponse = deleteStream(DeleteStreamRequest.Builder().apply(block).build())
/**
* Describes a stream’s edge configuration that was set using the `StartEdgeConfigurationUpdate` API and the latest status of the edge agent's recorder and uploader jobs. Use this API to get the status of the configuration to determine if the configuration is in sync with the Edge Agent. Use this API to evaluate the health of the Edge Agent.
*/
public suspend inline fun KinesisVideoClient.describeEdgeConfiguration(crossinline block: DescribeEdgeConfigurationRequest.Builder.() -> Unit): DescribeEdgeConfigurationResponse = describeEdgeConfiguration(DescribeEdgeConfigurationRequest.Builder().apply(block).build())
/**
* Gets the `ImageGenerationConfiguration` for a given Kinesis video stream.
*/
public suspend inline fun KinesisVideoClient.describeImageGenerationConfiguration(crossinline block: DescribeImageGenerationConfigurationRequest.Builder.() -> Unit): DescribeImageGenerationConfigurationResponse = describeImageGenerationConfiguration(DescribeImageGenerationConfigurationRequest.Builder().apply(block).build())
/**
* Returns the most current information about the stream. The `streamName` or `streamARN` should be provided in the input.
*/
public suspend inline fun KinesisVideoClient.describeMappedResourceConfiguration(crossinline block: DescribeMappedResourceConfigurationRequest.Builder.() -> Unit): DescribeMappedResourceConfigurationResponse = describeMappedResourceConfiguration(DescribeMappedResourceConfigurationRequest.Builder().apply(block).build())
/**
* Returns the most current information about the channel. Specify the `ChannelName` or `ChannelARN` in the input.
*/
public suspend inline fun KinesisVideoClient.describeMediaStorageConfiguration(crossinline block: DescribeMediaStorageConfigurationRequest.Builder.() -> Unit): DescribeMediaStorageConfigurationResponse = describeMediaStorageConfiguration(DescribeMediaStorageConfigurationRequest.Builder().apply(block).build())
/**
* Gets the `NotificationConfiguration` for a given Kinesis video stream.
*/
public suspend inline fun KinesisVideoClient.describeNotificationConfiguration(crossinline block: DescribeNotificationConfigurationRequest.Builder.() -> Unit): DescribeNotificationConfigurationResponse = describeNotificationConfiguration(DescribeNotificationConfigurationRequest.Builder().apply(block).build())
/**
* Returns the most current information about the signaling channel. You must specify either the name or the Amazon Resource Name (ARN) of the channel that you want to describe.
*/
public suspend inline fun KinesisVideoClient.describeSignalingChannel(crossinline block: DescribeSignalingChannelRequest.Builder.() -> Unit): DescribeSignalingChannelResponse = describeSignalingChannel(DescribeSignalingChannelRequest.Builder().apply(block).build())
/**
* Returns the most current information about the specified stream. You must specify either the `StreamName` or the `StreamARN`.
*/
public suspend inline fun KinesisVideoClient.describeStream(crossinline block: DescribeStreamRequest.Builder.() -> Unit): DescribeStreamResponse = describeStream(DescribeStreamRequest.Builder().apply(block).build())
/**
* Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the `GetMedia` or `GetMediaForFragmentList` operations) or write to it (using the `PutMedia` operation).
*
* The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint.
*
* In the request, specify the stream either by `StreamName` or `StreamARN`.
*/
public suspend inline fun KinesisVideoClient.getDataEndpoint(crossinline block: GetDataEndpointRequest.Builder.() -> Unit): GetDataEndpointResponse = getDataEndpoint(GetDataEndpointRequest.Builder().apply(block).build())
/**
* Provides an endpoint for the specified signaling channel to send and receive messages. This API uses the `SingleMasterChannelEndpointConfiguration` input parameter, which consists of the `Protocols` and `Role` properties.
*
* `Protocols` is used to determine the communication mechanism. For example, if you specify `WSS` as the protocol, this API produces a secure websocket endpoint. If you specify `HTTPS` as the protocol, this API generates an HTTPS endpoint.
*
* `Role` determines the messaging permissions. A `MASTER` role results in this API generating an endpoint that a client can use to communicate with any of the viewers on the channel. A `VIEWER` role results in this API generating an endpoint that a client can use to communicate only with a `MASTER`.
*/
public suspend inline fun KinesisVideoClient.getSignalingChannelEndpoint(crossinline block: GetSignalingChannelEndpointRequest.Builder.() -> Unit): GetSignalingChannelEndpointResponse = getSignalingChannelEndpoint(GetSignalingChannelEndpointRequest.Builder().apply(block).build())
/**
* Returns an array of edge configurations associated with the specified Edge Agent.
*
* In the request, you must specify the Edge Agent `HubDeviceArn`.
*/
public suspend inline fun KinesisVideoClient.listEdgeAgentConfigurations(crossinline block: ListEdgeAgentConfigurationsRequest.Builder.() -> Unit): ListEdgeAgentConfigurationsResponse = listEdgeAgentConfigurations(ListEdgeAgentConfigurationsRequest.Builder().apply(block).build())
/**
* Returns an array of `ChannelInfo` objects. Each object describes a signaling channel. To retrieve only those channels that satisfy a specific condition, you can specify a `ChannelNameCondition`.
*/
public suspend inline fun KinesisVideoClient.listSignalingChannels(crossinline block: ListSignalingChannelsRequest.Builder.() -> Unit): ListSignalingChannelsResponse = listSignalingChannels(ListSignalingChannelsRequest.Builder().apply(block).build())
/**
* Returns an array of `StreamInfo` objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a `StreamNameCondition`.
*/
public suspend inline fun KinesisVideoClient.listStreams(crossinline block: ListStreamsRequest.Builder.() -> Unit): ListStreamsResponse = listStreams(ListStreamsRequest.Builder().apply(block).build())
/**
* Returns a list of tags associated with the specified signaling channel.
*/
public suspend inline fun KinesisVideoClient.listTagsForResource(crossinline block: ListTagsForResourceRequest.Builder.() -> Unit): ListTagsForResourceResponse = listTagsForResource(ListTagsForResourceRequest.Builder().apply(block).build())
/**
* Returns a list of tags associated with the specified stream.
*
* In the request, you must specify either the `StreamName` or the `StreamARN`.
*/
public suspend inline fun KinesisVideoClient.listTagsForStream(crossinline block: ListTagsForStreamRequest.Builder.() -> Unit): ListTagsForStreamResponse = listTagsForStream(ListTagsForStreamRequest.Builder().apply(block).build())
/**
* An asynchronous API that updates a stream’s existing edge configuration. The Kinesis Video Stream will sync the stream’s edge configuration with the Edge Agent IoT Greengrass component that runs on an IoT Hub Device, setup at your premise. The time to sync can vary and depends on the connectivity of the Hub Device. The `SyncStatus` will be updated as the edge configuration is acknowledged, and synced with the Edge Agent.
*
* If this API is invoked for the first time, a new edge configuration will be created for the stream, and the sync status will be set to `SYNCING`. You will have to wait for the sync status to reach a terminal state such as: `IN_SYNC`, or `SYNC_FAILED`, before using this API again. If you invoke this API during the syncing process, a `ResourceInUseException` will be thrown. The connectivity of the stream’s edge configuration and the Edge Agent will be retried for 15 minutes. After 15 minutes, the status will transition into the `SYNC_FAILED` state.
*
* To move an edge configuration from one device to another, use DeleteEdgeConfiguration to delete the current edge configuration. You can then invoke StartEdgeConfigurationUpdate with an updated Hub Device ARN.
*/
public suspend inline fun KinesisVideoClient.startEdgeConfigurationUpdate(crossinline block: StartEdgeConfigurationUpdateRequest.Builder.() -> Unit): StartEdgeConfigurationUpdateResponse = startEdgeConfigurationUpdate(StartEdgeConfigurationUpdateRequest.Builder().apply(block).build())
/**
* Adds one or more tags to a signaling channel. A *tag* is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the *Billing and Cost Management and Cost Management User Guide*.
*/
public suspend inline fun KinesisVideoClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse = tagResource(TagResourceRequest.Builder().apply(block).build())
/**
* Adds one or more tags to a stream. A *tag* is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the *Billing and Cost Management and Cost Management User Guide*.
*
* You must provide either the `StreamName` or the `StreamARN`.
*
* This operation requires permission for the `KinesisVideo:TagStream` action.
*
* A Kinesis video stream can support up to 50 tags.
*/
public suspend inline fun KinesisVideoClient.tagStream(crossinline block: TagStreamRequest.Builder.() -> Unit): TagStreamResponse = tagStream(TagStreamRequest.Builder().apply(block).build())
/**
* Removes one or more tags from a signaling channel. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
*/
public suspend inline fun KinesisVideoClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())
/**
* Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
*
* In the request, you must provide the `StreamName` or `StreamARN`.
*/
public suspend inline fun KinesisVideoClient.untagStream(crossinline block: UntagStreamRequest.Builder.() -> Unit): UntagStreamResponse = untagStream(UntagStreamRequest.Builder().apply(block).build())
/**
* Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the `Operation` parameter in the request body. In the request, you must specify either the `StreamName` or the `StreamARN`.
*
* This operation requires permission for the `KinesisVideo:UpdateDataRetention` action.
*
* Changing the data retention period affects the data in the stream as follows:
* + If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours.
* + If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
*/
public suspend inline fun KinesisVideoClient.updateDataRetention(crossinline block: UpdateDataRetentionRequest.Builder.() -> Unit): UpdateDataRetentionResponse = updateDataRetention(UpdateDataRetentionRequest.Builder().apply(block).build())
/**
* Updates the `StreamInfo` and `ImageProcessingConfiguration` fields.
*/
public suspend inline fun KinesisVideoClient.updateImageGenerationConfiguration(crossinline block: UpdateImageGenerationConfigurationRequest.Builder.() -> Unit): UpdateImageGenerationConfigurationResponse = updateImageGenerationConfiguration(UpdateImageGenerationConfigurationRequest.Builder().apply(block).build())
/**
* Associates a `SignalingChannel` to a stream to store the media. There are two signaling modes that you can specify :
* + If `StorageStatus` is enabled, the data will be stored in the `StreamARN` provided. In order for WebRTC Ingestion to work, the stream must have data retention enabled.
* + If `StorageStatus` is disabled, no data will be stored, and the `StreamARN` parameter will not be needed.
*
* If `StorageStatus` is enabled, direct peer-to-peer (master-viewer) connections no longer occur. Peers connect directly to the storage session. You must call the `JoinStorageSession` API to trigger an SDP offer send and establish a connection between a peer and the storage session.
*/
public suspend inline fun KinesisVideoClient.updateMediaStorageConfiguration(crossinline block: UpdateMediaStorageConfigurationRequest.Builder.() -> Unit): UpdateMediaStorageConfigurationResponse = updateMediaStorageConfiguration(UpdateMediaStorageConfigurationRequest.Builder().apply(block).build())
/**
* Updates the notification information for a stream.
*/
public suspend inline fun KinesisVideoClient.updateNotificationConfiguration(crossinline block: UpdateNotificationConfigurationRequest.Builder.() -> Unit): UpdateNotificationConfigurationResponse = updateNotificationConfiguration(UpdateNotificationConfigurationRequest.Builder().apply(block).build())
/**
* Updates the existing signaling channel. This is an asynchronous operation and takes time to complete.
*
* If the `MessageTtlSeconds` value is updated (either increased or reduced), it only applies to new messages sent via this channel after it's been updated. Existing messages are still expired as per the previous `MessageTtlSeconds` value.
*/
public suspend inline fun KinesisVideoClient.updateSignalingChannel(crossinline block: UpdateSignalingChannelRequest.Builder.() -> Unit): UpdateSignalingChannelResponse = updateSignalingChannel(UpdateSignalingChannelRequest.Builder().apply(block).build())
/**
* Updates stream metadata, such as the device name and media type.
*
* You must provide the stream name or the Amazon Resource Name (ARN) of the stream.
*
* To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the `DescribeStream` API.
*
* `UpdateStream` is an asynchronous operation, and takes time to complete.
*/
public suspend inline fun KinesisVideoClient.updateStream(crossinline block: UpdateStreamRequest.Builder.() -> Unit): UpdateStreamResponse = updateStream(UpdateStreamRequest.Builder().apply(block).build())