aws-sdk-iotsitewise 1.77.0 → 1.78.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,6 +35,7 @@ require 'aws-sdk-core/plugins/recursion_detection.rb'
35
35
  require 'aws-sdk-core/plugins/telemetry.rb'
36
36
  require 'aws-sdk-core/plugins/sign.rb'
37
37
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
38
+ require 'aws-sdk-core/plugins/event_stream_configuration.rb'
38
39
 
39
40
  module Aws::IoTSiteWise
40
41
  # An API client for IoTSiteWise. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -85,6 +86,7 @@ module Aws::IoTSiteWise
85
86
  add_plugin(Aws::Plugins::Telemetry)
86
87
  add_plugin(Aws::Plugins::Sign)
87
88
  add_plugin(Aws::Plugins::Protocols::RestJson)
89
+ add_plugin(Aws::Plugins::EventStreamConfiguration)
88
90
  add_plugin(Aws::IoTSiteWise::Plugins::Endpoints)
89
91
 
90
92
  # @overload initialize(options)
@@ -233,10 +235,16 @@ module Aws::IoTSiteWise
233
235
  # @option options [Boolean] :endpoint_discovery (false)
234
236
  # When set to `true`, endpoint discovery will be enabled for operations when available.
235
237
  #
238
+ # @option options [Proc] :event_stream_handler
239
+ # When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
240
+ #
236
241
  # @option options [Boolean] :ignore_configured_endpoint_urls
237
242
  # Setting to true disables use of endpoint URLs provided via environment
238
243
  # variables and the shared configuration file.
239
244
  #
245
+ # @option options [Proc] :input_event_stream_handler
246
+ # When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
247
+ #
240
248
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
241
249
  # The log formatter.
242
250
  #
@@ -253,6 +261,9 @@ module Aws::IoTSiteWise
253
261
  # setting this value to 5 will result in a request being retried up to
254
262
  # 4 times. Used in `standard` and `adaptive` retry modes.
255
263
  #
264
+ # @option options [Proc] :output_event_stream_handler
265
+ # When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
266
+ #
256
267
  # @option options [String] :profile ("default")
257
268
  # Used when loading credentials from the shared credentials file
258
269
  # at HOME/.aws/credentials. When not specified, 'default' is used.
@@ -1024,10 +1035,10 @@ module Aws::IoTSiteWise
1024
1035
  # id: "IdentityId", # required
1025
1036
  # },
1026
1037
  # iam_user: {
1027
- # arn: "ARN", # required
1038
+ # arn: "IamArn", # required
1028
1039
  # },
1029
1040
  # iam_role: {
1030
- # arn: "ARN", # required
1041
+ # arn: "IamArn", # required
1031
1042
  # },
1032
1043
  # },
1033
1044
  # access_policy_resource: { # required
@@ -1800,13 +1811,18 @@ module Aws::IoTSiteWise
1800
1811
  # A description for the dashboard.
1801
1812
  #
1802
1813
  # @option params [required, String] :dashboard_definition
1803
- # The dashboard definition specified in a JSON literal. For detailed
1804
- # information, see [Creating dashboards (CLI)][1] in the *IoT SiteWise
1805
- # User Guide*.
1814
+ # The dashboard definition specified in a JSON literal.
1815
+ #
1816
+ # * IoT SiteWise Monitor (Classic) see [Create dashboards (CLI)][1]
1817
+ #
1818
+ # * IoT SiteWise Monitor (AI-aware) see [Create dashboards (CLI)][2]
1819
+ #
1820
+ # in the *IoT SiteWise User Guide*
1806
1821
  #
1807
1822
  #
1808
1823
  #
1809
1824
  # [1]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html
1825
+ # [2]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html
1810
1826
  #
1811
1827
  # @option params [String] :client_token
1812
1828
  # A unique case-sensitive identifier that you can provide to ensure the
@@ -1855,6 +1871,83 @@ module Aws::IoTSiteWise
1855
1871
  req.send_request(options)
1856
1872
  end
1857
1873
 
1874
+ # Creates a dataset to connect an external datasource.
1875
+ #
1876
+ # @option params [String] :dataset_id
1877
+ # The ID of the dataset.
1878
+ #
1879
+ # @option params [required, String] :dataset_name
1880
+ # The name of the dataset.
1881
+ #
1882
+ # @option params [String] :dataset_description
1883
+ # A description about the dataset, and its functionality.
1884
+ #
1885
+ # @option params [required, Types::DatasetSource] :dataset_source
1886
+ # The data source for the dataset.
1887
+ #
1888
+ # @option params [String] :client_token
1889
+ # A unique case-sensitive identifier that you can provide to ensure the
1890
+ # idempotency of the request. Don't reuse this client token if a new
1891
+ # idempotent request is required.
1892
+ #
1893
+ # **A suitable default value is auto-generated.** You should normally
1894
+ # not need to pass this option.**
1895
+ #
1896
+ # @option params [Hash<String,String>] :tags
1897
+ # A list of key-value pairs that contain metadata for the access policy.
1898
+ # For more information, see [Tagging your IoT SiteWise resources][1] in
1899
+ # the *IoT SiteWise User Guide*.
1900
+ #
1901
+ #
1902
+ #
1903
+ # [1]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html
1904
+ #
1905
+ # @return [Types::CreateDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1906
+ #
1907
+ # * {Types::CreateDatasetResponse#dataset_id #dataset_id} => String
1908
+ # * {Types::CreateDatasetResponse#dataset_arn #dataset_arn} => String
1909
+ # * {Types::CreateDatasetResponse#dataset_status #dataset_status} => Types::DatasetStatus
1910
+ #
1911
+ # @example Request syntax with placeholder values
1912
+ #
1913
+ # resp = client.create_dataset({
1914
+ # dataset_id: "ID",
1915
+ # dataset_name: "RestrictedName", # required
1916
+ # dataset_description: "RestrictedDescription",
1917
+ # dataset_source: { # required
1918
+ # source_type: "KENDRA", # required, accepts KENDRA
1919
+ # source_format: "KNOWLEDGE_BASE", # required, accepts KNOWLEDGE_BASE
1920
+ # source_detail: {
1921
+ # kendra: {
1922
+ # knowledge_base_arn: "ARN", # required
1923
+ # role_arn: "ARN", # required
1924
+ # },
1925
+ # },
1926
+ # },
1927
+ # client_token: "ClientToken",
1928
+ # tags: {
1929
+ # "TagKey" => "TagValue",
1930
+ # },
1931
+ # })
1932
+ #
1933
+ # @example Response structure
1934
+ #
1935
+ # resp.dataset_id #=> String
1936
+ # resp.dataset_arn #=> String
1937
+ # resp.dataset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
1938
+ # resp.dataset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
1939
+ # resp.dataset_status.error.message #=> String
1940
+ # resp.dataset_status.error.details #=> Array
1941
+ # resp.dataset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
1942
+ # resp.dataset_status.error.details[0].message #=> String
1943
+ #
1944
+ # @overload create_dataset(params = {})
1945
+ # @param [Hash] params ({})
1946
+ def create_dataset(params = {}, options = {})
1947
+ req = build_request(:create_dataset, params)
1948
+ req.send_request(options)
1949
+ end
1950
+
1858
1951
  # Creates a gateway, which is a virtual or edge device that delivers
1859
1952
  # industrial data streams from local servers to IoT SiteWise. For more
1860
1953
  # information, see [Ingesting data using a gateway][1] in the *IoT
@@ -2016,6 +2109,16 @@ module Aws::IoTSiteWise
2016
2109
  #
2017
2110
  # [1]: https://docs.aws.amazon.com/iot-sitewise/latest/appguide/monitor-alarms.html
2018
2111
  #
2112
+ # @option params [String] :portal_type
2113
+ # Define the type of portal. The value for IoT SiteWise Monitor
2114
+ # (Classic) is `SITEWISE_PORTAL_V1`. The value for IoT SiteWise Monitor
2115
+ # (AI-aware) is `SITEWISE_PORTAL_V2`.
2116
+ #
2117
+ # @option params [Hash<String,Types::PortalTypeEntry>] :portal_type_configuration
2118
+ # The configuration entry associated with the specific portal type. The
2119
+ # value for IoT SiteWise Monitor (Classic) is `SITEWISE_PORTAL_V1`. The
2120
+ # value for IoT SiteWise Monitor (AI-aware) is `SITEWISE_PORTAL_V2`.
2121
+ #
2019
2122
  # @return [Types::CreatePortalResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2020
2123
  #
2021
2124
  # * {Types::CreatePortalResponse#portal_id #portal_id} => String
@@ -2035,16 +2138,22 @@ module Aws::IoTSiteWise
2035
2138
  # data: "data", # required
2036
2139
  # type: "PNG", # required, accepts PNG
2037
2140
  # },
2038
- # role_arn: "ARN", # required
2141
+ # role_arn: "IamArn", # required
2039
2142
  # tags: {
2040
2143
  # "TagKey" => "TagValue",
2041
2144
  # },
2042
2145
  # portal_auth_mode: "IAM", # accepts IAM, SSO
2043
2146
  # notification_sender_email: "Email",
2044
2147
  # alarms: {
2045
- # alarm_role_arn: "ARN", # required
2148
+ # alarm_role_arn: "IamArn", # required
2046
2149
  # notification_lambda_arn: "ARN",
2047
2150
  # },
2151
+ # portal_type: "SITEWISE_PORTAL_V1", # accepts SITEWISE_PORTAL_V1, SITEWISE_PORTAL_V2
2152
+ # portal_type_configuration: {
2153
+ # "PortalTypeKey" => {
2154
+ # portal_tools: ["Name"],
2155
+ # },
2156
+ # },
2048
2157
  # })
2049
2158
  #
2050
2159
  # @example Response structure
@@ -2052,7 +2161,7 @@ module Aws::IoTSiteWise
2052
2161
  # resp.portal_id #=> String
2053
2162
  # resp.portal_arn #=> String
2054
2163
  # resp.portal_start_url #=> String
2055
- # resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
2164
+ # resp.portal_status.state #=> String, one of "CREATING", "PENDING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
2056
2165
  # resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
2057
2166
  # resp.portal_status.error.message #=> String
2058
2167
  # resp.sso_application_id #=> String
@@ -2401,6 +2510,46 @@ module Aws::IoTSiteWise
2401
2510
  req.send_request(options)
2402
2511
  end
2403
2512
 
2513
+ # Deletes a dataset. This cannot be undone.
2514
+ #
2515
+ # @option params [required, String] :dataset_id
2516
+ # The ID of the dataset.
2517
+ #
2518
+ # @option params [String] :client_token
2519
+ # A unique case-sensitive identifier that you can provide to ensure the
2520
+ # idempotency of the request. Don't reuse this client token if a new
2521
+ # idempotent request is required.
2522
+ #
2523
+ # **A suitable default value is auto-generated.** You should normally
2524
+ # not need to pass this option.**
2525
+ #
2526
+ # @return [Types::DeleteDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2527
+ #
2528
+ # * {Types::DeleteDatasetResponse#dataset_status #dataset_status} => Types::DatasetStatus
2529
+ #
2530
+ # @example Request syntax with placeholder values
2531
+ #
2532
+ # resp = client.delete_dataset({
2533
+ # dataset_id: "CustomID", # required
2534
+ # client_token: "ClientToken",
2535
+ # })
2536
+ #
2537
+ # @example Response structure
2538
+ #
2539
+ # resp.dataset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
2540
+ # resp.dataset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
2541
+ # resp.dataset_status.error.message #=> String
2542
+ # resp.dataset_status.error.details #=> Array
2543
+ # resp.dataset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
2544
+ # resp.dataset_status.error.details[0].message #=> String
2545
+ #
2546
+ # @overload delete_dataset(params = {})
2547
+ # @param [Hash] params ({})
2548
+ def delete_dataset(params = {}, options = {})
2549
+ req = build_request(:delete_dataset, params)
2550
+ req.send_request(options)
2551
+ end
2552
+
2404
2553
  # Deletes a gateway from IoT SiteWise. When you delete a gateway, some
2405
2554
  # of the gateway's files remain in your gateway's file system.
2406
2555
  #
@@ -2448,7 +2597,7 @@ module Aws::IoTSiteWise
2448
2597
  #
2449
2598
  # @example Response structure
2450
2599
  #
2451
- # resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
2600
+ # resp.portal_status.state #=> String, one of "CREATING", "PENDING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
2452
2601
  # resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
2453
2602
  # resp.portal_status.error.message #=> String
2454
2603
  #
@@ -3370,6 +3519,56 @@ module Aws::IoTSiteWise
3370
3519
  req.send_request(options)
3371
3520
  end
3372
3521
 
3522
+ # Retrieves information about a dataset.
3523
+ #
3524
+ # @option params [required, String] :dataset_id
3525
+ # The ID of the dataset.
3526
+ #
3527
+ # @return [Types::DescribeDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3528
+ #
3529
+ # * {Types::DescribeDatasetResponse#dataset_id #dataset_id} => String
3530
+ # * {Types::DescribeDatasetResponse#dataset_arn #dataset_arn} => String
3531
+ # * {Types::DescribeDatasetResponse#dataset_name #dataset_name} => String
3532
+ # * {Types::DescribeDatasetResponse#dataset_description #dataset_description} => String
3533
+ # * {Types::DescribeDatasetResponse#dataset_source #dataset_source} => Types::DatasetSource
3534
+ # * {Types::DescribeDatasetResponse#dataset_status #dataset_status} => Types::DatasetStatus
3535
+ # * {Types::DescribeDatasetResponse#dataset_creation_date #dataset_creation_date} => Time
3536
+ # * {Types::DescribeDatasetResponse#dataset_last_update_date #dataset_last_update_date} => Time
3537
+ # * {Types::DescribeDatasetResponse#dataset_version #dataset_version} => String
3538
+ #
3539
+ # @example Request syntax with placeholder values
3540
+ #
3541
+ # resp = client.describe_dataset({
3542
+ # dataset_id: "CustomID", # required
3543
+ # })
3544
+ #
3545
+ # @example Response structure
3546
+ #
3547
+ # resp.dataset_id #=> String
3548
+ # resp.dataset_arn #=> String
3549
+ # resp.dataset_name #=> String
3550
+ # resp.dataset_description #=> String
3551
+ # resp.dataset_source.source_type #=> String, one of "KENDRA"
3552
+ # resp.dataset_source.source_format #=> String, one of "KNOWLEDGE_BASE"
3553
+ # resp.dataset_source.source_detail.kendra.knowledge_base_arn #=> String
3554
+ # resp.dataset_source.source_detail.kendra.role_arn #=> String
3555
+ # resp.dataset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
3556
+ # resp.dataset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
3557
+ # resp.dataset_status.error.message #=> String
3558
+ # resp.dataset_status.error.details #=> Array
3559
+ # resp.dataset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
3560
+ # resp.dataset_status.error.details[0].message #=> String
3561
+ # resp.dataset_creation_date #=> Time
3562
+ # resp.dataset_last_update_date #=> Time
3563
+ # resp.dataset_version #=> String
3564
+ #
3565
+ # @overload describe_dataset(params = {})
3566
+ # @param [Hash] params ({})
3567
+ def describe_dataset(params = {}, options = {})
3568
+ req = build_request(:describe_dataset, params)
3569
+ req.send_request(options)
3570
+ end
3571
+
3373
3572
  # Retrieves information about the default encryption configuration for
3374
3573
  # the Amazon Web Services account in the default or specified Region.
3375
3574
  # For more information, see [Key management][1] in the *IoT SiteWise
@@ -3531,6 +3730,8 @@ module Aws::IoTSiteWise
3531
3730
  # * {Types::DescribePortalResponse#portal_auth_mode #portal_auth_mode} => String
3532
3731
  # * {Types::DescribePortalResponse#notification_sender_email #notification_sender_email} => String
3533
3732
  # * {Types::DescribePortalResponse#alarms #alarms} => Types::Alarms
3733
+ # * {Types::DescribePortalResponse#portal_type #portal_type} => String
3734
+ # * {Types::DescribePortalResponse#portal_type_configuration #portal_type_configuration} => Hash&lt;String,Types::PortalTypeEntry&gt;
3534
3735
  #
3535
3736
  # @example Request syntax with placeholder values
3536
3737
  #
@@ -3547,7 +3748,7 @@ module Aws::IoTSiteWise
3547
3748
  # resp.portal_client_id #=> String
3548
3749
  # resp.portal_start_url #=> String
3549
3750
  # resp.portal_contact_email #=> String
3550
- # resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
3751
+ # resp.portal_status.state #=> String, one of "CREATING", "PENDING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
3551
3752
  # resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
3552
3753
  # resp.portal_status.error.message #=> String
3553
3754
  # resp.portal_creation_date #=> Time
@@ -3559,6 +3760,10 @@ module Aws::IoTSiteWise
3559
3760
  # resp.notification_sender_email #=> String
3560
3761
  # resp.alarms.alarm_role_arn #=> String
3561
3762
  # resp.alarms.notification_lambda_arn #=> String
3763
+ # resp.portal_type #=> String, one of "SITEWISE_PORTAL_V1", "SITEWISE_PORTAL_V2"
3764
+ # resp.portal_type_configuration #=> Hash
3765
+ # resp.portal_type_configuration["PortalTypeKey"].portal_tools #=> Array
3766
+ # resp.portal_type_configuration["PortalTypeKey"].portal_tools[0] #=> String
3562
3767
  #
3563
3768
  #
3564
3769
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -3899,6 +4104,14 @@ module Aws::IoTSiteWise
3899
4104
  # The maximum number of results to return at one time. The default is
3900
4105
  # 25.
3901
4106
  #
4107
+ # @option params [String] :client_token
4108
+ # A unique case-sensitive identifier that you can provide to ensure the
4109
+ # idempotency of the request. Don't reuse this client token if a new
4110
+ # idempotent request is required.
4111
+ #
4112
+ # **A suitable default value is auto-generated.** You should normally
4113
+ # not need to pass this option.**
4114
+ #
3902
4115
  # @return [Types::ExecuteQueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3903
4116
  #
3904
4117
  # * {Types::ExecuteQueryResponse#columns #columns} => Array&lt;Types::ColumnInfo&gt;
@@ -3913,6 +4126,7 @@ module Aws::IoTSiteWise
3913
4126
  # query_statement: "QueryStatement", # required
3914
4127
  # next_token: "ExecuteQueryNextToken",
3915
4128
  # max_results: 1,
4129
+ # client_token: "ClientToken",
3916
4130
  # })
3917
4131
  #
3918
4132
  # @example Response structure
@@ -4378,6 +4592,257 @@ module Aws::IoTSiteWise
4378
4592
  req.send_request(options)
4379
4593
  end
4380
4594
 
4595
+ # Invokes SiteWise Assistant to start or continue a conversation.
4596
+ #
4597
+ # @option params [String] :conversation_id
4598
+ # The ID assigned to a conversation. IoT SiteWise automatically
4599
+ # generates a unique ID for you, and this parameter is never required.
4600
+ # However, if you prefer to have your own ID, you must specify it here
4601
+ # in UUID format. If you specify your own ID, it must be globally
4602
+ # unique.
4603
+ #
4604
+ # @option params [required, String] :message
4605
+ # A text message sent to the SiteWise Assistant by the user.
4606
+ #
4607
+ # @option params [Boolean] :enable_trace
4608
+ # Specifies if to turn trace on or not. It is used to track the SiteWise
4609
+ # Assistant's reasoning, and data access process.
4610
+ #
4611
+ # @return [Types::InvokeAssistantResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4612
+ #
4613
+ # * {Types::InvokeAssistantResponse#body #body} => Types::ResponseStream
4614
+ # * {Types::InvokeAssistantResponse#conversation_id #conversation_id} => String
4615
+ #
4616
+ # @example EventStream Operation Example
4617
+ #
4618
+ # You can process the event once it arrives immediately, or wait until the
4619
+ # full response is complete and iterate through the eventstream enumerator.
4620
+ #
4621
+ # To interact with event immediately, you need to register #invoke_assistant
4622
+ # with callbacks. Callbacks can be registered for specific events or for all
4623
+ # events, including error events.
4624
+ #
4625
+ # Callbacks can be passed into the `:event_stream_handler` option or within a
4626
+ # block statement attached to the #invoke_assistant call directly. Hybrid
4627
+ # pattern of both is also supported.
4628
+ #
4629
+ # `:event_stream_handler` option takes in either a Proc object or
4630
+ # Aws::IoTSiteWise::EventStreams::ResponseStream object.
4631
+ #
4632
+ # Usage pattern a): Callbacks with a block attached to #invoke_assistant
4633
+ # Example for registering callbacks for all event types and an error event
4634
+ #
4635
+ # client.invoke_assistant( # params input# ) do |stream|
4636
+ # stream.on_error_event do |event|
4637
+ # # catch unmodeled error event in the stream
4638
+ # raise event
4639
+ # # => Aws::Errors::EventError
4640
+ # # event.event_type => :error
4641
+ # # event.error_code => String
4642
+ # # event.error_message => String
4643
+ # end
4644
+ #
4645
+ # stream.on_event do |event|
4646
+ # # process all events arrive
4647
+ # puts event.event_type
4648
+ # ...
4649
+ # end
4650
+ #
4651
+ # end
4652
+ #
4653
+ # Usage pattern b): Pass in `:event_stream_handler` for #invoke_assistant
4654
+ #
4655
+ # 1) Create a Aws::IoTSiteWise::EventStreams::ResponseStream object
4656
+ # Example for registering callbacks with specific events
4657
+ #
4658
+ # handler = Aws::IoTSiteWise::EventStreams::ResponseStream.new
4659
+ # handler.on_trace_event do |event|
4660
+ # event # => Aws::IoTSiteWise::Types::trace
4661
+ # end
4662
+ # handler.on_output_event do |event|
4663
+ # event # => Aws::IoTSiteWise::Types::output
4664
+ # end
4665
+ # handler.on_access_denied_exception_event do |event|
4666
+ # event # => Aws::IoTSiteWise::Types::accessDeniedException
4667
+ # end
4668
+ # handler.on_conflicting_operation_exception_event do |event|
4669
+ # event # => Aws::IoTSiteWise::Types::conflictingOperationException
4670
+ # end
4671
+ # handler.on_internal_failure_exception_event do |event|
4672
+ # event # => Aws::IoTSiteWise::Types::internalFailureException
4673
+ # end
4674
+ # handler.on_invalid_request_exception_event do |event|
4675
+ # event # => Aws::IoTSiteWise::Types::invalidRequestException
4676
+ # end
4677
+ # handler.on_limit_exceeded_exception_event do |event|
4678
+ # event # => Aws::IoTSiteWise::Types::limitExceededException
4679
+ # end
4680
+ # handler.on_resource_not_found_exception_event do |event|
4681
+ # event # => Aws::IoTSiteWise::Types::resourceNotFoundException
4682
+ # end
4683
+ # handler.on_throttling_exception_event do |event|
4684
+ # event # => Aws::IoTSiteWise::Types::throttlingException
4685
+ # end
4686
+ #
4687
+ # client.invoke_assistant( # params input #, event_stream_handler: handler)
4688
+ #
4689
+ # 2) Use a Ruby Proc object
4690
+ # Example for registering callbacks with specific events
4691
+ #
4692
+ # handler = Proc.new do |stream|
4693
+ # stream.on_trace_event do |event|
4694
+ # event # => Aws::IoTSiteWise::Types::trace
4695
+ # end
4696
+ # stream.on_output_event do |event|
4697
+ # event # => Aws::IoTSiteWise::Types::output
4698
+ # end
4699
+ # stream.on_access_denied_exception_event do |event|
4700
+ # event # => Aws::IoTSiteWise::Types::accessDeniedException
4701
+ # end
4702
+ # stream.on_conflicting_operation_exception_event do |event|
4703
+ # event # => Aws::IoTSiteWise::Types::conflictingOperationException
4704
+ # end
4705
+ # stream.on_internal_failure_exception_event do |event|
4706
+ # event # => Aws::IoTSiteWise::Types::internalFailureException
4707
+ # end
4708
+ # stream.on_invalid_request_exception_event do |event|
4709
+ # event # => Aws::IoTSiteWise::Types::invalidRequestException
4710
+ # end
4711
+ # stream.on_limit_exceeded_exception_event do |event|
4712
+ # event # => Aws::IoTSiteWise::Types::limitExceededException
4713
+ # end
4714
+ # stream.on_resource_not_found_exception_event do |event|
4715
+ # event # => Aws::IoTSiteWise::Types::resourceNotFoundException
4716
+ # end
4717
+ # stream.on_throttling_exception_event do |event|
4718
+ # event # => Aws::IoTSiteWise::Types::throttlingException
4719
+ # end
4720
+ # end
4721
+ #
4722
+ # client.invoke_assistant( # params input #, event_stream_handler: handler)
4723
+ #
4724
+ # Usage pattern c): Hybrid pattern of a) and b)
4725
+ #
4726
+ # handler = Aws::IoTSiteWise::EventStreams::ResponseStream.new
4727
+ # handler.on_trace_event do |event|
4728
+ # event # => Aws::IoTSiteWise::Types::trace
4729
+ # end
4730
+ # handler.on_output_event do |event|
4731
+ # event # => Aws::IoTSiteWise::Types::output
4732
+ # end
4733
+ # handler.on_access_denied_exception_event do |event|
4734
+ # event # => Aws::IoTSiteWise::Types::accessDeniedException
4735
+ # end
4736
+ # handler.on_conflicting_operation_exception_event do |event|
4737
+ # event # => Aws::IoTSiteWise::Types::conflictingOperationException
4738
+ # end
4739
+ # handler.on_internal_failure_exception_event do |event|
4740
+ # event # => Aws::IoTSiteWise::Types::internalFailureException
4741
+ # end
4742
+ # handler.on_invalid_request_exception_event do |event|
4743
+ # event # => Aws::IoTSiteWise::Types::invalidRequestException
4744
+ # end
4745
+ # handler.on_limit_exceeded_exception_event do |event|
4746
+ # event # => Aws::IoTSiteWise::Types::limitExceededException
4747
+ # end
4748
+ # handler.on_resource_not_found_exception_event do |event|
4749
+ # event # => Aws::IoTSiteWise::Types::resourceNotFoundException
4750
+ # end
4751
+ # handler.on_throttling_exception_event do |event|
4752
+ # event # => Aws::IoTSiteWise::Types::throttlingException
4753
+ # end
4754
+ #
4755
+ # client.invoke_assistant( # params input #, event_stream_handler: handler) do |stream|
4756
+ # stream.on_error_event do |event|
4757
+ # # catch unmodeled error event in the stream
4758
+ # raise event
4759
+ # # => Aws::Errors::EventError
4760
+ # # event.event_type => :error
4761
+ # # event.error_code => String
4762
+ # # event.error_message => String
4763
+ # end
4764
+ # end
4765
+ #
4766
+ # You can also iterate through events after the response complete.
4767
+ #
4768
+ # Events are available at resp.body # => Enumerator
4769
+ # For parameter input example, please refer to following request syntax
4770
+ #
4771
+ # @example Request syntax with placeholder values
4772
+ #
4773
+ # resp = client.invoke_assistant({
4774
+ # conversation_id: "ConversationId",
4775
+ # message: "MessageInput", # required
4776
+ # enable_trace: false,
4777
+ # })
4778
+ #
4779
+ # @example Response structure
4780
+ #
4781
+ # All events are available at resp.body:
4782
+ # resp.body #=> Enumerator
4783
+ # resp.body.event_types #=> [:trace, :output, :access_denied_exception, :conflicting_operation_exception, :internal_failure_exception, :invalid_request_exception, :limit_exceeded_exception, :resource_not_found_exception, :throttling_exception]
4784
+ #
4785
+ # For :trace event available at #on_trace_event callback and response eventstream enumerator:
4786
+ # event.text #=> String
4787
+ #
4788
+ # For :output event available at #on_output_event callback and response eventstream enumerator:
4789
+ # event.message #=> String
4790
+ # event.citations #=> Array
4791
+ # event.citations[0].reference.dataset.dataset_arn #=> String
4792
+ # event.citations[0].reference.dataset.source.arn #=> String
4793
+ # event.citations[0].reference.dataset.source.location.uri #=> String
4794
+ # event.citations[0].content.text #=> String
4795
+ #
4796
+ # For :access_denied_exception event available at #on_access_denied_exception_event callback and response eventstream enumerator:
4797
+ # event.message #=> String
4798
+ #
4799
+ # For :conflicting_operation_exception event available at #on_conflicting_operation_exception_event callback and response eventstream enumerator:
4800
+ # event.message #=> String
4801
+ # event.resource_id #=> String
4802
+ # event.resource_arn #=> String
4803
+ #
4804
+ # For :internal_failure_exception event available at #on_internal_failure_exception_event callback and response eventstream enumerator:
4805
+ # event.message #=> String
4806
+ #
4807
+ # For :invalid_request_exception event available at #on_invalid_request_exception_event callback and response eventstream enumerator:
4808
+ # event.message #=> String
4809
+ #
4810
+ # For :limit_exceeded_exception event available at #on_limit_exceeded_exception_event callback and response eventstream enumerator:
4811
+ # event.message #=> String
4812
+ #
4813
+ # For :resource_not_found_exception event available at #on_resource_not_found_exception_event callback and response eventstream enumerator:
4814
+ # event.message #=> String
4815
+ #
4816
+ # For :throttling_exception event available at #on_throttling_exception_event callback and response eventstream enumerator:
4817
+ # event.message #=> String
4818
+ #
4819
+ # resp.conversation_id #=> String
4820
+ #
4821
+ # @overload invoke_assistant(params = {})
4822
+ # @param [Hash] params ({})
4823
+ def invoke_assistant(params = {}, options = {}, &block)
4824
+ params = params.dup
4825
+ event_stream_handler = case handler = params.delete(:event_stream_handler)
4826
+ when EventStreams::ResponseStream then handler
4827
+ when Proc then EventStreams::ResponseStream.new.tap(&handler)
4828
+ when nil then EventStreams::ResponseStream.new
4829
+ else
4830
+ msg = "expected :event_stream_handler to be a block or "\
4831
+ "instance of Aws::IoTSiteWise::EventStreams::ResponseStream"\
4832
+ ", got `#{handler.inspect}` instead"
4833
+ raise ArgumentError, msg
4834
+ end
4835
+
4836
+ yield(event_stream_handler) if block_given?
4837
+
4838
+ req = build_request(:invoke_assistant, params)
4839
+
4840
+ req.context[:event_stream_handler] = event_stream_handler
4841
+ req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
4842
+
4843
+ req.send_request(options, &block)
4844
+ end
4845
+
4381
4846
  # Retrieves a paginated list of access policies for an identity (an IAM
4382
4847
  # Identity Center user, an IAM Identity Center group, or an IAM user) or
4383
4848
  # an IoT SiteWise Monitor resource (a portal or project).
@@ -4430,7 +4895,7 @@ module Aws::IoTSiteWise
4430
4895
  # identity_id: "IdentityId",
4431
4896
  # resource_type: "PORTAL", # accepts PORTAL, PROJECT
4432
4897
  # resource_id: "ID",
4433
- # iam_arn: "ARN",
4898
+ # iam_arn: "IamArn",
4434
4899
  # next_token: "NextToken",
4435
4900
  # max_results: 1,
4436
4901
  # })
@@ -5222,6 +5687,57 @@ module Aws::IoTSiteWise
5222
5687
  req.send_request(options)
5223
5688
  end
5224
5689
 
5690
+ # Retrieves a paginated list of datasets for a specific target resource.
5691
+ #
5692
+ # @option params [required, String] :source_type
5693
+ # The type of data source for the dataset.
5694
+ #
5695
+ # @option params [String] :next_token
5696
+ # The token for the next set of results, or null if there are no
5697
+ # additional results.
5698
+ #
5699
+ # @option params [Integer] :max_results
5700
+ # The maximum number of results to return for each paginated request.
5701
+ #
5702
+ # @return [Types::ListDatasetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5703
+ #
5704
+ # * {Types::ListDatasetsResponse#dataset_summaries #dataset_summaries} => Array&lt;Types::DatasetSummary&gt;
5705
+ # * {Types::ListDatasetsResponse#next_token #next_token} => String
5706
+ #
5707
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
5708
+ #
5709
+ # @example Request syntax with placeholder values
5710
+ #
5711
+ # resp = client.list_datasets({
5712
+ # source_type: "KENDRA", # required, accepts KENDRA
5713
+ # next_token: "NextToken",
5714
+ # max_results: 1,
5715
+ # })
5716
+ #
5717
+ # @example Response structure
5718
+ #
5719
+ # resp.dataset_summaries #=> Array
5720
+ # resp.dataset_summaries[0].id #=> String
5721
+ # resp.dataset_summaries[0].arn #=> String
5722
+ # resp.dataset_summaries[0].name #=> String
5723
+ # resp.dataset_summaries[0].description #=> String
5724
+ # resp.dataset_summaries[0].creation_date #=> Time
5725
+ # resp.dataset_summaries[0].last_update_date #=> Time
5726
+ # resp.dataset_summaries[0].status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
5727
+ # resp.dataset_summaries[0].status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
5728
+ # resp.dataset_summaries[0].status.error.message #=> String
5729
+ # resp.dataset_summaries[0].status.error.details #=> Array
5730
+ # resp.dataset_summaries[0].status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
5731
+ # resp.dataset_summaries[0].status.error.details[0].message #=> String
5732
+ # resp.next_token #=> String
5733
+ #
5734
+ # @overload list_datasets(params = {})
5735
+ # @param [Hash] params ({})
5736
+ def list_datasets(params = {}, options = {})
5737
+ req = build_request(:list_datasets, params)
5738
+ req.send_request(options)
5739
+ end
5740
+
5225
5741
  # Retrieves a paginated list of gateways.
5226
5742
  #
5227
5743
  # @option params [String] :next_token
@@ -5302,9 +5818,10 @@ module Aws::IoTSiteWise
5302
5818
  # resp.portal_summaries[0].creation_date #=> Time
5303
5819
  # resp.portal_summaries[0].last_update_date #=> Time
5304
5820
  # resp.portal_summaries[0].role_arn #=> String
5305
- # resp.portal_summaries[0].status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
5821
+ # resp.portal_summaries[0].status.state #=> String, one of "CREATING", "PENDING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
5306
5822
  # resp.portal_summaries[0].status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
5307
5823
  # resp.portal_summaries[0].status.error.message #=> String
5824
+ # resp.portal_summaries[0].portal_type #=> String, one of "SITEWISE_PORTAL_V1", "SITEWISE_PORTAL_V2"
5308
5825
  # resp.next_token #=> String
5309
5826
  #
5310
5827
  # @overload list_portals(params = {})
@@ -5779,10 +6296,10 @@ module Aws::IoTSiteWise
5779
6296
  # id: "IdentityId", # required
5780
6297
  # },
5781
6298
  # iam_user: {
5782
- # arn: "ARN", # required
6299
+ # arn: "IamArn", # required
5783
6300
  # },
5784
6301
  # iam_role: {
5785
- # arn: "ARN", # required
6302
+ # arn: "IamArn", # required
5786
6303
  # },
5787
6304
  # },
5788
6305
  # access_policy_resource: { # required
@@ -6515,13 +7032,18 @@ module Aws::IoTSiteWise
6515
7032
  # A new description for the dashboard.
6516
7033
  #
6517
7034
  # @option params [required, String] :dashboard_definition
6518
- # The new dashboard definition, as specified in a JSON literal. For
6519
- # detailed information, see [Creating dashboards (CLI)][1] in the *IoT
6520
- # SiteWise User Guide*.
7035
+ # The new dashboard definition, as specified in a JSON literal.
7036
+ #
7037
+ # * IoT SiteWise Monitor (Classic) see [Create dashboards (CLI)][1]
7038
+ #
7039
+ # * IoT SiteWise Monitor (AI-aware) see [Create dashboards (CLI)][2]
7040
+ #
7041
+ # in the *IoT SiteWise User Guide*
6521
7042
  #
6522
7043
  #
6523
7044
  #
6524
7045
  # [1]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html
7046
+ # [2]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html
6525
7047
  #
6526
7048
  # @option params [String] :client_token
6527
7049
  # A unique case-sensitive identifier that you can provide to ensure the
@@ -6550,6 +7072,71 @@ module Aws::IoTSiteWise
6550
7072
  req.send_request(options)
6551
7073
  end
6552
7074
 
7075
+ # Updates a dataset.
7076
+ #
7077
+ # @option params [required, String] :dataset_id
7078
+ # The ID of the dataset.
7079
+ #
7080
+ # @option params [required, String] :dataset_name
7081
+ # The name of the dataset.
7082
+ #
7083
+ # @option params [String] :dataset_description
7084
+ # A description about the dataset, and its functionality.
7085
+ #
7086
+ # @option params [required, Types::DatasetSource] :dataset_source
7087
+ # The data source for the dataset.
7088
+ #
7089
+ # @option params [String] :client_token
7090
+ # A unique case-sensitive identifier that you can provide to ensure the
7091
+ # idempotency of the request. Don't reuse this client token if a new
7092
+ # idempotent request is required.
7093
+ #
7094
+ # **A suitable default value is auto-generated.** You should normally
7095
+ # not need to pass this option.**
7096
+ #
7097
+ # @return [Types::UpdateDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
7098
+ #
7099
+ # * {Types::UpdateDatasetResponse#dataset_id #dataset_id} => String
7100
+ # * {Types::UpdateDatasetResponse#dataset_arn #dataset_arn} => String
7101
+ # * {Types::UpdateDatasetResponse#dataset_status #dataset_status} => Types::DatasetStatus
7102
+ #
7103
+ # @example Request syntax with placeholder values
7104
+ #
7105
+ # resp = client.update_dataset({
7106
+ # dataset_id: "CustomID", # required
7107
+ # dataset_name: "RestrictedName", # required
7108
+ # dataset_description: "RestrictedDescription",
7109
+ # dataset_source: { # required
7110
+ # source_type: "KENDRA", # required, accepts KENDRA
7111
+ # source_format: "KNOWLEDGE_BASE", # required, accepts KNOWLEDGE_BASE
7112
+ # source_detail: {
7113
+ # kendra: {
7114
+ # knowledge_base_arn: "ARN", # required
7115
+ # role_arn: "ARN", # required
7116
+ # },
7117
+ # },
7118
+ # },
7119
+ # client_token: "ClientToken",
7120
+ # })
7121
+ #
7122
+ # @example Response structure
7123
+ #
7124
+ # resp.dataset_id #=> String
7125
+ # resp.dataset_arn #=> String
7126
+ # resp.dataset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
7127
+ # resp.dataset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
7128
+ # resp.dataset_status.error.message #=> String
7129
+ # resp.dataset_status.error.details #=> Array
7130
+ # resp.dataset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
7131
+ # resp.dataset_status.error.details[0].message #=> String
7132
+ #
7133
+ # @overload update_dataset(params = {})
7134
+ # @param [Hash] params ({})
7135
+ def update_dataset(params = {}, options = {})
7136
+ req = build_request(:update_dataset, params)
7137
+ req.send_request(options)
7138
+ end
7139
+
6553
7140
  # Updates a gateway's name.
6554
7141
  #
6555
7142
  # @option params [required, String] :gateway_id
@@ -6685,6 +7272,16 @@ module Aws::IoTSiteWise
6685
7272
  #
6686
7273
  # [1]: https://docs.aws.amazon.com/iot-sitewise/latest/appguide/monitor-alarms.html
6687
7274
  #
7275
+ # @option params [String] :portal_type
7276
+ # Define the type of portal. The value for IoT SiteWise Monitor
7277
+ # (Classic) is `SITEWISE_PORTAL_V1`. The value for IoT SiteWise Monitor
7278
+ # (AI-aware) is `SITEWISE_PORTAL_V2`.
7279
+ #
7280
+ # @option params [Hash<String,Types::PortalTypeEntry>] :portal_type_configuration
7281
+ # The configuration entry associated with the specific portal type. The
7282
+ # value for IoT SiteWise Monitor (Classic) is `SITEWISE_PORTAL_V1`. The
7283
+ # value for IoT SiteWise Monitor (AI-aware) is `SITEWISE_PORTAL_V2`.
7284
+ #
6688
7285
  # @return [Types::UpdatePortalResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6689
7286
  #
6690
7287
  # * {Types::UpdatePortalResponse#portal_status #portal_status} => Types::PortalStatus
@@ -6703,18 +7300,24 @@ module Aws::IoTSiteWise
6703
7300
  # type: "PNG", # required, accepts PNG
6704
7301
  # },
6705
7302
  # },
6706
- # role_arn: "ARN", # required
7303
+ # role_arn: "IamArn", # required
6707
7304
  # client_token: "ClientToken",
6708
7305
  # notification_sender_email: "Email",
6709
7306
  # alarms: {
6710
- # alarm_role_arn: "ARN", # required
7307
+ # alarm_role_arn: "IamArn", # required
6711
7308
  # notification_lambda_arn: "ARN",
6712
7309
  # },
7310
+ # portal_type: "SITEWISE_PORTAL_V1", # accepts SITEWISE_PORTAL_V1, SITEWISE_PORTAL_V2
7311
+ # portal_type_configuration: {
7312
+ # "PortalTypeKey" => {
7313
+ # portal_tools: ["Name"],
7314
+ # },
7315
+ # },
6713
7316
  # })
6714
7317
  #
6715
7318
  # @example Response structure
6716
7319
  #
6717
- # resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
7320
+ # resp.portal_status.state #=> String, one of "CREATING", "PENDING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
6718
7321
  # resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
6719
7322
  # resp.portal_status.error.message #=> String
6720
7323
  #
@@ -6780,7 +7383,7 @@ module Aws::IoTSiteWise
6780
7383
  tracer: tracer
6781
7384
  )
6782
7385
  context[:gem_name] = 'aws-sdk-iotsitewise'
6783
- context[:gem_version] = '1.77.0'
7386
+ context[:gem_version] = '1.78.0'
6784
7387
  Seahorse::Client::Request.new(handlers, context)
6785
7388
  end
6786
7389