A network client for interacting with the GreengrassCoreIPC service using the eventstream RPC protocol.

Provides communication between Greengrass core and customer component

Hierarchy

  • EventEmitter
    • Client

Constructors

  • Constructor for a GreengrassCoreIPC service client.

    Parameters

    Returns Client

Methods

  • Performs a CancelLocalDeployment operation.

    Cancel a local deployment on the device.

    Parameters

    Returns Promise<CancelLocalDeploymentResponse>

    a Promise that is resolved with the CancelLocalDeployment operation's result, or rejected with an RpcError

  • Shuts down the client and begins the process of releasing all native resources associated with the client as well as any unclosed operations. It is critical that this function be called when finished with the client; otherwise, native resources will leak.

    The client tracks unclosed operations and, as part of this process, closes them as well.

    Once a client has been closed, it may no longer be used.

    Returns Promise<void>

  • Attempts to open an eventstream connection to the configured remote endpoint. Returned promise will be fulfilled if the transport-level connection is successfully established and the eventstream handshake completes without error.

    connect() may only be called once.

    Returns Promise<void>

  • Performs a CreateDebugPassword operation.

    Generate a password for the LocalDebugConsole component

    Parameters

    Returns Promise<CreateDebugPasswordResponse>

    a Promise that is resolved with the CreateDebugPassword operation's result, or rejected with an RpcError

  • Performs a CreateLocalDeployment operation.

    Creates a local deployment on the device. Also allows to remove existing components.

    Parameters

    Returns Promise<CreateLocalDeploymentResponse>

    a Promise that is resolved with the CreateLocalDeployment operation's result, or rejected with an RpcError

  • Performs a DeferComponentUpdate operation.

    Defer the update of components by a given amount of time and check again after that.

    Parameters

    Returns Promise<DeferComponentUpdateResponse>

    a Promise that is resolved with the DeferComponentUpdate operation's result, or rejected with an RpcError

  • Performs a DeleteThingShadow operation.

    Deletes a device shadow document stored in the local shadow service

    Parameters

    Returns Promise<DeleteThingShadowResponse>

    a Promise that is resolved with the DeleteThingShadow operation's result, or rejected with an RpcError

  • Performs a GetClientDeviceAuthToken operation.

    Get session token for a client device

    Parameters

    Returns Promise<GetClientDeviceAuthTokenResponse>

    a Promise that is resolved with the GetClientDeviceAuthToken operation's result, or rejected with an RpcError

  • Performs a GetComponentDetails operation.

    Gets the status and version of the component with the given component name

    Parameters

    Returns Promise<GetComponentDetailsResponse>

    a Promise that is resolved with the GetComponentDetails operation's result, or rejected with an RpcError

  • Performs a GetConfiguration operation.

    Get value of a given key from the configuration

    Parameters

    • request: GetConfigurationRequest

      data describing the GetConfiguration operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<GetConfigurationResponse>

    a Promise that is resolved with the GetConfiguration operation's result, or rejected with an RpcError

  • Performs a GetLocalDeploymentStatus operation.

    Get status of a local deployment with the given deploymentId

    Parameters

    Returns Promise<GetLocalDeploymentStatusResponse>

    a Promise that is resolved with the GetLocalDeploymentStatus operation's result, or rejected with an RpcError

  • Performs a GetSecretValue operation.

    Retrieves a secret stored in AWS secrets manager

    Parameters

    • request: GetSecretValueRequest

      data describing the GetSecretValue operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<GetSecretValueResponse>

    a Promise that is resolved with the GetSecretValue operation's result, or rejected with an RpcError

  • Performs a GetThingShadow operation.

    Retrieves a device shadow document stored by the local shadow service

    Parameters

    • request: GetThingShadowRequest

      data describing the GetThingShadow operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<GetThingShadowResponse>

    a Promise that is resolved with the GetThingShadow operation's result, or rejected with an RpcError

  • Performs a ListComponents operation.

    Request for a list of components

    Parameters

    • request: ListComponentsRequest

      data describing the ListComponents operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<ListComponentsResponse>

    a Promise that is resolved with the ListComponents operation's result, or rejected with an RpcError

  • Performs a ListLocalDeployments operation.

    Lists the last 5 local deployments along with their statuses

    Parameters

    Returns Promise<ListLocalDeploymentsResponse>

    a Promise that is resolved with the ListLocalDeployments operation's result, or rejected with an RpcError

  • Performs a ListNamedShadowsForThing operation.

    Lists the named shadows for the specified thing

    Parameters

    Returns Promise<ListNamedShadowsForThingResponse>

    a Promise that is resolved with the ListNamedShadowsForThing operation's result, or rejected with an RpcError

  • Performs a PauseComponent operation.

    Pause a running component

    Parameters

    • request: PauseComponentRequest

      data describing the PauseComponent operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<PauseComponentResponse>

    a Promise that is resolved with the PauseComponent operation's result, or rejected with an RpcError

  • Performs a PublishToIoTCore operation.

    Publish an MQTT message to AWS IoT message broker

    Parameters

    • request: PublishToIoTCoreRequest

      data describing the PublishToIoTCore operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<PublishToIoTCoreResponse>

    a Promise that is resolved with the PublishToIoTCore operation's result, or rejected with an RpcError

  • Performs a PublishToTopic operation.

    Publish to a custom topic.

    Parameters

    • request: PublishToTopicRequest

      data describing the PublishToTopic operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<PublishToTopicResponse>

    a Promise that is resolved with the PublishToTopic operation's result, or rejected with an RpcError

  • Performs a PutComponentMetric operation.

    Send component metrics NOTE Only usable by AWS components

    Parameters

    Returns Promise<PutComponentMetricResponse>

    a Promise that is resolved with the PutComponentMetric operation's result, or rejected with an RpcError

  • Performs a RestartComponent operation.

    Restarts a component with the given name

    Parameters

    • request: RestartComponentRequest

      data describing the RestartComponent operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<RestartComponentResponse>

    a Promise that is resolved with the RestartComponent operation's result, or rejected with an RpcError

  • Performs a ResumeComponent operation.

    Resume a paused component

    Parameters

    • request: ResumeComponentRequest

      data describing the ResumeComponent operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<ResumeComponentResponse>

    a Promise that is resolved with the ResumeComponent operation's result, or rejected with an RpcError

  • Performs a SendConfigurationValidityReport operation.

    This operation should be used in response to event received as part of SubscribeToValidateConfigurationUpdates subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates

    Parameters

    Returns Promise<SendConfigurationValidityReportResponse>

    a Promise that is resolved with the SendConfigurationValidityReport operation's result, or rejected with an RpcError

  • Performs a StopComponent operation.

    Stops a component with the given name

    Parameters

    • request: StopComponentRequest

      data describing the StopComponent operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<StopComponentResponse>

    a Promise that is resolved with the StopComponent operation's result, or rejected with an RpcError

  • Creates a SubscribeToIoTCore streaming operation.

    Subscribe to a topic in AWS IoT message broker.

    Once created, the streaming operation must be started by a call to activate().

    If the operation allows for streaming input, the user may attach event listeners to receive messages.

    If the operation allows for streaming output, the user may call sendProtocolMessage() to send messages on the operation's event stream once the operation has been activated.

    The user should close() a streaming operation once finished with it. If close() is not called, the native resources associated with the streaming operation will not be freed until the client is closed.

    Parameters

    • request: SubscribeToIoTCoreRequest

      data describing the SubscribeToIoTCore streaming operation to create

    • Optional options: OperationOptions

      additional eventstream options to use while this operation is active

    Returns StreamingOperation<SubscribeToIoTCoreRequest, SubscribeToIoTCoreResponse, void, IoTCoreMessage>

    a new StreamingOperation object

  • Creates a SubscribeToTopic streaming operation.

    Creates a subscription for a custom topic

    Once created, the streaming operation must be started by a call to activate().

    If the operation allows for streaming input, the user may attach event listeners to receive messages.

    If the operation allows for streaming output, the user may call sendProtocolMessage() to send messages on the operation's event stream once the operation has been activated.

    The user should close() a streaming operation once finished with it. If close() is not called, the native resources associated with the streaming operation will not be freed until the client is closed.

    Parameters

    • request: SubscribeToTopicRequest

      data describing the SubscribeToTopic streaming operation to create

    • Optional options: OperationOptions

      additional eventstream options to use while this operation is active

    Returns StreamingOperation<SubscribeToTopicRequest, SubscribeToTopicResponse, void, SubscriptionResponseMessage>

    a new StreamingOperation object

  • Performs a UpdateConfiguration operation.

    Update this component's configuration by replacing the value of given keyName with the newValue. If an oldValue is specified then update will only take effect id the current value matches the given oldValue

    Parameters

    Returns Promise<UpdateConfigurationResponse>

    a Promise that is resolved with the UpdateConfiguration operation's result, or rejected with an RpcError

  • Performs a UpdateState operation.

    Update status of this component

    Parameters

    • request: UpdateStateRequest

      data describing the UpdateState operation to perform

    • Optional options: OperationOptions

      additional eventstream options to use while performing this operation

    Returns Promise<UpdateStateResponse>

    a Promise that is resolved with the UpdateState operation's result, or rejected with an RpcError

  • Performs a UpdateThingShadow operation.

    Updates a device shadow document stored in the local shadow service The update is an upsert operation, with optimistic locking support

    Parameters

    Returns Promise<UpdateThingShadowResponse>

    a Promise that is resolved with the UpdateThingShadow operation's result, or rejected with an RpcError

  • Performs a ValidateAuthorizationToken operation.

    Validate authorization token NOTE This API can be used only by stream manager, customer component calling this API will receive UnauthorizedError

    Parameters

    Returns Promise<ValidateAuthorizationTokenResponse>

    a Promise that is resolved with the ValidateAuthorizationToken operation's result, or rejected with an RpcError

Events

DISCONNECTION: string = 'disconnection'

Event emitted when the client's underlying network connection is ended. Only emitted if the connection was previously successfully established.

Listener type: DisconnectionListener

Generated using TypeDoc