Skip to content

create_network_profile async

create_network_profile(
    project_arn: AmazonResourceName,
    name: Name,
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    description: Optional[Message] = None,
    type: Optional[NetworkProfileType] = None,
    uplink_bandwidth_bits: Optional[Long] = None,
    downlink_bandwidth_bits: Optional[Long] = None,
    uplink_delay_ms: Optional[Long] = None,
    downlink_delay_ms: Optional[Long] = None,
    uplink_jitter_ms: Optional[Long] = None,
    downlink_jitter_ms: Optional[Long] = None,
    uplink_loss_percent: Optional[PercentInteger] = None,
    downlink_loss_percent: Optional[PercentInteger] = None,
) -> CreateNetworkProfileResult

Creates a network profile.

Parameters:

  • project_arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the project for which you want to create a network profile.

  • name (Name) –

    The name for the new network profile.

  • description (Optional[Message], default: None ) –

    The description of the network profile.

  • type (Optional[NetworkProfileType], default: None ) –

    The type of network profile to create. Valid values are listed here.

  • uplink_bandwidth_bits (Optional[Long], default: None ) –

    The data throughput rate in bits per second, as an integer from 0 to 104857600.

  • downlink_bandwidth_bits (Optional[Long], default: None ) –

    The data throughput rate in bits per second, as an integer from 0 to 104857600.

  • uplink_delay_ms (Optional[Long], default: None ) –

    Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.

  • downlink_delay_ms (Optional[Long], default: None ) –

    Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.

  • uplink_jitter_ms (Optional[Long], default: None ) –

    Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.

  • downlink_jitter_ms (Optional[Long], default: None ) –

    Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.

  • uplink_loss_percent (Optional[PercentInteger], default: None ) –

    Proportion of transmitted packets that fail to arrive from 0 to 100 percent.

  • downlink_loss_percent (Optional[PercentInteger], default: None ) –

    Proportion of received packets that fail to arrive from 0 to 100 percent.

Raises:

Source code in docs_src/capo_device_farm/_services/async_device_farm.py
async def create_network_profile(
    self,
    project_arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    name: "capo_device_farm.types.name.Name",
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    description: Optional["capo_device_farm.types.message.Message"] = None,
    type: Optional[
        "capo_device_farm.types.network_profile_type.NetworkProfileType"
    ] = None,
    uplink_bandwidth_bits: Optional["capo_device_farm.types.long.Long"] = None,
    downlink_bandwidth_bits: Optional["capo_device_farm.types.long.Long"] = None,
    uplink_delay_ms: Optional["capo_device_farm.types.long.Long"] = None,
    downlink_delay_ms: Optional["capo_device_farm.types.long.Long"] = None,
    uplink_jitter_ms: Optional["capo_device_farm.types.long.Long"] = None,
    downlink_jitter_ms: Optional["capo_device_farm.types.long.Long"] = None,
    uplink_loss_percent: Optional[
        "capo_device_farm.types.percent_integer.PercentInteger"
    ] = None,
    downlink_loss_percent: Optional[
        "capo_device_farm.types.percent_integer.PercentInteger"
    ] = None,
) -> "capo_device_farm.types.create_network_profile_result.CreateNetworkProfileResult":
    """<p>Creates a network profile.</p>

    Args:
        project_arn: <p>The Amazon Resource Name (ARN) of the project for which you want to create a network profile.</p>
        name: <p>The name for the new network profile.</p>
        description: <p>The description of the network profile.</p>
        type: <p>The type of network profile to create. Valid values are listed here.</p>
        uplink_bandwidth_bits: <p>The data throughput rate in bits per second, as an integer from 0 to 104857600.</p>
        downlink_bandwidth_bits: <p>The data throughput rate in bits per second, as an integer from 0 to 104857600.</p>
        uplink_delay_ms: <p>Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.</p>
        downlink_delay_ms: <p>Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.</p>
        uplink_jitter_ms: <p>Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.</p>
        downlink_jitter_ms: <p>Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.</p>
        uplink_loss_percent: <p>Proportion of transmitted packets that fail to arrive from 0 to 100 percent.</p>
        downlink_loss_percent: <p>Proportion of received packets that fail to arrive from 0 to 100 percent.</p>

    Raises:
        capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
        capo_device_farm.errors.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</p>
        capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
        capo_device_farm.errors.service_account_exception.ServiceAccountException: <p>There was a problem with the service account.</p>
        capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_device_farm.types.create_network_profile_request.CreateNetworkProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_device_farm.types.create_network_profile_result.CreateNetworkProfileResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.create_network_profile

        (
            output,
            http_response,
        ) = await capo_device_farm._operations.device_farm_20150623.create_network_profile.async_create_network_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateNetworkProfile")
    )
    input_: capo_device_farm.types.create_network_profile_request.CreateNetworkProfileRequest = {
        "project_arn": project_arn,
        "name": name,
    }
    if description is not None:
        input_["description"] = description
    if type is not None:
        input_["type"] = type
    if uplink_bandwidth_bits is not None:
        input_["uplink_bandwidth_bits"] = uplink_bandwidth_bits
    if downlink_bandwidth_bits is not None:
        input_["downlink_bandwidth_bits"] = downlink_bandwidth_bits
    if uplink_delay_ms is not None:
        input_["uplink_delay_ms"] = uplink_delay_ms
    if downlink_delay_ms is not None:
        input_["downlink_delay_ms"] = downlink_delay_ms
    if uplink_jitter_ms is not None:
        input_["uplink_jitter_ms"] = uplink_jitter_ms
    if downlink_jitter_ms is not None:
        input_["downlink_jitter_ms"] = downlink_jitter_ms
    if uplink_loss_percent is not None:
        input_["uplink_loss_percent"] = uplink_loss_percent
    if downlink_loss_percent is not None:
        input_["downlink_loss_percent"] = downlink_loss_percent

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