Skip to content

get_device_profile async

get_device_profile(
    id: DeviceProfileId,
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
) -> GetDeviceProfileResponse

Gets information about a device profile.

Parameters:

Raises:

Source code in docs_src/capo_iot_wireless/_services/async_io_t_wireless.py
async def get_device_profile(
    self,
    id: "capo_iot_wireless.types.device_profile_id.DeviceProfileId",
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
) -> "capo_iot_wireless.types.get_device_profile_response.GetDeviceProfileResponse":
    """<p>Gets information about a device profile.</p>

    Args:
        id: <p>The ID of the resource to get.</p>

    Raises:
        capo_iot_wireless.errors.access_denied_exception.AccessDeniedException: <p>User does not have permission to perform this action.</p>
        capo_iot_wireless.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request.</p>
        capo_iot_wireless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource does not exist.</p>
        capo_iot_wireless.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed API request rate.</p>
        capo_iot_wireless.errors.validation_exception.ValidationException: <p>The input did not meet the specified constraints.</p>
        capo_iot_wireless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_wireless.types.get_device_profile_request.GetDeviceProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_wireless.types.get_device_profile_response.GetDeviceProfileResponse"
    ]:
        import capo_iot_wireless._operations.iotwireless.get_device_profile

        (
            output,
            http_response,
        ) = await capo_iot_wireless._operations.iotwireless.get_device_profile.async_get_device_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_iot_wireless.types.get_device_profile_response.GetDeviceProfileResponse",
    ) -> dict[str, Any]:
        import capo_iot_wireless.types.get_device_profile_response

        return capo_iot_wireless.types.get_device_profile_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetDeviceProfile", redact_output=_redact_output),
    )
    input_: capo_iot_wireless.types.get_device_profile_request.GetDeviceProfileRequest = {
        "id": id
    }

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