An asynchronous API that updates a stream’s existing edge configuration. The Kinesis Video Stream will sync the stream’s edge configuration with the Edge Agent IoT Greengrass component that runs on an IoT Hub Device, setup at your premise. The time to sync can vary and depends on the connectivity of the Hub Device. The SyncStatus will be updated as the edge configuration is acknowledged, and synced with the Edge Agent.
If this API is invoked for the first time, a new edge configuration will be created for the stream, and the sync status will be set to SYNCING. You will have to wait for the sync status to reach a terminal state such as: IN_SYNC, or SYNC_FAILED, before using this API again. If you invoke this API during the syncing process, a ResourceInUseException will be thrown. The connectivity of the stream’s edge configuration and the Edge Agent will be retried for 15 minutes. After 15 minutes, the status will transition into the SYNC_FAILED state.
To move an edge configuration from one device to another, use DeleteEdgeConfiguration to delete the current edge configuration. You can then invoke StartEdgeConfigurationUpdate with an updated Hub Device ARN.
Parameters:
-
stream_name
(Optional[StreamName], default:
None
)
–
The name of the stream whose edge configuration you want to update. Specify either the StreamName or the StreamARN.
-
stream_arn
(Optional[ResourceARN], default:
None
)
–
The Amazon Resource Name (ARN) of the stream. Specify either the StreamName or the StreamARN.
-
edge_config
(EdgeConfig)
–
The edge configuration details required to invoke the update process.
Raises:
-
AccessDeniedException
–
You do not have required permissions to perform this operation.
-
ClientLimitExceededException
–
Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.
-
InvalidArgumentException
–
The value for this input parameter is invalid.
-
NoDataRetentionException
–
The Stream data retention in hours is equal to zero.
-
ResourceInUseException
–
When the input StreamARN or ChannelARN in CLOUD_STORAGE_MODE is already mapped to a different Kinesis Video Stream resource, or if the provided input StreamARN or ChannelARN is not in Active status, try one of the following :
-
The DescribeMediaStorageConfiguration API to determine what the stream given channel is mapped to.
-
The DescribeMappedResourceConfiguration API to determine the channel that the given stream is mapped to.
-
The DescribeStream or DescribeSignalingChannel API to determine the status of the resource.
-
ResourceNotFoundException
–
Amazon Kinesis Video Streams can't find the stream that you specified.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis_video/_services/kinesis_video.py
| def start_edge_configuration_update(
self,
edge_config: "capo_kinesis_video.types.edge_config.EdgeConfig",
*,
config_overrides: Optional[KinesisVideoClientConfig] = None,
stream_name: Optional["capo_kinesis_video.types.stream_name.StreamName"] = None,
stream_arn: Optional[
"capo_kinesis_video.types.resource_arn.ResourceARN"
] = None,
) -> "capo_kinesis_video.types.start_edge_configuration_update_output.StartEdgeConfigurationUpdateOutput":
"""<p>An asynchronous API that updates a stream’s existing edge configuration. The Kinesis Video Stream will sync the stream’s edge configuration with the Edge Agent IoT Greengrass component that runs on an IoT Hub Device, setup at your premise. The time to sync can vary and depends on the connectivity of the Hub Device. The <code>SyncStatus</code> will be updated as the edge configuration is acknowledged, and synced with the Edge Agent. </p> <p>If this API is invoked for the first time, a new edge configuration will be created for the stream, and the sync status will be set to <code>SYNCING</code>. You will have to wait for the sync status to reach a terminal state such as: <code>IN_SYNC</code>, or <code>SYNC_FAILED</code>, before using this API again. If you invoke this API during the syncing process, a <code>ResourceInUseException</code> will be thrown. The connectivity of the stream’s edge configuration and the Edge Agent will be retried for 15 minutes. After 15 minutes, the status will transition into the <code>SYNC_FAILED</code> state.</p> <p>To move an edge configuration from one device to another, use <a>DeleteEdgeConfiguration</a> to delete the current edge configuration. You can then invoke StartEdgeConfigurationUpdate with an updated Hub Device ARN.</p>
Args:
stream_name: <p>The name of the stream whose edge configuration you want to update. Specify either the <code>StreamName</code> or the <code>StreamARN</code>.</p>
stream_arn: <p> The Amazon Resource Name (ARN) of the stream. Specify either the <code>StreamName</code> or the <code>StreamARN</code>.</p>
edge_config: <p>The edge configuration details required to invoke the update process.</p>
Raises:
capo_kinesis_video.errors.access_denied_exception.AccessDeniedException: <p>You do not have required permissions to perform this operation.</p>
capo_kinesis_video.errors.client_limit_exceeded_exception.ClientLimitExceededException: <p>Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.</p>
capo_kinesis_video.errors.invalid_argument_exception.InvalidArgumentException: <p>The value for this input parameter is invalid.</p>
capo_kinesis_video.errors.no_data_retention_exception.NoDataRetentionException: <p>The Stream data retention in hours is equal to zero.</p>
capo_kinesis_video.errors.resource_in_use_exception.ResourceInUseException: <p>When the input <code>StreamARN</code> or <code>ChannelARN</code> in <code>CLOUD_STORAGE_MODE</code> is already mapped to a different Kinesis Video Stream resource, or if the provided input <code>StreamARN</code> or <code>ChannelARN</code> is not in Active status, try one of the following : </p> <ol> <li> <p>The <code>DescribeMediaStorageConfiguration</code> API to determine what the stream given channel is mapped to. </p> </li> <li> <p>The <code>DescribeMappedResourceConfiguration</code> API to determine the channel that the given stream is mapped to. </p> </li> <li> <p>The <code>DescribeStream</code> or <code>DescribeSignalingChannel</code> API to determine the status of the resource. </p> </li> </ol>
capo_kinesis_video.errors.resource_not_found_exception.ResourceNotFoundException: <p>Amazon Kinesis Video Streams can't find the stream that you specified.</p>
capo_kinesis_video.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis_video.types.start_edge_configuration_update_input.StartEdgeConfigurationUpdateInput]",
) -> OperationResponse[
"capo_kinesis_video.types.start_edge_configuration_update_output.StartEdgeConfigurationUpdateOutput"
]:
import capo_kinesis_video._operations.kinesis_video_20170930.start_edge_configuration_update
output, http_response = (
capo_kinesis_video._operations.kinesis_video_20170930.start_edge_configuration_update.start_edge_configuration_update(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_kinesis_video.types.start_edge_configuration_update_input.StartEdgeConfigurationUpdateInput",
) -> dict[str, Any]:
import capo_kinesis_video.types.start_edge_configuration_update_input
return capo_kinesis_video.types.start_edge_configuration_update_input.redact_sensitive(
input_
)
def _redact_output(
output: "capo_kinesis_video.types.start_edge_configuration_update_output.StartEdgeConfigurationUpdateOutput",
) -> dict[str, Any]:
import capo_kinesis_video.types.start_edge_configuration_update_output
return capo_kinesis_video.types.start_edge_configuration_update_output.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"StartEdgeConfigurationUpdate",
redact_input=_redact_input,
redact_output=_redact_output,
),
)
input_: capo_kinesis_video.types.start_edge_configuration_update_input.StartEdgeConfigurationUpdateInput = {
"edge_config": edge_config
}
if stream_name is not None:
input_["stream_name"] = stream_name
if stream_arn is not None:
input_["stream_arn"] = stream_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|