Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.medialive.kotlin.Channel.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.medialive.kotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelCdiInputSpecification
import com.pulumi.aws.medialive.kotlin.outputs.ChannelDestination
import com.pulumi.aws.medialive.kotlin.outputs.ChannelEncoderSettings
import com.pulumi.aws.medialive.kotlin.outputs.ChannelInputAttachment
import com.pulumi.aws.medialive.kotlin.outputs.ChannelInputSpecification
import com.pulumi.aws.medialive.kotlin.outputs.ChannelMaintenance
import com.pulumi.aws.medialive.kotlin.outputs.ChannelVpc
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.aws.medialive.kotlin.outputs.ChannelCdiInputSpecification.Companion.toKotlin as channelCdiInputSpecificationToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelDestination.Companion.toKotlin as channelDestinationToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelEncoderSettings.Companion.toKotlin as channelEncoderSettingsToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelInputAttachment.Companion.toKotlin as channelInputAttachmentToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelInputSpecification.Companion.toKotlin as channelInputSpecificationToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelMaintenance.Companion.toKotlin as channelMaintenanceToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.ChannelVpc.Companion.toKotlin as channelVpcToKotlin
/**
* Builder for [Channel].
*/
@PulumiTagMarker
public class ChannelResourceBuilder internal constructor() {
public var name: String? = null
public var args: ChannelArgs = ChannelArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ChannelArgsBuilder.() -> Unit) {
val builder = ChannelArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Channel {
val builtJavaResource = com.pulumi.aws.medialive.Channel(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Channel(builtJavaResource)
}
}
/**
* Resource for managing an AWS MediaLive Channel.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.medialive.Channel("example", {
* name: "example-channel",
* channelClass: "STANDARD",
* roleArn: exampleAwsIamRole.arn,
* inputSpecification: {
* codec: "AVC",
* inputResolution: "HD",
* maximumBitrate: "MAX_20_MBPS",
* },
* inputAttachments: [{
* inputAttachmentName: "example-input",
* inputId: exampleAwsMedialiveInput.id,
* }],
* destinations: [{
* id: "destination",
* settings: [
* {
* url: `s3://${main.id}/test1`,
* },
* {
* url: `s3://${main2.id}/test2`,
* },
* ],
* }],
* encoderSettings: {
* timecodeConfig: {
* source: "EMBEDDED",
* },
* audioDescriptions: [{
* audioSelectorName: "example audio selector",
* name: "audio-selector",
* }],
* videoDescriptions: [{
* name: "example-video",
* }],
* outputGroups: [{
* outputGroupSettings: {
* archiveGroupSettings: [{
* destination: {
* destinationRefId: "destination",
* },
* }],
* },
* outputs: [{
* outputName: "example-name",
* videoDescriptionName: "example-video",
* audioDescriptionNames: ["audio-selector"],
* outputSettings: {
* archiveOutputSettings: {
* nameModifier: "_1",
* extension: "m2ts",
* containerSettings: {
* m2tsSettings: {
* audioBufferModel: "ATSC",
* bufferModel: "MULTIPLEX",
* rateMode: "CBR",
* },
* },
* },
* },
* }],
* }],
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.medialive.Channel("example",
* name="example-channel",
* channel_class="STANDARD",
* role_arn=example_aws_iam_role["arn"],
* input_specification={
* "codec": "AVC",
* "input_resolution": "HD",
* "maximum_bitrate": "MAX_20_MBPS",
* },
* input_attachments=[{
* "input_attachment_name": "example-input",
* "input_id": example_aws_medialive_input["id"],
* }],
* destinations=[{
* "id": "destination",
* "settings": [
* {
* "url": f"s3://{main['id']}/test1",
* },
* {
* "url": f"s3://{main2['id']}/test2",
* },
* ],
* }],
* encoder_settings={
* "timecode_config": {
* "source": "EMBEDDED",
* },
* "audio_descriptions": [{
* "audio_selector_name": "example audio selector",
* "name": "audio-selector",
* }],
* "video_descriptions": [{
* "name": "example-video",
* }],
* "output_groups": [{
* "output_group_settings": {
* "archive_group_settings": [{
* "destination": {
* "destination_ref_id": "destination",
* },
* }],
* },
* "outputs": [{
* "output_name": "example-name",
* "video_description_name": "example-video",
* "audio_description_names": ["audio-selector"],
* "output_settings": {
* "archive_output_settings": {
* "name_modifier": "_1",
* "extension": "m2ts",
* "container_settings": {
* "m2ts_settings": {
* "audio_buffer_model": "ATSC",
* "buffer_model": "MULTIPLEX",
* "rate_mode": "CBR",
* },
* },
* },
* },
* }],
* }],
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.MediaLive.Channel("example", new()
* {
* Name = "example-channel",
* ChannelClass = "STANDARD",
* RoleArn = exampleAwsIamRole.Arn,
* InputSpecification = new Aws.MediaLive.Inputs.ChannelInputSpecificationArgs
* {
* Codec = "AVC",
* InputResolution = "HD",
* MaximumBitrate = "MAX_20_MBPS",
* },
* InputAttachments = new[]
* {
* new Aws.MediaLive.Inputs.ChannelInputAttachmentArgs
* {
* InputAttachmentName = "example-input",
* InputId = exampleAwsMedialiveInput.Id,
* },
* },
* Destinations = new[]
* {
* new Aws.MediaLive.Inputs.ChannelDestinationArgs
* {
* Id = "destination",
* Settings = new[]
* {
* new Aws.MediaLive.Inputs.ChannelDestinationSettingArgs
* {
* Url = $"s3://{main.Id}/test1",
* },
* new Aws.MediaLive.Inputs.ChannelDestinationSettingArgs
* {
* Url = $"s3://{main2.Id}/test2",
* },
* },
* },
* },
* EncoderSettings = new Aws.MediaLive.Inputs.ChannelEncoderSettingsArgs
* {
* TimecodeConfig = new Aws.MediaLive.Inputs.ChannelEncoderSettingsTimecodeConfigArgs
* {
* Source = "EMBEDDED",
* },
* AudioDescriptions = new[]
* {
* new Aws.MediaLive.Inputs.ChannelEncoderSettingsAudioDescriptionArgs
* {
* AudioSelectorName = "example audio selector",
* Name = "audio-selector",
* },
* },
* VideoDescriptions = new[]
* {
* new Aws.MediaLive.Inputs.ChannelEncoderSettingsVideoDescriptionArgs
* {
* Name = "example-video",
* },
* },
* OutputGroups = new[]
* {
* new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupArgs
* {
* OutputGroupSettings = new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArgs
* {
* ArchiveGroupSettings = new[]
* {
* new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingArgs
* {
* Destination = new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingDestinationArgs
* {
* DestinationRefId = "destination",
* },
* },
* },
* },
* Outputs = new[]
* {
* new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputArgs
* {
* OutputName = "example-name",
* VideoDescriptionName = "example-video",
* AudioDescriptionNames = new[]
* {
* "audio-selector",
* },
* OutputSettings = new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArgs
* {
* ArchiveOutputSettings = new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsArgs
* {
* NameModifier = "_1",
* Extension = "m2ts",
* ContainerSettings = new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsContainerSettingsArgs
* {
* M2tsSettings = new Aws.MediaLive.Inputs.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsContainerSettingsM2tsSettingsArgs
* {
* AudioBufferModel = "ATSC",
* BufferModel = "MULTIPLEX",
* RateMode = "CBR",
* },
* },
* },
* },
* },
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/medialive"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := medialive.NewChannel(ctx, "example", &medialive.ChannelArgs{
* Name: pulumi.String("example-channel"),
* ChannelClass: pulumi.String("STANDARD"),
* RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
* InputSpecification: &medialive.ChannelInputSpecificationArgs{
* Codec: pulumi.String("AVC"),
* InputResolution: pulumi.String("HD"),
* MaximumBitrate: pulumi.String("MAX_20_MBPS"),
* },
* InputAttachments: medialive.ChannelInputAttachmentArray{
* &medialive.ChannelInputAttachmentArgs{
* InputAttachmentName: pulumi.String("example-input"),
* InputId: pulumi.Any(exampleAwsMedialiveInput.Id),
* },
* },
* Destinations: medialive.ChannelDestinationArray{
* &medialive.ChannelDestinationArgs{
* Id: pulumi.String("destination"),
* Settings: medialive.ChannelDestinationSettingArray{
* &medialive.ChannelDestinationSettingArgs{
* Url: pulumi.Sprintf("s3://%v/test1", main.Id),
* },
* &medialive.ChannelDestinationSettingArgs{
* Url: pulumi.Sprintf("s3://%v/test2", main2.Id),
* },
* },
* },
* },
* EncoderSettings: &medialive.ChannelEncoderSettingsArgs{
* TimecodeConfig: &medialive.ChannelEncoderSettingsTimecodeConfigArgs{
* Source: pulumi.String("EMBEDDED"),
* },
* AudioDescriptions: medialive.ChannelEncoderSettingsAudioDescriptionArray{
* &medialive.ChannelEncoderSettingsAudioDescriptionArgs{
* AudioSelectorName: pulumi.String("example audio selector"),
* Name: pulumi.String("audio-selector"),
* },
* },
* VideoDescriptions: medialive.ChannelEncoderSettingsVideoDescriptionArray{
* &medialive.ChannelEncoderSettingsVideoDescriptionArgs{
* Name: pulumi.String("example-video"),
* },
* },
* OutputGroups: medialive.ChannelEncoderSettingsOutputGroupArray{
* &medialive.ChannelEncoderSettingsOutputGroupArgs{
* OutputGroupSettings: &medialive.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArgs{
* ArchiveGroupSettings: medialive.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingArray{
* &medialive.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingArgs{
* Destination: &medialive.ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingDestinationArgs{
* DestinationRefId: pulumi.String("destination"),
* },
* },
* },
* },
* Outputs: medialive.ChannelEncoderSettingsOutputGroupOutputTypeArray{
* &medialive.ChannelEncoderSettingsOutputGroupOutputTypeArgs{
* OutputName: pulumi.String("example-name"),
* VideoDescriptionName: pulumi.String("example-video"),
* AudioDescriptionNames: pulumi.StringArray{
* pulumi.String("audio-selector"),
* },
* OutputSettings: &medialive.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArgs{
* ArchiveOutputSettings: &medialive.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsArgs{
* NameModifier: pulumi.String("_1"),
* Extension: pulumi.String("m2ts"),
* ContainerSettings: &medialive.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsContainerSettingsArgs{
* M2tsSettings: &medialive.ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsContainerSettingsM2tsSettingsArgs{
* AudioBufferModel: pulumi.String("ATSC"),
* BufferModel: pulumi.String("MULTIPLEX"),
* RateMode: pulumi.String("CBR"),
* },
* },
* },
* },
* },
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.medialive.Channel;
* import com.pulumi.aws.medialive.ChannelArgs;
* import com.pulumi.aws.medialive.inputs.ChannelInputSpecificationArgs;
* import com.pulumi.aws.medialive.inputs.ChannelInputAttachmentArgs;
* import com.pulumi.aws.medialive.inputs.ChannelDestinationArgs;
* import com.pulumi.aws.medialive.inputs.ChannelEncoderSettingsArgs;
* import com.pulumi.aws.medialive.inputs.ChannelEncoderSettingsTimecodeConfigArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Channel("example", ChannelArgs.builder()
* .name("example-channel")
* .channelClass("STANDARD")
* .roleArn(exampleAwsIamRole.arn())
* .inputSpecification(ChannelInputSpecificationArgs.builder()
* .codec("AVC")
* .inputResolution("HD")
* .maximumBitrate("MAX_20_MBPS")
* .build())
* .inputAttachments(ChannelInputAttachmentArgs.builder()
* .inputAttachmentName("example-input")
* .inputId(exampleAwsMedialiveInput.id())
* .build())
* .destinations(ChannelDestinationArgs.builder()
* .id("destination")
* .settings(
* ChannelDestinationSettingArgs.builder()
* .url(String.format("s3://%s/test1", main.id()))
* .build(),
* ChannelDestinationSettingArgs.builder()
* .url(String.format("s3://%s/test2", main2.id()))
* .build())
* .build())
* .encoderSettings(ChannelEncoderSettingsArgs.builder()
* .timecodeConfig(ChannelEncoderSettingsTimecodeConfigArgs.builder()
* .source("EMBEDDED")
* .build())
* .audioDescriptions(ChannelEncoderSettingsAudioDescriptionArgs.builder()
* .audioSelectorName("example audio selector")
* .name("audio-selector")
* .build())
* .videoDescriptions(ChannelEncoderSettingsVideoDescriptionArgs.builder()
* .name("example-video")
* .build())
* .outputGroups(ChannelEncoderSettingsOutputGroupArgs.builder()
* .outputGroupSettings(ChannelEncoderSettingsOutputGroupOutputGroupSettingsArgs.builder()
* .archiveGroupSettings(ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingArgs.builder()
* .destination(ChannelEncoderSettingsOutputGroupOutputGroupSettingsArchiveGroupSettingDestinationArgs.builder()
* .destinationRefId("destination")
* .build())
* .build())
* .build())
* .outputs(ChannelEncoderSettingsOutputGroupOutputArgs.builder()
* .outputName("example-name")
* .videoDescriptionName("example-video")
* .audioDescriptionNames("audio-selector")
* .outputSettings(ChannelEncoderSettingsOutputGroupOutputOutputSettingsArgs.builder()
* .archiveOutputSettings(ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsArgs.builder()
* .nameModifier("_1")
* .extension("m2ts")
* .containerSettings(ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsContainerSettingsArgs.builder()
* .m2tsSettings(ChannelEncoderSettingsOutputGroupOutputOutputSettingsArchiveOutputSettingsContainerSettingsM2tsSettingsArgs.builder()
* .audioBufferModel("ATSC")
* .bufferModel("MULTIPLEX")
* .rateMode("CBR")
* .build())
* .build())
* .build())
* .build())
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:medialive:Channel
* properties:
* name: example-channel
* channelClass: STANDARD
* roleArn: ${exampleAwsIamRole.arn}
* inputSpecification:
* codec: AVC
* inputResolution: HD
* maximumBitrate: MAX_20_MBPS
* inputAttachments:
* - inputAttachmentName: example-input
* inputId: ${exampleAwsMedialiveInput.id}
* destinations:
* - id: destination
* settings:
* - url: s3://${main.id}/test1
* - url: s3://${main2.id}/test2
* encoderSettings:
* timecodeConfig:
* source: EMBEDDED
* audioDescriptions:
* - audioSelectorName: example audio selector
* name: audio-selector
* videoDescriptions:
* - name: example-video
* outputGroups:
* - outputGroupSettings:
* archiveGroupSettings:
* - destination:
* destinationRefId: destination
* outputs:
* - outputName: example-name
* videoDescriptionName: example-video
* audioDescriptionNames:
* - audio-selector
* outputSettings:
* archiveOutputSettings:
* nameModifier: _1
* extension: m2ts
* containerSettings:
* m2tsSettings:
* audioBufferModel: ATSC
* bufferModel: MULTIPLEX
* rateMode: CBR
* ```
*
* ## Import
* Using `pulumi import`, import MediaLive Channel using the `channel_id`. For example:
* ```sh
* $ pulumi import aws:medialive/channel:Channel example 1234567
* ```
*/
public class Channel internal constructor(
override val javaResource: com.pulumi.aws.medialive.Channel,
) : KotlinCustomResource(javaResource, ChannelMapper) {
/**
* ARN of the Channel.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specification of CDI inputs for this channel. See CDI Input Specification for more details.
*/
public val cdiInputSpecification: Output?
get() = javaResource.cdiInputSpecification().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> channelCdiInputSpecificationToKotlin(args0) })
}).orElse(null)
})
/**
* Concise argument description.
*/
public val channelClass: Output
get() = javaResource.channelClass().applyValue({ args0 -> args0 })
/**
* ID of the Channel.
*/
public val channelId: Output
get() = javaResource.channelId().applyValue({ args0 -> args0 })
/**
* Destinations for channel. See Destinations for more details.
*/
public val destinations: Output>
get() = javaResource.destinations().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
channelDestinationToKotlin(args0)
})
})
})
/**
* Encoder settings. See Encoder Settings for more details.
*/
public val encoderSettings: Output
get() = javaResource.encoderSettings().applyValue({ args0 ->
args0.let({ args0 ->
channelEncoderSettingsToKotlin(args0)
})
})
/**
* Input attachments for the channel. See Input Attachments for more details.
*/
public val inputAttachments: Output>
get() = javaResource.inputAttachments().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> channelInputAttachmentToKotlin(args0) })
})
})
/**
* Specification of network and file inputs for the channel.
*/
public val inputSpecification: Output
get() = javaResource.inputSpecification().applyValue({ args0 ->
args0.let({ args0 ->
channelInputSpecificationToKotlin(args0)
})
})
/**
* The log level to write to Cloudwatch logs.
*/
public val logLevel: Output
get() = javaResource.logLevel().applyValue({ args0 -> args0 })
/**
* Maintenance settings for this channel. See Maintenance for more details.
*/
public val maintenance: Output
get() = javaResource.maintenance().applyValue({ args0 ->
args0.let({ args0 ->
channelMaintenanceToKotlin(args0)
})
})
/**
* Name of the Channel.
* The following arguments are optional:
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Concise argument description.
*/
public val roleArn: Output?
get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Whether to start/stop channel. Default: `false`
*/
public val startChannel: Output?
get() = javaResource.startChannel().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A map of tags to assign to the channel. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
@Deprecated(
message = """
Please use `tags` instead.
""",
)
public val tagsAll: Output>
get() = javaResource.tagsAll().applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
})
/**
* Settings for the VPC outputs. See VPC for more details.
*/
public val vpc: Output?
get() = javaResource.vpc().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
channelVpcToKotlin(args0)
})
}).orElse(null)
})
}
public object ChannelMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.medialive.Channel::class == javaResource::class
override fun map(javaResource: Resource): Channel = Channel(
javaResource as
com.pulumi.aws.medialive.Channel,
)
}
/**
* @see [Channel].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Channel].
*/
public suspend fun channel(name: String, block: suspend ChannelResourceBuilder.() -> Unit): Channel {
val builder = ChannelResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Channel].
* @param name The _unique_ name of the resulting resource.
*/
public fun channel(name: String): Channel {
val builder = ChannelResourceBuilder()
builder.name(name)
return builder.build()
}