Skip to content

create_channel

create_channel(
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    cdi_input_specification: Optional[CdiInputSpecification] = None,
    channel_class: Optional[ChannelClass] = None,
    destinations: Optional[__listOfOutputDestination] = None,
    encoder_settings: Optional[EncoderSettings] = None,
    input_attachments: Optional[__listOfInputAttachment] = None,
    input_specification: Optional[InputSpecification] = None,
    log_level: Optional[LogLevel] = None,
    maintenance: Optional[MaintenanceCreateSettings] = None,
    name: Optional[__string] = None,
    request_id: Optional[__string] = None,
    reserved: Optional[__string] = None,
    role_arn: Optional[__string] = None,
    tags: Optional[Tags] = None,
    vpc: Optional[VpcOutputSettings] = None,
    anywhere_settings: Optional[AnywhereSettings] = None,
    channel_engine_version: Optional[ChannelEngineVersionRequest] = None,
    dry_run: Optional[__boolean] = None,
    linked_channel_settings: Optional[LinkedChannelSettings] = None,
    channel_security_groups: Optional[__listOf__string] = None,
    inference_settings: Optional[InferenceSettings] = None,
) -> CreateChannelResponse

Creates a new channel

Parameters:

  • cdi_input_specification (Optional[CdiInputSpecification], default: None ) –

    Specification of CDI inputs for this channel

  • channel_class (Optional[ChannelClass], default: None ) –

    The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.

  • input_attachments (Optional[__listOfInputAttachment], default: None ) –

    List of input attachments for channel.

  • input_specification (Optional[InputSpecification], default: None ) –

    Specification of network and file inputs for this channel

  • log_level (Optional[LogLevel], default: None ) –

    The log level to write to CloudWatch Logs.

  • maintenance (Optional[MaintenanceCreateSettings], default: None ) –

    Maintenance settings for this channel.

  • name (Optional[__string], default: None ) –

    Name of channel.

  • request_id (Optional[__string], default: None ) –

    Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.

  • reserved (Optional[__string], default: None ) –

    Deprecated field that's only usable by whitelisted customers.

  • role_arn (Optional[__string], default: None ) –

    An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.

  • tags (Optional[Tags], default: None ) –

    A collection of key-value pairs.

  • vpc (Optional[VpcOutputSettings], default: None ) –

    Settings for the VPC outputs

  • anywhere_settings (Optional[AnywhereSettings], default: None ) –

    The Elemental Anywhere settings for this channel.

  • channel_engine_version (Optional[ChannelEngineVersionRequest], default: None ) –

    The desired engine version for this channel.

  • linked_channel_settings (Optional[LinkedChannelSettings], default: None ) –

    The linked channel settings for the channel.

  • channel_security_groups (Optional[__listOf__string], default: None ) –

    A list of IDs for all the Input Security Groups attached to the channel.

  • inference_settings (Optional[InferenceSettings], default: None ) –

    Include this setting to include Elemental Inference features in this channel.

Raises:

Source code in docs_src/capo_medialive/_services/media_live.py
def create_channel(
    self,
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    cdi_input_specification: Optional[
        "capo_medialive.types.cdi_input_specification.CdiInputSpecification"
    ] = None,
    channel_class: Optional[
        "capo_medialive.types.channel_class.ChannelClass"
    ] = None,
    destinations: Optional[
        "capo_medialive.types.__list_of_output_destination.__listOfOutputDestination"
    ] = None,
    encoder_settings: Optional[
        "capo_medialive.types.encoder_settings.EncoderSettings"
    ] = None,
    input_attachments: Optional[
        "capo_medialive.types.__list_of_input_attachment.__listOfInputAttachment"
    ] = None,
    input_specification: Optional[
        "capo_medialive.types.input_specification.InputSpecification"
    ] = None,
    log_level: Optional["capo_medialive.types.log_level.LogLevel"] = None,
    maintenance: Optional[
        "capo_medialive.types.maintenance_create_settings.MaintenanceCreateSettings"
    ] = None,
    name: Optional["capo_medialive.types.__string.__string"] = None,
    request_id: Optional["capo_medialive.types.__string.__string"] = None,
    reserved: Optional["capo_medialive.types.__string.__string"] = None,
    role_arn: Optional["capo_medialive.types.__string.__string"] = None,
    tags: Optional["capo_medialive.types.tags.Tags"] = None,
    vpc: Optional[
        "capo_medialive.types.vpc_output_settings.VpcOutputSettings"
    ] = None,
    anywhere_settings: Optional[
        "capo_medialive.types.anywhere_settings.AnywhereSettings"
    ] = None,
    channel_engine_version: Optional[
        "capo_medialive.types.channel_engine_version_request.ChannelEngineVersionRequest"
    ] = None,
    dry_run: Optional["capo_medialive.types.__boolean.__boolean"] = None,
    linked_channel_settings: Optional[
        "capo_medialive.types.linked_channel_settings.LinkedChannelSettings"
    ] = None,
    channel_security_groups: Optional[
        "capo_medialive.types.__list_of__string.__listOf__string"
    ] = None,
    inference_settings: Optional[
        "capo_medialive.types.inference_settings.InferenceSettings"
    ] = None,
) -> "capo_medialive.types.create_channel_response.CreateChannelResponse":
    """Creates a new channel

    Args:
        cdi_input_specification: Specification of CDI inputs for this channel
        channel_class: The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
        input_attachments: List of input attachments for channel.
        input_specification: Specification of network and file inputs for this channel
        log_level: The log level to write to CloudWatch Logs.
        maintenance: Maintenance settings for this channel.
        name: Name of channel.
        request_id: Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
        reserved: Deprecated field that's only usable by whitelisted customers.
        role_arn: An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
        tags: A collection of key-value pairs.
        vpc: Settings for the VPC outputs
        anywhere_settings: The Elemental Anywhere settings for this channel.
        channel_engine_version: The desired engine version for this channel.
        linked_channel_settings: The linked channel settings for the channel.
        channel_security_groups: A list of IDs for all the Input Security Groups attached to the channel.
        inference_settings: Include this setting to include Elemental Inference features in this channel.

    Raises:
        capo_medialive.errors.bad_gateway_exception.BadGatewayException: Placeholder documentation for BadGatewayException
        capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
        capo_medialive.errors.conflict_exception.ConflictException: Placeholder documentation for ConflictException
        capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
        capo_medialive.errors.gateway_timeout_exception.GatewayTimeoutException: Placeholder documentation for GatewayTimeoutException
        capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
        capo_medialive.errors.too_many_requests_exception.TooManyRequestsException: Placeholder documentation for TooManyRequestsException
        capo_medialive.errors.unprocessable_entity_exception.UnprocessableEntityException: Placeholder documentation for UnprocessableEntityException
        capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medialive.types.create_channel_request.CreateChannelRequest]",
    ) -> OperationResponse[
        "capo_medialive.types.create_channel_response.CreateChannelResponse"
    ]:
        import capo_medialive._operations.media_live.create_channel

        output, http_response = (
            capo_medialive._operations.media_live.create_channel.create_channel(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateChannel")
    )
    input_: capo_medialive.types.create_channel_request.CreateChannelRequest = {}
    if cdi_input_specification is not None:
        input_["cdi_input_specification"] = cdi_input_specification
    if channel_class is not None:
        input_["channel_class"] = channel_class
    if destinations is not None:
        input_["destinations"] = destinations
    if encoder_settings is not None:
        input_["encoder_settings"] = encoder_settings
    if input_attachments is not None:
        input_["input_attachments"] = input_attachments
    if input_specification is not None:
        input_["input_specification"] = input_specification
    if log_level is not None:
        input_["log_level"] = log_level
    if maintenance is not None:
        input_["maintenance"] = maintenance
    if name is not None:
        input_["name"] = name
    if request_id is None:
        request_id = str(uuid.uuid4())
    input_["request_id"] = request_id
    if reserved is not None:
        input_["reserved"] = reserved
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if tags is not None:
        input_["tags"] = tags
    if vpc is not None:
        input_["vpc"] = vpc
    if anywhere_settings is not None:
        input_["anywhere_settings"] = anywhere_settings
    if channel_engine_version is not None:
        input_["channel_engine_version"] = channel_engine_version
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if linked_channel_settings is not None:
        input_["linked_channel_settings"] = linked_channel_settings
    if channel_security_groups is not None:
        input_["channel_security_groups"] = channel_security_groups
    if inference_settings is not None:
        input_["inference_settings"] = inference_settings

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output