Skip to content

update_managed_thing

update_managed_thing(
    identifier: ManagedThingId,
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    owner: Optional[Owner] = None,
    credential_locker_id: Optional[CredentialLockerId] = None,
    serial_number: Optional[SerialNumber] = None,
    wi_fi_simple_setup_configuration: Optional[WiFiSimpleSetupConfiguration] = None,
    brand: Optional[Brand] = None,
    model: Optional[Model] = None,
    name: Optional[Name] = None,
    capability_report: Optional[CapabilityReport] = None,
    capability_schemas: Optional[CapabilitySchemas] = None,
    capabilities: Optional[Capabilities] = None,
    classification: Optional[Classification] = None,
    hub_network_mode: Optional[HubNetworkMode] = None,
    meta_data: Optional[MetaData] = None,
) -> None

Update the attributes and capabilities associated with a managed thing.

Parameters:

  • identifier (ManagedThingId) –

    The id of the managed thing.

  • owner (Optional[Owner], default: None ) –

    Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.

  • credential_locker_id (Optional[CredentialLockerId], default: None ) –

    The identifier of the credential for the managed thing.

  • serial_number (Optional[SerialNumber], default: None ) –

    The serial number of the device.

  • wi_fi_simple_setup_configuration (Optional[WiFiSimpleSetupConfiguration], default: None ) –

    The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.

  • brand (Optional[Brand], default: None ) –

    The brand of the device.

  • model (Optional[Model], default: None ) –

    The model of the device.

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

    The name of the managed thing representing the physical device.

  • capability_report (Optional[CapabilityReport], default: None ) –

    A report of the capabilities for the managed thing.

  • capability_schemas (Optional[CapabilitySchemas], default: None ) –

    The updated capability schemas that define the functionality and features supported by the managed thing.

  • capabilities (Optional[Capabilities], default: None ) –

    The capabilities of the device such as light bulb.

  • classification (Optional[Classification], default: None ) –

    The classification of the managed thing such as light bulb or thermostat.

  • hub_network_mode (Optional[HubNetworkMode], default: None ) –

    The network mode for the hub-connected device.

  • meta_data (Optional[MetaData], default: None ) –

    The metadata for the managed thing.

Raises:

Source code in docs_src/capo_iot_managed_integrations/_services/io_t_managed_integrations.py
def update_managed_thing(
    self,
    identifier: "capo_iot_managed_integrations.types.managed_thing_id.ManagedThingId",
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    owner: Optional["capo_iot_managed_integrations.types.owner.Owner"] = None,
    credential_locker_id: Optional[
        "capo_iot_managed_integrations.types.credential_locker_id.CredentialLockerId"
    ] = None,
    serial_number: Optional[
        "capo_iot_managed_integrations.types.serial_number.SerialNumber"
    ] = None,
    wi_fi_simple_setup_configuration: Optional[
        "capo_iot_managed_integrations.types.wi_fi_simple_setup_configuration.WiFiSimpleSetupConfiguration"
    ] = None,
    brand: Optional["capo_iot_managed_integrations.types.brand.Brand"] = None,
    model: Optional["capo_iot_managed_integrations.types.model.Model"] = None,
    name: Optional["capo_iot_managed_integrations.types.name.Name"] = None,
    capability_report: Optional[
        "capo_iot_managed_integrations.types.capability_report.CapabilityReport"
    ] = None,
    capability_schemas: Optional[
        "capo_iot_managed_integrations.types.capability_schemas.CapabilitySchemas"
    ] = None,
    capabilities: Optional[
        "capo_iot_managed_integrations.types.capabilities.Capabilities"
    ] = None,
    classification: Optional[
        "capo_iot_managed_integrations.types.classification.Classification"
    ] = None,
    hub_network_mode: Optional[
        "capo_iot_managed_integrations.types.hub_network_mode.HubNetworkMode"
    ] = None,
    meta_data: Optional[
        "capo_iot_managed_integrations.types.meta_data.MetaData"
    ] = None,
) -> None:
    """<p>Update the attributes and capabilities associated with a managed thing.</p>

    Args:
        identifier: <p>The id of the managed thing.</p>
        owner: <p>Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.</p>
        credential_locker_id: <p>The identifier of the credential for the managed thing.</p>
        serial_number: <p>The serial number of the device.</p>
        wi_fi_simple_setup_configuration: <p>The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.</p>
        brand: <p>The brand of the device.</p>
        model: <p>The model of the device.</p>
        name: <p>The name of the managed thing representing the physical device.</p>
        capability_report: <p>A report of the capabilities for the managed thing.</p>
        capability_schemas: <p>The updated capability schemas that define the functionality and features supported by the managed thing.</p>
        capabilities: <p>The capabilities of the device such as light bulb.</p>
        classification: <p>The classification of the managed thing such as light bulb or thermostat.</p>
        hub_network_mode: <p>The network mode for the hub-connected device.</p>
        meta_data: <p>The metadata for the managed thing.</p>

    Raises:
        capo_iot_managed_integrations.errors.access_denied_exception.AccessDeniedException: <p>User is not authorized.</p>
        capo_iot_managed_integrations.errors.conflict_exception.ConflictException: <p>There is a conflict with the request.</p>
        capo_iot_managed_integrations.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot_managed_integrations.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot_managed_integrations.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot_managed_integrations.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot_managed_integrations.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot_managed_integrations.errors.validation_exception.ValidationException: <p>A validation error occurred when performing the API request.</p>
        capo_iot_managed_integrations.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot_managed_integrations.types.update_managed_thing_request.UpdateManagedThingRequest]",
    ) -> OperationResponse[None]:
        import capo_iot_managed_integrations._operations.iot_managed_integrations.update_managed_thing

        output, http_response = (
            capo_iot_managed_integrations._operations.iot_managed_integrations.update_managed_thing.update_managed_thing(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_iot_managed_integrations.types.update_managed_thing_request.UpdateManagedThingRequest",
    ) -> dict[str, Any]:
        import capo_iot_managed_integrations.types.update_managed_thing_request

        return capo_iot_managed_integrations.types.update_managed_thing_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateManagedThing", redact_input=_redact_input),
    )
    input_: capo_iot_managed_integrations.types.update_managed_thing_request.UpdateManagedThingRequest = {
        "identifier": identifier
    }
    if owner is not None:
        input_["owner"] = owner
    if credential_locker_id is not None:
        input_["credential_locker_id"] = credential_locker_id
    if serial_number is not None:
        input_["serial_number"] = serial_number
    if wi_fi_simple_setup_configuration is not None:
        input_["wi_fi_simple_setup_configuration"] = (
            wi_fi_simple_setup_configuration
        )
    if brand is not None:
        input_["brand"] = brand
    if model is not None:
        input_["model"] = model
    if name is not None:
        input_["name"] = name
    if capability_report is not None:
        input_["capability_report"] = capability_report
    if capability_schemas is not None:
        input_["capability_schemas"] = capability_schemas
    if capabilities is not None:
        input_["capabilities"] = capabilities
    if classification is not None:
        input_["classification"] = classification
    if hub_network_mode is not None:
        input_["hub_network_mode"] = hub_network_mode
    if meta_data is not None:
        input_["meta_data"] = meta_data

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