Skip to content

create_router_network_interface async

create_router_network_interface(
    name: str,
    configuration: RouterNetworkInterfaceConfiguration,
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    region_name: Optional[str] = None,
    tags: Optional[__mapOfString] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateRouterNetworkInterfaceResponse

Creates a new router network interface in AWS Elemental MediaConnect.

Parameters:

  • name (str) –

    The name of the router network interface.

  • configuration (RouterNetworkInterfaceConfiguration) –

    The configuration settings for the router network interface.

  • region_name (Optional[str], default: None ) –

    The Amazon Web Services Region for the router network interface. Defaults to the current region if not specified.

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

    Key-value pairs that can be used to tag and organize this router network interface.

  • client_token (Optional[ClientToken], default: None ) –

    A unique identifier for the request to ensure idempotency.

Raises:

Source code in docs_src/capo_mediaconnect/_services/async_media_connect.py
async def create_router_network_interface(
    self,
    name: str,
    configuration: "capo_mediaconnect.types.router_network_interface_configuration.RouterNetworkInterfaceConfiguration",
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    region_name: Optional[str] = None,
    tags: Optional["capo_mediaconnect.types.__map_of_string.__mapOfString"] = None,
    client_token: Optional[
        "capo_mediaconnect.types.client_token.ClientToken"
    ] = None,
) -> "capo_mediaconnect.types.create_router_network_interface_response.CreateRouterNetworkInterfaceResponse":
    """<p>Creates a new router network interface in AWS Elemental MediaConnect.</p>

    Args:
        name: <p>The name of the router network interface.</p>
        configuration: <p>The configuration settings for the router network interface.</p>
        region_name: <p>The Amazon Web Services Region for the router network interface. Defaults to the current region if not specified.</p>
        tags: <p>Key-value pairs that can be used to tag and organize this router network interface.</p>
        client_token: <p>A unique identifier for the request to ensure idempotency.</p>

    Raises:
        capo_mediaconnect.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message. </p>
        capo_mediaconnect.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
        capo_mediaconnect.errors.forbidden_exception.ForbiddenException: <p>You do not have sufficient access to perform this action. </p>
        capo_mediaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>The server encountered an internal error and is unable to complete the request. </p>
        capo_mediaconnect.errors.router_network_interface_service_quota_exceeded_exception.RouterNetworkInterfaceServiceQuotaExceededException: <p>The request to create a new router network interface would exceed the service quotas (limits) set for the account. </p>
        capo_mediaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable or busy. </p>
        capo_mediaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was denied due to request throttling. </p>
        capo_mediaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediaconnect.types.create_router_network_interface_request.CreateRouterNetworkInterfaceRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconnect.types.create_router_network_interface_response.CreateRouterNetworkInterfaceResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.create_router_network_interface

        (
            output,
            http_response,
        ) = await capo_mediaconnect._operations.media_connect.create_router_network_interface.async_create_router_network_interface(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRouterNetworkInterface")
    )
    input_: capo_mediaconnect.types.create_router_network_interface_request.CreateRouterNetworkInterfaceRequest = {
        "name": name,
        "configuration": configuration,
    }
    if region_name is not None:
        input_["region_name"] = region_name
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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