Skip to content

update_gateway_capability_configuration async

update_gateway_capability_configuration(
    gateway_id: ID,
    capability_namespace: CapabilityNamespace,
    capability_configuration: CapabilityConfiguration,
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
) -> UpdateGatewayCapabilityConfigurationResponse

Updates a gateway capability configuration or defines a new capability configuration. Each gateway capability defines data sources for a gateway.

Important workflow notes:

Each gateway capability defines data sources for a gateway. This is the namespace of the gateway capability.

. The namespace follows the format service:capability:version, where:

  • service - The service providing the capability, or iotsitewise.

  • capability - The specific capability type. Options include: opcuacollector for the OPC UA data source collector, or publisher for data publisher capability.

  • version - The version number of the capability. Option include 2 for Classic streams, V2 gateways, and 3 for MQTT-enabled, V3 gateways.

After updating a capability configuration, the sync status becomes OUT_OF_SYNC until the gateway processes the configuration.Use DescribeGatewayCapabilityConfiguration to check the sync status and verify the configuration was applied.

A gateway can have multiple capability configurations with different namespaces.

Parameters:

  • gateway_id (ID) –

    The ID of the gateway to be updated.

  • capability_namespace (CapabilityNamespace) –

    The namespace of the gateway capability configuration to be updated. For example, if you configure OPC UA sources for an MQTT-enabled gateway, your OPC-UA capability configuration has the namespace iotsitewise:opcuacollector:3.

  • capability_configuration (CapabilityConfiguration) –

    The JSON document that defines the configuration for the gateway capability. For more information, see Configuring data sources (CLI) in the IoT SiteWise User Guide.

Raises:

  • ConflictingOperationException –

    Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

  • InternalFailureException –

    IoT SiteWise can't process your request right now. Try again later.

  • InvalidRequestException –

    The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

  • LimitExceededException –

    You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • ResourceNotFoundException –

    The requested resource can't be found.

  • ThrottlingException –

    Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
async def update_gateway_capability_configuration(
    self,
    gateway_id: "capo_iotsitewise.types.id.ID",
    capability_namespace: "capo_iotsitewise.types.capability_namespace.CapabilityNamespace",
    capability_configuration: "capo_iotsitewise.types.capability_configuration.CapabilityConfiguration",
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
) -> "capo_iotsitewise.types.update_gateway_capability_configuration_response.UpdateGatewayCapabilityConfigurationResponse":
    """<p>Updates a gateway capability configuration or defines a new capability configuration. Each gateway capability defines data sources for a gateway.</p> <p>Important workflow notes:</p> <p>Each gateway capability defines data sources for a gateway. This is the namespace of the gateway capability.</p> <p>. The namespace follows the format <code>service:capability:version</code>, where:</p> <ul> <li> <p> <code>service</code> - The service providing the capability, or <code>iotsitewise</code>.</p> </li> <li> <p> <code>capability</code> - The specific capability type. Options include: <code>opcuacollector</code> for the OPC UA data source collector, or <code>publisher</code> for data publisher capability.</p> </li> <li> <p> <code>version</code> - The version number of the capability. Option include <code>2</code> for Classic streams, V2 gateways, and <code>3</code> for MQTT-enabled, V3 gateways.</p> </li> </ul> <p>After updating a capability configuration, the sync status becomes <code>OUT_OF_SYNC</code> until the gateway processes the configuration.Use <code>DescribeGatewayCapabilityConfiguration</code> to check the sync status and verify the configuration was applied.</p> <p>A gateway can have multiple capability configurations with different namespaces.</p>

    Args:
        gateway_id: <p>The ID of the gateway to be updated.</p>
        capability_namespace: <p>The namespace of the gateway capability configuration to be updated. For example, if you configure OPC UA sources for an MQTT-enabled gateway, your OPC-UA capability configuration has the namespace <code>iotsitewise:opcuacollector:3</code>.</p>
        capability_configuration: <p>The JSON document that defines the configuration for the gateway capability. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/configure-sources.html#configure-source-cli">Configuring data sources (CLI)</a> in the <i>IoT SiteWise User Guide</i>.</p>

    Raises:
        capo_iotsitewise.errors.conflicting_operation_exception.ConflictingOperationException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
        capo_iotsitewise.errors.internal_failure_exception.InternalFailureException: <p>IoT SiteWise can't process your request right now. Try again later.</p>
        capo_iotsitewise.errors.invalid_request_exception.InvalidRequestException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.</p>
        capo_iotsitewise.errors.limit_exceeded_exception.LimitExceededException: <p>You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_iotsitewise.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotsitewise.types.update_gateway_capability_configuration_request.UpdateGatewayCapabilityConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotsitewise.types.update_gateway_capability_configuration_response.UpdateGatewayCapabilityConfigurationResponse"
    ]:
        import capo_iotsitewise._operations.aws_io_t_site_wise.update_gateway_capability_configuration

        (
            output,
            http_response,
        ) = await capo_iotsitewise._operations.aws_io_t_site_wise.update_gateway_capability_configuration.async_update_gateway_capability_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateGatewayCapabilityConfiguration")
    )
    input_: capo_iotsitewise.types.update_gateway_capability_configuration_request.UpdateGatewayCapabilityConfigurationRequest = {
        "gateway_id": gateway_id,
        "capability_namespace": capability_namespace,
        "capability_configuration": capability_configuration,
    }

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