Class: Aws::IoTThingsGraph::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::IoTThingsGraph::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-iotthingsgraph/client.rb
Overview
An API client for IoTThingsGraph. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::IoTThingsGraph::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#associate_entity_to_thing(params = {}) ⇒ Struct
Associates a device with a concrete thing that is in the user’s registry.
-
#create_flow_template(params = {}) ⇒ Types::CreateFlowTemplateResponse
Creates a workflow template.
-
#create_system_instance(params = {}) ⇒ Types::CreateSystemInstanceResponse
Creates a system instance.
-
#create_system_template(params = {}) ⇒ Types::CreateSystemTemplateResponse
Creates a system.
-
#delete_flow_template(params = {}) ⇒ Struct
Deletes a workflow.
-
#delete_namespace(params = {}) ⇒ Types::DeleteNamespaceResponse
Deletes the specified namespace.
-
#delete_system_instance(params = {}) ⇒ Struct
Deletes a system instance.
-
#delete_system_template(params = {}) ⇒ Struct
Deletes a system.
-
#deploy_system_instance(params = {}) ⇒ Types::DeploySystemInstanceResponse
**Greengrass and Cloud Deployments**.
-
#deprecate_flow_template(params = {}) ⇒ Struct
Deprecates the specified workflow.
-
#deprecate_system_template(params = {}) ⇒ Struct
Deprecates the specified system.
-
#describe_namespace(params = {}) ⇒ Types::DescribeNamespaceResponse
Gets the latest version of the user’s namespace and the public version that it is tracking.
-
#dissociate_entity_from_thing(params = {}) ⇒ Struct
Dissociates a device entity from a concrete thing.
-
#get_entities(params = {}) ⇒ Types::GetEntitiesResponse
Gets definitions of the specified entities.
-
#get_flow_template(params = {}) ⇒ Types::GetFlowTemplateResponse
Gets the latest version of the ‘DefinitionDocument` and `FlowTemplateSummary` for the specified workflow.
-
#get_flow_template_revisions(params = {}) ⇒ Types::GetFlowTemplateRevisionsResponse
Gets revisions of the specified workflow.
-
#get_namespace_deletion_status(params = {}) ⇒ Types::GetNamespaceDeletionStatusResponse
Gets the status of a namespace deletion task.
-
#get_system_instance(params = {}) ⇒ Types::GetSystemInstanceResponse
Gets a system instance.
-
#get_system_template(params = {}) ⇒ Types::GetSystemTemplateResponse
Gets a system.
-
#get_system_template_revisions(params = {}) ⇒ Types::GetSystemTemplateRevisionsResponse
Gets revisions made to the specified system template.
-
#get_upload_status(params = {}) ⇒ Types::GetUploadStatusResponse
Gets the status of the specified upload.
-
#list_flow_execution_messages(params = {}) ⇒ Types::ListFlowExecutionMessagesResponse
Returns a list of objects that contain information about events in a flow execution.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists all tags on an AWS IoT Things Graph resource.
-
#search_entities(params = {}) ⇒ Types::SearchEntitiesResponse
Searches for entities of the specified type.
-
#search_flow_executions(params = {}) ⇒ Types::SearchFlowExecutionsResponse
Searches for AWS IoT Things Graph workflow execution instances.
-
#search_flow_templates(params = {}) ⇒ Types::SearchFlowTemplatesResponse
Searches for summary information about workflows.
-
#search_system_instances(params = {}) ⇒ Types::SearchSystemInstancesResponse
Searches for system instances in the user’s account.
-
#search_system_templates(params = {}) ⇒ Types::SearchSystemTemplatesResponse
Searches for summary information about systems in the user’s account.
-
#search_things(params = {}) ⇒ Types::SearchThingsResponse
Searches for things associated with the specified entity.
-
#tag_resource(params = {}) ⇒ Struct
Creates a tag for the specified resource.
-
#undeploy_system_instance(params = {}) ⇒ Types::UndeploySystemInstanceResponse
Removes a system instance from its target (Cloud or Greengrass).
-
#untag_resource(params = {}) ⇒ Struct
Removes a tag from the specified resource.
-
#update_flow_template(params = {}) ⇒ Types::UpdateFlowTemplateResponse
Updates the specified workflow.
-
#update_system_template(params = {}) ⇒ Types::UpdateSystemTemplateResponse
Updates the specified system.
-
#upload_entity_definitions(params = {}) ⇒ Types::UploadEntityDefinitionsResponse
Asynchronously uploads one or more entity definitions to the user’s namespace.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
451 452 453 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 451 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2036 2037 2038 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2036 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2039 2040 2041 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2039 def errors_module Errors end |
Instance Method Details
#associate_entity_to_thing(params = {}) ⇒ Struct
Associates a device with a concrete thing that is in the user’s registry.
A thing can be associated with only one device at a time. If you associate a thing with a new device id, its previous association will be removed.
490 491 492 493 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 490 def associate_entity_to_thing(params = {}, = {}) req = build_request(:associate_entity_to_thing, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2009 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::IoTThingsGraph') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-iotthingsgraph' context[:gem_version] = '1.50.0' Seahorse::Client::Request.new(handlers, context) end |
#create_flow_template(params = {}) ⇒ Types::CreateFlowTemplateResponse
Creates a workflow template. Workflows can be created only in the user’s namespace. (The public namespace contains only entities.) The workflow can contain only entities in the specified namespace. The workflow is validated against the entities in the latest version of the user’s namespace unless another namespace version is specified in the request.
533 534 535 536 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 533 def create_flow_template(params = {}, = {}) req = build_request(:create_flow_template, params) req.send_request() end |
#create_system_instance(params = {}) ⇒ Types::CreateSystemInstanceResponse
Creates a system instance.
This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is specified by the ‘greengrassGroupName` parameter. It also adds a file to the S3 bucket specified by the `s3BucketName` parameter. You need to call `DeploySystemInstance` after running this action.
For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller’s behalf, the calling identity must have write permissions to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error.
For cloud deployments, this action requires a ‘flowActionsRoleArn` value. This is an IAM role that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes.
If the definition document doesn’t specify a version of the user’s namespace, the latest version will be used by default.
634 635 636 637 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 634 def create_system_instance(params = {}, = {}) req = build_request(:create_system_instance, params) req.send_request() end |
#create_system_template(params = {}) ⇒ Types::CreateSystemTemplateResponse
Creates a system. The system is validated against the entities in the latest version of the user’s namespace unless another namespace version is specified in the request.
674 675 676 677 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 674 def create_system_template(params = {}, = {}) req = build_request(:create_system_template, params) req.send_request() end |
#delete_flow_template(params = {}) ⇒ Struct
Deletes a workflow. Any new system or deployment that contains this workflow will fail to update or deploy. Existing deployments that contain the workflow will continue to run (since they use a snapshot of the workflow taken at the time of deployment).
701 702 703 704 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 701 def delete_flow_template(params = {}, = {}) req = build_request(:delete_flow_template, params) req.send_request() end |
#delete_namespace(params = {}) ⇒ Types::DeleteNamespaceResponse
Deletes the specified namespace. This action deletes all of the entities in the namespace. Delete the systems and flows that use entities in the namespace before performing this action. This action takes no request parameters.
723 724 725 726 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 723 def delete_namespace(params = {}, = {}) req = build_request(:delete_namespace, params) req.send_request() end |
#delete_system_instance(params = {}) ⇒ Struct
Deletes a system instance. Only system instances that have never been deployed, or that have been undeployed can be deleted.
Users can create a new system instance that has the same ID as a deleted system instance.
747 748 749 750 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 747 def delete_system_instance(params = {}, = {}) req = build_request(:delete_system_instance, params) req.send_request() end |
#delete_system_template(params = {}) ⇒ Struct
Deletes a system. New deployments can’t contain the system after its deletion. Existing deployments that contain the system will continue to work because they use a snapshot of the system that is taken when it is deployed.
774 775 776 777 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 774 def delete_system_template(params = {}, = {}) req = build_request(:delete_system_template, params) req.send_request() end |
#deploy_system_instance(params = {}) ⇒ Types::DeploySystemInstanceResponse
**Greengrass and Cloud Deployments**
Deploys the system instance to the target specified in ‘CreateSystemInstance`.
**Greengrass Deployments**
If the system or any workflows and entities have been updated before this action is called, then the deployment will create a new Amazon Simple Storage Service resource file and then deploy it.
Since this action creates a Greengrass deployment on the caller’s behalf, the calling identity must have write permissions to the specified Greengrass group. Otherwise, the call will fail with an authorization error.
For information about the artifacts that get added to your Greengrass core device when you use this API, see [AWS IoT Things Graph and AWS IoT Greengrass].
[1]: docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-greengrass.html
837 838 839 840 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 837 def deploy_system_instance(params = {}, = {}) req = build_request(:deploy_system_instance, params) req.send_request() end |
#deprecate_flow_template(params = {}) ⇒ Struct
Deprecates the specified workflow. This action marks the workflow for deletion. Deprecated flows can’t be deployed, but existing deployments will continue to run.
863 864 865 866 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 863 def deprecate_flow_template(params = {}, = {}) req = build_request(:deprecate_flow_template, params) req.send_request() end |
#deprecate_system_template(params = {}) ⇒ Struct
Deprecates the specified system.
887 888 889 890 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 887 def deprecate_system_template(params = {}, = {}) req = build_request(:deprecate_system_template, params) req.send_request() end |
#describe_namespace(params = {}) ⇒ Types::DescribeNamespaceResponse
Gets the latest version of the user’s namespace and the public version that it is tracking.
923 924 925 926 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 923 def describe_namespace(params = {}, = {}) req = build_request(:describe_namespace, params) req.send_request() end |
#dissociate_entity_from_thing(params = {}) ⇒ Struct
Dissociates a device entity from a concrete thing. The action takes only the type of the entity that you need to dissociate because only one entity of a particular type can be associated with a thing.
949 950 951 952 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 949 def dissociate_entity_from_thing(params = {}, = {}) req = build_request(:dissociate_entity_from_thing, params) req.send_request() end |
#get_entities(params = {}) ⇒ Types::GetEntitiesResponse
Gets definitions of the specified entities. Uses the latest version of the user’s namespace by default. This API returns the following TDM entities.
-
Properties
-
States
-
Events
-
Actions
-
Capabilities
-
Mappings
-
Devices
-
Device Models
-
Services
This action doesn’t return definitions for systems, flows, and deployments.
1013 1014 1015 1016 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1013 def get_entities(params = {}, = {}) req = build_request(:get_entities, params) req.send_request() end |
#get_flow_template(params = {}) ⇒ Types::GetFlowTemplateResponse
Gets the latest version of the ‘DefinitionDocument` and `FlowTemplateSummary` for the specified workflow.
1054 1055 1056 1057 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1054 def get_flow_template(params = {}, = {}) req = build_request(:get_flow_template, params) req.send_request() end |
#get_flow_template_revisions(params = {}) ⇒ Types::GetFlowTemplateRevisionsResponse
Gets revisions of the specified workflow. Only the last 100 revisions are stored. If the workflow has been deprecated, this action will return revisions that occurred before the deprecation. This action won’t work for workflows that have been deleted.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1104 1105 1106 1107 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1104 def get_flow_template_revisions(params = {}, = {}) req = build_request(:get_flow_template_revisions, params) req.send_request() end |
#get_namespace_deletion_status(params = {}) ⇒ Types::GetNamespaceDeletionStatusResponse
Gets the status of a namespace deletion task.
1129 1130 1131 1132 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1129 def get_namespace_deletion_status(params = {}, = {}) req = build_request(:get_namespace_deletion_status, params) req.send_request() end |
#get_system_instance(params = {}) ⇒ Types::GetSystemInstanceResponse
Gets a system instance.
1178 1179 1180 1181 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1178 def get_system_instance(params = {}, = {}) req = build_request(:get_system_instance, params) req.send_request() end |
#get_system_template(params = {}) ⇒ Types::GetSystemTemplateResponse
Gets a system.
1218 1219 1220 1221 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1218 def get_system_template(params = {}, = {}) req = build_request(:get_system_template, params) req.send_request() end |
#get_system_template_revisions(params = {}) ⇒ Types::GetSystemTemplateRevisionsResponse
Gets revisions made to the specified system template. Only the previous 100 revisions are stored. If the system has been deprecated, this action will return the revisions that occurred before its deprecation. This action won’t work with systems that have been deleted.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1269 1270 1271 1272 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1269 def get_system_template_revisions(params = {}, = {}) req = build_request(:get_system_template_revisions, params) req.send_request() end |
#get_upload_status(params = {}) ⇒ Types::GetUploadStatusResponse
Gets the status of the specified upload.
1309 1310 1311 1312 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1309 def get_upload_status(params = {}, = {}) req = build_request(:get_upload_status, params) req.send_request() end |
#list_flow_execution_messages(params = {}) ⇒ Types::ListFlowExecutionMessagesResponse
Returns a list of objects that contain information about events in a flow execution.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1353 1354 1355 1356 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1353 def (params = {}, = {}) req = build_request(:list_flow_execution_messages, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists all tags on an AWS IoT Things Graph resource.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1394 1395 1396 1397 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1394 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#search_entities(params = {}) ⇒ Types::SearchEntitiesResponse
Searches for entities of the specified type. You can search for entities in your namespace and the public namespace that you’re tracking.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1462 1463 1464 1465 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1462 def search_entities(params = {}, = {}) req = build_request(:search_entities, params) req.send_request() end |
#search_flow_executions(params = {}) ⇒ Types::SearchFlowExecutionsResponse
Searches for AWS IoT Things Graph workflow execution instances.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1519 1520 1521 1522 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1519 def search_flow_executions(params = {}, = {}) req = build_request(:search_flow_executions, params) req.send_request() end |
#search_flow_templates(params = {}) ⇒ Types::SearchFlowTemplatesResponse
Searches for summary information about workflows.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1568 1569 1570 1571 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1568 def search_flow_templates(params = {}, = {}) req = build_request(:search_flow_templates, params) req.send_request() end |
#search_system_instances(params = {}) ⇒ Types::SearchSystemInstancesResponse
Searches for system instances in the user’s account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1625 1626 1627 1628 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1625 def search_system_instances(params = {}, = {}) req = build_request(:search_system_instances, params) req.send_request() end |
#search_system_templates(params = {}) ⇒ Types::SearchSystemTemplatesResponse
Searches for summary information about systems in the user’s account. You can filter by the ID of a workflow to return only systems that use the specified workflow.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1676 1677 1678 1679 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1676 def search_system_templates(params = {}, = {}) req = build_request(:search_system_templates, params) req.send_request() end |
#search_things(params = {}) ⇒ Types::SearchThingsResponse
Searches for things associated with the specified entity. You can search by both device and device model.
For example, if two different devices, camera1 and camera2, implement the camera device model, the user can associate thing1 to camera1 and thing2 to camera2. ‘SearchThings(camera2)` will return only thing2, but `SearchThings(camera)` will return both thing1 and thing2.
This action searches for exact matches and doesn’t perform partial text matching.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1735 1736 1737 1738 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1735 def search_things(params = {}, = {}) req = build_request(:search_things, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Creates a tag for the specified resource.
1765 1766 1767 1768 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1765 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#undeploy_system_instance(params = {}) ⇒ Types::UndeploySystemInstanceResponse
Removes a system instance from its target (Cloud or Greengrass).
1799 1800 1801 1802 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1799 def undeploy_system_instance(params = {}, = {}) req = build_request(:undeploy_system_instance, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes a tag from the specified resource.
1834 1835 1836 1837 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1834 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_flow_template(params = {}) ⇒ Types::UpdateFlowTemplateResponse
Updates the specified workflow. All deployed systems and system instances that use the workflow will see the changes in the flow when it is redeployed. If you don’t want this behavior, copy the workflow (creating a new workflow with a different ID), and update the copy. The workflow can contain only entities in the specified namespace.
1887 1888 1889 1890 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1887 def update_flow_template(params = {}, = {}) req = build_request(:update_flow_template, params) req.send_request() end |
#update_system_template(params = {}) ⇒ Types::UpdateSystemTemplateResponse
Updates the specified system. You don’t need to run this action after updating a workflow. Any deployment that uses the system will see the changes in the system when it is redeployed.
1936 1937 1938 1939 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1936 def update_system_template(params = {}, = {}) req = build_request(:update_system_template, params) req.send_request() end |
#upload_entity_definitions(params = {}) ⇒ Types::UploadEntityDefinitionsResponse
Asynchronously uploads one or more entity definitions to the user’s namespace. The ‘document` parameter is required if `syncWithPublicNamespace` and `deleteExistingEntites` are false. If the `syncWithPublicNamespace` parameter is set to `true`, the user’s namespace will synchronize with the latest version of the public namespace. If ‘deprecateExistingEntities` is set to true, all entities in the latest version will be deleted before the new `DefinitionDocument` is uploaded.
When a user uploads entity definitions for the first time, the service creates a new namespace for the user. The new namespace tracks the public namespace. Currently users can have only one namespace. The namespace version increments whenever a user uploads entity definitions that are backwards-incompatible and whenever a user sets the ‘syncWithPublicNamespace` parameter or the `deprecateExistingEntities` parameter to `true`.
The IDs for all of the entities should be in URN format. Each entity must be in the user’s namespace. Users can’t create entities in the public namespace, but entity definitions can refer to entities in the public namespace.
Valid entities are ‘Device`, `DeviceModel`, `Service`, `Capability`, `State`, `Action`, `Event`, `Property`, `Mapping`, `Enum`.
2000 2001 2002 2003 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2000 def upload_entity_definitions(params = {}, = {}) req = build_request(:upload_entity_definitions, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2029 2030 2031 |
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2029 def waiter_names [] end |