Skip to content

create_encoder_configuration async

create_encoder_configuration(
    *,
    config_overrides: Optional[AsyncIVSRealTimeClientConfig] = None,
    name: Optional[EncoderConfigurationName] = None,
    video: Optional[Video] = None,
    tags: Optional[Tags] = None,
) -> CreateEncoderConfigurationResponse

Creates an EncoderConfiguration object.

Parameters:

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

    Optional name to identify the resource.

  • video (Optional[Video], default: None ) –

    Video configuration. Default: video resolution 1280x720, bitrate 2500 kbps, 30 fps.

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

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging AWS Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.

Raises:

Source code in docs_src/capo_ivs_realtime/_services/async_ivs_real_time.py
async def create_encoder_configuration(
    self,
    *,
    config_overrides: Optional[AsyncIVSRealTimeClientConfig] = None,
    name: Optional[
        "capo_ivs_realtime.types.encoder_configuration_name.EncoderConfigurationName"
    ] = None,
    video: Optional["capo_ivs_realtime.types.video.Video"] = None,
    tags: Optional["capo_ivs_realtime.types.tags.Tags"] = None,
) -> "capo_ivs_realtime.types.create_encoder_configuration_response.CreateEncoderConfigurationResponse":
    """<p>Creates an EncoderConfiguration object.</p>

    Args:
        name: <p>Optional name to identify the resource.</p>
        video: <p>Video configuration. Default: video resolution 1280x720, bitrate 2500 kbps, 30 fps.</p>
        tags: <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>

    Raises:
        capo_ivs_realtime.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs_realtime.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_ivs_realtime.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_ivs_realtime.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
        capo_ivs_realtime.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_ivs_realtime.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_ivs_realtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs_realtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivs_realtime.types.create_encoder_configuration_request.CreateEncoderConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivs_realtime.types.create_encoder_configuration_response.CreateEncoderConfigurationResponse"
    ]:
        import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.create_encoder_configuration

        (
            output,
            http_response,
        ) = await capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.create_encoder_configuration.async_create_encoder_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateEncoderConfiguration")
    )
    input_: capo_ivs_realtime.types.create_encoder_configuration_request.CreateEncoderConfigurationRequest = {}
    if name is not None:
        input_["name"] = name
    if video is not None:
        input_["video"] = video
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output