Skip to content

update_stream

update_stream(
    stream_id: StreamId,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    description: Optional[StreamDescription] = None,
    files: Optional[StreamFiles] = None,
    role_arn: Optional[RoleArn] = None,
) -> UpdateStreamResponse

Updates an existing stream. The stream version will be incremented by one.

Requires permission to access the UpdateStream action.

Parameters:

  • stream_id (StreamId) –

    The stream ID.

  • description (Optional[StreamDescription], default: None ) –

    The description of the stream.

  • files (Optional[StreamFiles], default: None ) –

    The files associated with the stream.

  • role_arn (Optional[RoleArn], default: None ) –

    An IAM role that allows the IoT service principal assumes to access your S3 files.

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def update_stream(
    self,
    stream_id: "capo_iot.types.stream_id.StreamId",
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    description: Optional[
        "capo_iot.types.stream_description.StreamDescription"
    ] = None,
    files: Optional["capo_iot.types.stream_files.StreamFiles"] = None,
    role_arn: Optional["capo_iot.types.role_arn.RoleArn"] = None,
) -> "capo_iot.types.update_stream_response.UpdateStreamResponse":
    """<p>Updates an existing stream. The stream version will be incremented by one.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">UpdateStream</a> action.</p>

    Args:
        stream_id: <p>The stream ID.</p>
        description: <p>The description of the stream.</p>
        files: <p>The files associated with the stream.</p>
        role_arn: <p>An IAM role that allows the IoT service principal assumes to access your S3 files.</p>

    Raises:
        capo_iot.errors.internal_failure_exception.InternalFailureException: <p>An unexpected error has occurred.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.limit_exceeded_exception.LimitExceededException: <p>A limit has been exceeded.</p>
        capo_iot.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot.types.update_stream_request.UpdateStreamRequest]",
    ) -> OperationResponse[
        "capo_iot.types.update_stream_response.UpdateStreamResponse"
    ]:
        import capo_iot._operations.aws_iot_service.update_stream

        output, http_response = (
            capo_iot._operations.aws_iot_service.update_stream.update_stream(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateStream")
    )
    input_: capo_iot.types.update_stream_request.UpdateStreamRequest = {
        "stream_id": stream_id
    }
    if description is not None:
        input_["description"] = description
    if files is not None:
        input_["files"] = files
    if role_arn is not None:
        input_["role_arn"] = role_arn

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output